How to use glDrawRangeElements()
Hi all, :D
I'm using VBOs, in glDrawRangeElemetns(mode,start,end,count,type,indices)
2nd param refers to GL_ARRAY_BUFFER, or to GL_ELEMENT_ARRAY_BUFFER?
In glDrawArray(mode,firts,count), first param refers to GL_ARRAY_BUFFER, and it's useful because i don't have to use gl*Pointer() during rendering function.
Most of all, 3rd param in glDREs() is always start+count, right? .. i don't understand <_>
:)
Quote:Original post by EnuYes, the 2nd and 3rd param refer to the indice of the vertex array, not index array. These "start" and "end" index are used to specify a range of data to be prefetched, so OpenGL may be able to obtain only limited amount of vertex array data prior to rendering, and may increase performance.
Hi all, :D
I'm using VBOs, in glDrawRangeElemetns(mode,start,end,count,type,indices)
2nd param refers to GL_ARRAY_BUFFER, or to GL_ELEMENT_ARRAY_BUFFER?
The range of the data can be simply calculated by (end - start "plus" 1). But it is not related with the 4th param (count). The 4th param is the number of indice in index array to read, starting from where the index pointer(6th param) is currently located.
Quote:Original post by EnuI think this is not correct. I believe you still need gl*Pointer() to tell where the array is.
In glDrawArray(mode,firts,count), first param refers to GL_ARRAY_BUFFER, and it's useful because i don't have to use gl*Pointer() during rendering function.
Quote:Original post by songhoQuote:Original post by EnuI think this is not correct. I believe you still need gl*Pointer() to tell where the array is.
In glDrawArray(mode,firts,count), first param refers to GL_ARRAY_BUFFER, and it's useful because i don't have to use gl*Pointer() during rendering function.
First of all thx a lot :D
About glDrawArray(), yes, i need gl*Pointer(), but i can call it only once so i reduce function-calls.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement