textures - OpenGL - Very strange artifacts.. Only happens when there is a lot of instances of the same type of object -
so basicly creating 2d game. using vbos , glsl shaders. every texture load, create vbo it, every drawable object uses texture it's elements inserted vbo. while ago trying create grid object creating lot of small boxes , positioning them next each other. in same vbo because had same texture create grid object. once got on 10 or so, started having weird artifacts.
so by-passed creating 1 big drawable , repeating texture on multiple times. artifacts gone. started doing text mapping (each letter instance share same texture, text map) , have noticed when go on 6 letters artifacts start appear. have no idea why happening dont have lead.
so wondering if has clue might causing problem..
note: noticed in lighting system (same texture different rgb values) if put 2 lights close each other, intersect after 3 artifacts start. might caus, because text intersects due padding.. how can fix 2 textures intersect , use same texture caus artifacts?
edit: ^^^ never mind removed padding , artifacts still there..
solved. problem in gldrawelements 2nd argument passing in number larger actual amount of indexes had, opengl trying render triangles.
Comments
Post a Comment