Getting to the point in OpenGL ES September 11, 2008 5:36 AM Subscribe
Drawing pixels with OpenGL ES 1.1?
Is there a straightforward way to draw (x, y) or (x, y, 0.0f) in OpenGL ES?
So far I have found glDrawArrays and glDrawElements but these appear to be used to draw 1D or 2D elements (lines, triangles, etc.). My Google fu isn't helping me tonight.
Use glPointParameter, glPointSize, and glColor to modify the appearance of the points. Using glPointSizePointer lets you specify an array of point sizes, which is handy for particle effects. posted by jedicus at 7:13 AM on September 11, 2008
I'm not an OpenGL ES expert, but I think your best bet would be to draw to a bitmap offscreen, then apply that as a texture to a quad. Then you set up an orthographic projection such that the quad fills the screen exactly to the edges, and such that one unit in OpenGL space equals one unit in pixel space, and voila. Here's some sample code that should be applicable.
glDrawElements(GL_POINTS, 0, num_points, point_array);You can also use
glDrawArraysif you useglVertexPointerfirst.Use
glPointParameter,glPointSize, andglColorto modify the appearance of the points. UsingglPointSizePointerlets you specify an array of point sizes, which is handy for particle effects.posted by jedicus at 7:13 AM on September 11, 2008