The Khronos Group - a non-profit industry consortium to develop, publish and promote open standard, royalty-free media authoring and acceleration standards for desktop and handheld devices, combined with conformance qualification programs for platform and device interoperability.

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Multi instancing support in OpenGL-ES

Hi,

I'm new to OpenGL-ES development.
As I understand from the GL-ES manual and specs document, for rendering a particular primitive we need to call few functions to set the parameter for the primitive and then call the glDrawArrays() to render the primitive.

e.g. to draw a line, the application code should look like

Code :

/* Line width is by default 1 pixel. */
glLineWidthx(nThickness);
/* Set the current vertices to use from aVertices array. */
glVertexPointer(2, GL_SHORT, 0, aVertices);
/* Set the current vertices to use color from colors array. */
glColorPointer(4, GL_BYTE, 0, aColors);
/* Draw the primitive using elements from vertices array. */
glDrawArrays(GL_LINES, 0, 1);

where glLineWidthx() should set the value of a global variable (because we don't have any structures in GL-ES to pass the data to implementation layer) to nThickness and which will be used by the line drawing function.

Now my query is if we use global variables in the implementation, how can we support the multi instancing capability.

Please help me in clearing this doubt and let me know if I'm wrong in my understanding of the GL-ES application/implementation code.