123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|541|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> C/C++/C#/Other -> VBO/IBO Terrain Rendering Problem

Mon, 28 Jun 2010, 23:28
Erebel55
Hello, I am having a heck of a time getting my head around vbo/ibo fully.
Right now my terrain is rendering wrong..it is rendering with two layers..when it should only have one.



The diagonal solid strips aren't supposed to be there...only the triangles. This is causing me problems because it makes it so that the terrain appears to have two layers in some parts.

For example here is two screenshots of me inside of the terrain.
i274.photobucket.com/albums/jj265/Erebel55/buscreeny5.jpg

i274.photobucket.com/albums/jj265/Erebel55/bugscreeny4.jpg

Here is a pastebin of how I create and draw my terrain.
pastebin.com/zCQZ2Cxe

Normally, I render my terrain with GL_TRIANGLE_STRIP. I am only using GL_TRIANGLES at the moment so that I can see what is going on easier.

Any help would be hugely appreciated..this has been bugging me for a while.

Thanks.

-=-=-
Lava Monkey
https://play.google.com/store/apps/details?id=com.lvm.lavamonkey
Wed, 30 Jun 2010, 02:57
bram32
From the second screenshot, it looks like the last row of triangles is connected to the first row, so they span the entire terrain. Maybe they are connected to (0,0,0), caused by references to empty vertices in the triangles?