brtnrdr
04-24-2007, 02:14 PM
Hi,
I have a buffer object filled with vertex data and another buffer object filled with normals. I generate this data using a fragment shader and render them into 32-bit RGBA textures and copy them into buffer objects using PBO's. The vertices render fine, my question regards specifying the normal array.
I make the call:
glNormalPointer(GL_FLOAT,16,0) with the normal buffer object bound and the normals are mostly correct.
What I don't understand is why 16 is the stride. The documentation says it's the byte offset between normals, since I'm using RGBA textures I would think that the stride would be sizeof(float), but the way it is, it seems like there is a whole RGBA set between normals?
Am I mistaken thinking it should be sizeof(float) or do I maybe have a different bug?
Thanks.
I have a buffer object filled with vertex data and another buffer object filled with normals. I generate this data using a fragment shader and render them into 32-bit RGBA textures and copy them into buffer objects using PBO's. The vertices render fine, my question regards specifying the normal array.
I make the call:
glNormalPointer(GL_FLOAT,16,0) with the normal buffer object bound and the normals are mostly correct.
What I don't understand is why 16 is the stride. The documentation says it's the byte offset between normals, since I'm using RGBA textures I would think that the stride would be sizeof(float), but the way it is, it seems like there is a whole RGBA set between normals?
Am I mistaken thinking it should be sizeof(float) or do I maybe have a different bug?
Thanks.