Solar::GlRenderer Class Reference

Class that can render Solar objects with OpenGL. More...

#include <GlRenderer.hpp>

Inheritance diagram for Solar::GlRenderer:

Inheritance graph
[legend]
Collaboration diagram for Solar::GlRenderer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Protected Types

Protected Member Functions

Protected Attributes


Detailed Description

Class that can render Solar objects with OpenGL.

  Solar::GlRenderer renderer(getMyMaterials());
  renderer.initGlState();
  Solar::Object *object = getMyObject();
  object->render(&renderer);

Author:
Tommi Ilmonen


Member Enumeration Documentation

enum Solar::GlRenderer::ListMode [protected]
 

Enumerator:
RENDERED_LIST 
GENERATE_LIST 
NO_LIST 


Constructor & Destructor Documentation

Solar::GlRenderer::GlRenderer GlMaterialBank materials  ) 
 

Solar::GlRenderer::GlRenderer  ) 
 

Solar::GlRenderer::~GlRenderer  )  [virtual]
 


Member Function Documentation

void Solar::GlRenderer::prepareToRender  )  [virtual]
 

Implements Solar::Renderer.

void Solar::GlRenderer::setMaterials GlMaterialBank materials  )  [inline]
 

Sets the materials without deleting the old materials.

void Solar::GlRenderer::begin Model  )  [virtual]
 

Begins to draw a model.

Implements Solar::Renderer.

void Solar::GlRenderer::end  )  [virtual]
 

End drawing the current model.

Implements Solar::Renderer.

void Solar::GlRenderer::renderTriangles GraphicTriangles  )  [virtual]
 

Render the triangles.

Implements Solar::Renderer.

void Solar::GlRenderer::renderTriangleMesh GraphicTriangleMesh  )  [virtual]
 

Render the triangles.

Implements Solar::Renderer.

void Solar::GlRenderer::renderTriangleStrips GraphicTriangleStrips  )  [virtual]
 

Render the triangles.

Implements Solar::Renderer.

void Solar::GlRenderer::pushTransform const Fluid::Matrix3 &  ,
const Fluid::Vector3 ,
float  scale
[virtual]
 

Pushes a new transform to the system.

Implements Solar::Renderer.

void Solar::GlRenderer::popTransform  )  [virtual]
 

Removes a trnasform from the transform stack.

Implements Solar::Renderer.

void Solar::GlRenderer::initGlState  ) 
 

Initializes the OpenGL state machine for rendering the objects.

This method needs to be called if the OpenGL state is wrong for the rendering.

void Solar::GlRenderer::setDisplayLists GlDisplayLists lists  )  [inline]
 

void Solar::GlRenderer::applyGlTexture2D GLuint  tex  ) 
 

This method switches OpenGL to a new 2D texture.

If the texture is the same as the previous texture, then no operation is performed.

  • tex The OpenGL texture id. If the texture id equals -1, then this method disables textures.

void Solar::GlRenderer::applyGlBlend bool  blend  ) 
 

This method enables/disables blending of the OpenGL state machine.

void Solar::GlRenderer::applyGlLighting bool  lighting  ) 
 

Switch OpenGL lights on/off.

void Solar::GlRenderer::applyGlSmooth bool  smooth  ) 
 

void Solar::GlRenderer::applyGlTwoSided bool  twoSided  ) 
 

long Solar::GlRenderer::listRenderCount  )  const [inline]
 

void Solar::GlRenderer::preRender Graphic  )  [protected, virtual]
 

Sets materials, textures, colors, transparencies etc.

GlRenderer::ListMode Solar::GlRenderer::renderDisplayList Graphic g  )  [protected]
 

Checks if there is a diplay list for this graphic.

If there is no list storage, then no list-related stuff is done and NO_LIST is returned. If the list exists, then it is rendered. If the the list does not exist, but there is a list storage, then its recording is began.


Member Data Documentation

GlMaterialBank* Solar::GlRenderer::m_materials [protected]
 

const GlMaterial* Solar::GlRenderer::m_currentMaterial [protected]
 

GlDisplayLists* Solar::GlRenderer::m_displayLists [protected]
 

GlDisplayLists::List* Solar::GlRenderer::m_currentList [protected]
 

GLuint Solar::GlRenderer::m_currentTexture [protected]
 

bool Solar::GlRenderer::m_blend [protected]
 

bool Solar::GlRenderer::m_lighting [protected]
 

bool Solar::GlRenderer::m_smooth [protected]
 

bool Solar::GlRenderer::m_twoSided [protected]
 

long Solar::GlRenderer::m_listRenderCount [protected]
 


The documentation for this class was generated from the following files:
Generated on Mon Mar 12 21:09:49 2007 for VEE - The Visual Effects Engine by  doxygen 1.4.6