简体   繁体   中英

Is it possible to use texture coordinates/matrix with OpenGL point sprites?

I'm working on a particle system and point sprites would be nice to use. Unfortunately I have a constraint that I pack ALL my textures in a single texture atlas. This is a huge overall speed boost to my engine as I never have to switch texture bindings. But as a result I need to be able to specify a source texture rectangle for my particles.

So my question: Is it possible to do this with point sprites? From what I've read it seems like they just try to draw the whole texture.

If not, my alternative is to pack vertex buffers, but point sprites would probably be faster.

I'm using OpenGL ES 1.1 (on the iPhone), shaders are not an option.

I guess not. From the documentation on OES_draw_texture :

(3) Doesn't ARB_point_sprite make this extension unnecessary?

RESOLVED. No. Key differences include:

  • ARB_point_sprite uses the entire source texture to paint a point, ie its texture coordinates range from 0.0 to 1.0. This extension allows a subregion of a texture to be used as the source.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM