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

Started by
-1 comments, last by zerony 16 years, 4 months ago
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

This topic is closed to new replies.

Advertisement