Sign in to follow this  

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

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.
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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this