Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: glVertexAttribP4uiv

  1. #11
    Member Regular Contributor
    Join Date
    Jun 2012
    One more concern, i was using glVertexAttribP4uiv with GL_INT_2_10_10_10_REV. For signed data type, we have to use same API. So i was calling it with GL_INT_2_10_10_10_REV enum and data which i used is:
    Code :
    GLint red=0,green=511,blue=511,alpha=1;
    	GLint val = 0;
    	val = val | (alpha << 30);
    	val = val | (blue << 20);
    	val = val | (green << 10);
    	val = val | (red << 0);
    GLuint test_data[]={val,val,val,val};

    Now, this gives me black color. I must be going wrong with the data types. Please let me know the correct one to use GL_INT_2_10_10_10_REV.

  2. #12
    Senior Member OpenGL Lord
    Join Date
    May 2009
    GLuint test_data[]={val,val,val,val};
    Remember where I said that it doesn't take an array? That's what I was talking about. It takes a pointer to a single `GLuint`.

    As previously stated, the `Puiv` functions serve no functional purpose. Just use the `Pui` functions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts