opengl - Rendering thousands of textred cubes -


i got stuck texturing cubes - searched web , realized way give cube 6 different textures (with gldrawelements) create 24 indices. still faster gldrawarrays, seems quite illogically , horribly slow. understand purpose of gldrawelements deal complex models few indices share different texture coords. but, still pretty confused, because gldrawelements gave me perfomance boost (without effects, shader coloring) 50-67ms 10,000 cubes (gldrawarrays), 25-33ms 100,000 cubes.

my question is: have accept it, or there still way come on this?

i not know want archieve can try reduce number ob vertices in scene. make more faster. think if cube needs more 1 texture, can store them in texture atlas ans assign each vertex of cube corresponding texture coordinate image in texture atlas. reduce number of texture calls, there 1 texutre. in addition need render vertices/triangles visible user, not need texture of cube.

i've found site explains lot of speeding rendering thousands of cubes. try generate 1 big object on cpu culling lot of vertices before loading them gpu, think problem, can try use less textures possible (textureatlas), increase performance, whole cube need 8 vertices each specific texturecoordinate.


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -