Thursday, April 28, 2011

What is the equivalent of glDrawPixels() in OpenGL ES 1.1?

Can anyone tell me the equivalent of glDrawPixels() in OpenGL ES 1.1?

From stackoverflow
  • Put your pixel coordinates in a vertex array and draw it with GL_POINTS.

    See http://gorillas.lyndir.com/trac/browser/Classes/SkyLayer.m (Gorillas code)

    unwind : This sounds like a horrible solution. Using a texture must be better in almost all ways.
    lhunath : @unwind: If you're just drawing pixels/points, it's fine. If you're trying to dump a whole buffer/image using GL_POINTS; it's obviously not suited and a texture is what you need. OP didn't specify, so I don;t think the -1 is appropriate.
  • You're forced to use a texture.

    Bahbar : a texture, and `GL_OES_draw_texture`. glDrawTexOES shortcuts the need to pass triangles and such. http://www.khronos.org/registry/gles/extensions/OES/OES_draw_texture.txt

0 comments:

Post a Comment