• Advertisement
Sign in to follow this  

[NEWBIE]help, draw points with different sizes using buffers

This topic is 3749 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to write a simple program, which simulates a particle system. I can get it work partially using the same point size. Currently I use vertex buffers to draw particles. I am wondering whether I can draw points with different sizes using buffers, or other alternative efficient ways. Appreciate your help.
Quote:
glEnableClientState(GL.GL_NORMAL_ARRAY); glEnableClientState(GL.GL_POINT_SIZE_ARRAY_OES);//not support by OPENGL glEnableClientState(GL.GL_VERTEX_ARRAY); glNormalPointer(GL.GL_FLOAT, 3*4, nbuffer); glPointSizePointerOES(GL.GL_FLOAT,4,rbuffer);//not support by OPENGL glVertexPointer(3, GL.GL_FLOAT, 0, vbuffer); glDrawElements(GL.GL_POINTS, points_list.length, GL.GL_UNSIGNED_INT, IntBuffer.wrap(points_list)); glDisableClientState(GL.GL_VERTEX_ARRAY); glDisableClientState(GL.GL_POINT_SIZE_ARRAY_OES);//not support by OPENGL glDisableClientState(GL.GL_NORMAL_ARRAY);
I google this, and find OPENGL-ES support it. http://www.khronos.org/opengles/documentation/opengles1_1/gl_egl_ref_1_1_20041110/glEnableClientState.html

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement