Difference between revisions of "Texture Manager and OpenGLGraphic description"

From LinuxMCE
Jump to: navigation, search
 
Line 2: Line 2:
  
 
Texturing mechanism in OpenGL is next:
 
Texturing mechanism in OpenGL is next:
 +
 
- read the data in a buffer where you know the format (for instance RGB or RGBA)
 
- read the data in a buffer where you know the format (for instance RGB or RGBA)
 +
 
- convert it from pixel surface to a texture
 
- convert it from pixel surface to a texture
 +
 
- get an index that may be used to "paint the geometry" using glEnable(GL_TEXTURE_2D) call using different parameters, as current color, transparency, etc.
 
- get an index that may be used to "paint the geometry" using glEnable(GL_TEXTURE_2D) call using different parameters, as current color, transparency, etc.
 +
  
 
Restrictions of OpenGL implementation:
 
Restrictions of OpenGL implementation:
- OpenGL should be implemented in it's own thread, else the convert textures will not appear to the drawing. The conclusion is simple,
+
- OpenGL should be implemented in it's own thread, else the convert textures will not appear to the drawing.  
 +
 
 
- the textures should be sized as power of two, etc. and the scalling may take time to complete
 
- the textures should be sized as power of two, etc. and the scalling may take time to complete
 +
 +
The conclusion is simple,
  
 
The flow is next:
 
The flow is next:

Revision as of 16:59, 14 September 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.
TextureManager class

Texturing mechanism in OpenGL is next:

- read the data in a buffer where you know the format (for instance RGB or RGBA)

- convert it from pixel surface to a texture

- get an index that may be used to "paint the geometry" using glEnable(GL_TEXTURE_2D) call using different parameters, as current color, transparency, etc.


Restrictions of OpenGL implementation: - OpenGL should be implemented in it's own thread, else the convert textures will not appear to the drawing.

- the textures should be sized as power of two, etc. and the scalling may take time to complete

The conclusion is simple,

The flow is next: - OpenGLEngine creates an TextureManager - at every frame at start we should

Manages multiple graphics and geometry lists: - texture for pending std::list <OpenGLGraphic*> WaitForConvert; std::list <OpenGLTexture> WaitForRelease; std::map<std::string, MeshFrame*> Graphics;