Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Everyone,

I am back with yet another question!!!

So I recently learnt how to make various viewports in one window.
But what confuses me is : "Do I need to draw the scene for every viewport?"
or I am doing something wrong?

Is it the regular procedure to draw the scene for every viewport?

Thanks
Videep
Posted

1 solution

I guess your window consists of different viewports, and you don't want to redraw all image for each frame.

Normally in each rendering, we clears the back buffer with glClear() call.
Therefore we have to redraw all the scene again. In your case you have to redraw all viewports.

If you want to clear a viewport without clearing the data outside of it, you can use glScissor() function.

C++
void glScissor(	GLint  	x,
 	GLint  	y,
 	GLsizei  	width,
 	GLsizei  	height);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900