开发者

is it possible to map multiple textures onto a shape in openGL ES?

开发者 https://www.devze.com 2023-02-01 17:42 出处:网络
Im new to OpenGL ES and wanted to create a bunch of triangles that would represent a grid of squares that i could map map tiles to. Is it possible to map separate textures on the same shape in OpenGL

Im new to OpenGL ES and wanted to create a bunch of triangles that would represent a grid of squares that i could map map tiles to. Is it possible to map separate textures on the same shape in OpenGL ES 开发者_C百科or would i have to make every square of the grid its own object? Thanks.


For efficiency (read: to minimize texture binds) you probably want a texture atlas.

Bind your atlas texture, pass in your grid geometry with the proper texture coordinates, and you're good to go.

0

精彩评论

暂无评论...
验证码 换一张
取 消