0

I draw texture images using glDrawArrays(GL_POINTS, 0, PARTICLE_NUMBER) in android, then rend it to screen.

In some phones the image was up-down inverted. Seems that there is no command GL_POINT_SPRITE_COORD_ORIGIN in OpenGL ES.

Is there any other way I can fix it?

Timothy
  • 2,004
  • 3
  • 23
  • 29
ding.wang
  • 1
  • 2

2 Answers2

0

For OpenGL ES 2.0, you can use gl_PointCoord in the fragment shaders to get the texture coordinates.

https://www.khronos.org/opengles/sdk/docs/man31/html/gl_PointCoord.xhtml

codetiger
  • 2,650
  • 20
  • 37
0

Is there any other way I can fix it?

Render it as triangles.

solidpixel
  • 10,688
  • 1
  • 20
  • 33