Main
1-Open window and configure frame buffer (using GLUT for example).
2-Initialize GL states and display (Double buffer, color mode, etc.).
Loop
1-Check for events
a)if window event (resize, unhide, maximize etc.)
b)modify the viewport and Redraw
c)else if input event (keyboard and mouse etc.)
d)handle the event (such as move the camera or change the state) and usually draw the scene
Redraw
1-Clear the screen (and buffers e.g., z-buffer)
2-Change states (if desired)
3-Render
4-Swap buffers (if double buffer)
1-Open window and configure frame buffer (using GLUT for example).
2-Initialize GL states and display (Double buffer, color mode, etc.).
Loop
1-Check for events
a)if window event (resize, unhide, maximize etc.)
b)modify the viewport and Redraw
c)else if input event (keyboard and mouse etc.)
d)handle the event (such as move the camera or change the state) and usually draw the scene
Redraw
1-Clear the screen (and buffers e.g., z-buffer)
2-Change states (if desired)
3-Render
4-Swap buffers (if double buffer)
No comments:
Post a Comment