point-sprites

how to specify point sprite texture coordinates in OpenGL ES 1.1?

…衆ロ難τιáo~ 提交于 2019-12-11 08:16:28
问题 I'm writing a particle system that uses point sprites in OpenGL ES 1.1 on iOS. Everything works great until I try to texture the point sprites... when I render, each sprite is colored by the top left pixel of the texture I'm loading (rather than displaying the image). I've tried different images and different sizes and always get the same result. setup code (taken from GLPaint example): CGImageRef brushImage; CGContextRef brushContext; size_t width, height; GLubyte *brushData; brushImage =

Multi-textured Point Sprites in OpenGL ES2.0 on iOS?

℡╲_俬逩灬. 提交于 2019-12-07 11:34:29
问题 I am trying to make a multi-textured point sprite for an iphone application using OpenGL ES 2.0. I can't find any examples of this on web, and it doesn't seem to be working. Is there some built-in limitation where gl_PointCoord can't be used on multiple textures when using GL_POINTS mode for point sprites? uniform sampler2D tex; uniform sampler2D blur_tex; vec4 texPixel = texture2D( tex, gl_PointCoord ); vec4 blurPixel = texture2D( blur_tex, gl_PointCoord ); I'm sure I am passing in the