Difference between revisions of "Orbiter with OpenGL enabled"

From LinuxMCE
Jump to: navigation, search
m
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<table width="100%"> <tr><td bgcolor="#FFCFCF">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.</td></tr> </table>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.
+
[[Category: Programmer's Guide]]
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.
+
OpenGL drawing work in a separate thread which may mean that will not mix with actual Orbiter as architecture 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 "screen shots" on one moment the stage of the animation and display on screen. If it gets many "frames" the look will be animated.
 +
If your 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.
 
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.
 
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.
+
* 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.
+
The DrawingWidgetsEngine::Paint() and DrawingWidgetsEngine::Flip() are usually not called by an effect/opengl programer.
  
 
First of them iterates all widgets and draw them if they have the visible flag set true.
 
First of them iterates all widgets and draw them if they have the visible flag set true.

Latest revision as of 22:52, 17 May 2010


OpenGL drawing work in a separate thread which may mean that will not mix with actual Orbiter as architecture 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 "screen shots" on one moment the stage of the animation and display on screen. If it gets many "frames" the look will be animated. If your 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 usually 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.