Difference between revisions of "Orbiter with OpenGL enabled"

From LinuxMCE
Jump to: navigation, search
 
Line 7: Line 7:
 
     - the high level class for drawing of 2D components is named Widget, and is covered by DrawingWidgetsEngine.
 
     - the high level class for drawing of 2D components is named Widget, and is covered by DrawingWidgetsEngine.
 
     - effects are covered by class GL2DEffectFactory
 
     - effects are covered by class GL2DEffectFactory
 +
 +
The DrawingWidgetsEngine::Paint() and DrawingWidgetsEngine::Flip() are ussualy not called by an effect/opengl programer.
 +
 +
First of them iterates all widgets and draw them if they have the visible flag set true.
 +
Flip method will made the complete update to the screen.
 +
 +
The decision of separation of the Paint (3D render) and flipping is cause some implementations may add different OpenGL code, for instance it may mix with one texture, etc.

Revision as of 10:34, 3 April 2006

This page was written by Pluto and imported with their permission when LinuxMCE branched off in February, 2007. In general any information should apply to LinuxMCE. However, this page should be edited to reflect changes to LinuxMCE and remove old references to Pluto.
OpenGL drawing work in a separate thread which may mean that will not mix with actual Orbiter as arhitecture and will draw only when effects are pending, else it stays in idle mode.

Also OpenGL painting is not frame based: to understand easy what means that you may think that OpenGL "screenshots" on one moment the stage of the animation and display on screen. If it gets many "frames" the look will be animated. If you computer's hardware is capable to made a fluid animation, everything will look nice, else the animation skip the frames to complete in setted time. If you get lower performance you may reduce the resolution of your screen or bpp (bits/pixel = bit color depth of image). Too you must assure that your accelerated drivers are enable.

That implementation splits the OpenGL drawing by Effect part.

   - the high level class for drawing of 2D components is named Widget, and is covered by DrawingWidgetsEngine.
   - effects are covered by class GL2DEffectFactory

The DrawingWidgetsEngine::Paint() and DrawingWidgetsEngine::Flip() are ussualy not called by an effect/opengl programer.

First of them iterates all widgets and draw them if they have the visible flag set true. Flip method will made the complete update to the screen.

The decision of separation of the Paint (3D render) and flipping is cause some implementations may add different OpenGL code, for instance it may mix with one texture, etc.