I am profiling my app at the moment looking for any untidy bits and pieces.
I am getting a massive amount of redundant call alerts. Many more than I expected, but on close examination I don’t think they are…
But perhaps they are…
Basically I am using a lot of Buffer Objects, and AFAIK when you attach a buffer such as a GL_TEXTURE_COORD_ARRAY it is the act of setting the glTexCoordPointer to NULL that updates that with the currently bound buffer…
I am basing that on this from the glBufferObject OpenGL docs…
When vertex array pointer state is changed, for example by a call to glNormalPointer, the current buffer object binding (GL_ARRAY_BUFFER_BINDING) is copied into the corresponding client state for the vertex array type being changed, for example GL_NORMAL_ARRAY_BUFFER_BINDING. While a non-zero buffer object is bound to the GL_ARRAY_BUFFER target, the vertex array pointer parameter that is traditionally interpreted as a pointer to client-side memory is instead interpreted as an offset within the buffer object measured in basic machine units.
The setting of the TexCoordPointer to NULL in this case in a loop is showing as 100% redundant, but I am actually changing the Buffer it is bound to with an always NULL offset.
So I don’t think it is redundant, even though it was previously set to NULL many times before in the same loop…
Obviously I could simply have offsets into that same buffer for sets of Texture Coords, and reduce Binding calls. I am aware of that, but I would still then have to call the Pointer parameter anyway to change the offset. What I want to know is am I right in mistrusting the profile in this specific case.
Can anyone else clarify for me?