Hello,
Having some obvious problems again with redering.
Im having this terrain:
Now i want to make the water reflective, whats obviously done using an frame buffer object.
The world is build up with chunks, rendering max 4 chunks at the same time.
How should i render to an fbo?
- Just send the current screen to the fbo, and figure out how it must be transferred to match the right position.
- Draw every (visible) Chunk to the fbo separately?
Also im ondering how i should transform the view before rendering to an fbo, should i keep the same transformation (excluding rotation), or do i need to transform to the right psition fist (like top view).
Also wat parameters should i use for glClipPlane(GL_CLIP_PLANE0, clipbuffer);
At last im having an overall question about rendering the chunks.
Whem im rendering an whole chunk at once im getting these blending errors:
This is caused because an transparent texture blends with the green background, the chunk behind it is drawn after that.
Is there some solution for this or should i first render all ground, then trees and other objects, then water, like this:
for(int tx = 0; tx < 3; tx ++){
for(int ty = 0; ty < 3; ty ++){
if(c[tx + ty*3] != null){
c[tx + ty*3].Draw();
}
}
}
for(int tx = 0; tx < 3; tx ++){
for(int ty = 0; ty < 3; ty ++){
if(c[tx + ty*3] != null){
c[tx + ty*3].DrawObjects();
}
}
}
for(int tx = 0; tx < 3; tx ++){
for(int ty = 0; ty < 3; ty ++){
if(c[tx + ty*3] != null){
c[tx + ty*3].DrawWater();
}
}
}