It's me again. This one is really eluding me. I slapped together some code for a voxel rendering engine and I'm in the process of cleaning it up and optimizing it. I'm using VBO's and VAO's and I just converted from using IBO's to not. I also just changed the way my vertex/color data is passed and the structure of my shaders. the method I was using can be seen in my renderplayer() method as I haven't bothered updating it yet. The next step is changing all of my rendering data to shorts or bytes.

All of my chunks were rendering properly before but now I get a weird errror where any chunk that is not init'd with the default configuration appears to -I'm gonna say- bleed over the three chunks preceding it in the list of chunks. I am seeing the preceding chunks render as if they had block list composed of both their own and that of the offending chunk.

I've numbered chunks 0-5 here in blue and circled the offending chunk. Number 5 should appear as a y=x structure with no red base and the others should appear as y=0.In addition I've pointed out a weird thing where chunk[offending - 3], in this case 2, renders differently from the others.

When I check the block list of my chunks they appear correct. The list of vertices for each chunk is the correct length, and the engine appears to be rendering the proper number of chunks.

It's me again everyone. I've altered the code for generating a "default" chunk. Now the code makes the flat red plane, previously at y=0, generate at y=chunk.x. This made me realize what I should have been acutely aware of all along. There is no 'offending' chunk. Every chunk seems to bleed over the previous chunks. PIC I have continued combing my code and now suspect more than ever that I fundamentally misunderstand the rendering process I've set up. I'd really appreciate someone straightening me out here as I'm thoroughly missing the point.

I am still sure that:a. The chunks contain the proper number of blocks.b. The chunks list of vertices are the proper length.c. The engine is not rendering duplicate chunks.All of this prints to the console when the program inits.

I therefore assume that I have massively screwed up my rendering (possibly with vbos?).

I have a guess! A big guess, but a guess none the less! If you have the red at y=0 over the entire set of chunks, and then have the green over it, then what's happening is a bug that occurs when you attempt to put two triangles in the same space. They overlap in funny ways (The depth isn't found correctly). Try rotating and see if there's any flicker (Red to green, green to red) if it does, then that's your problem. :3

I don't think that's it. I have the camera rotating and there's no flicker. The default y=0 layer is only created if a chunk is initialized without a list of blocks. Thank you though! Any other ideas?? The problem is that every chunk is imprinting over the three chunks preceding it. No idea how.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org