sgRenderer Class Reference

#include <sgRenderer.h>

Inheritance diagram for sgRenderer:
sgRendererES1 sgRendererES2

List of all members.

Public Member Functions

 sgRenderer ()
 ~sgRenderer ()
virtual BOOL init ()
virtual void render ()
virtual BOOL resizeFromLayer (CAEAGLLayer *layer)
void setOrientation (unsigned int ori)

Public Attributes

sgObjectfirst_solid
sgCamerafirst_cam
sgLightfirst_light
sgPanelfirst_panel
GLint backingWidth
GLint backingHeight
sgFColorA clearcolor
BOOL optimize

Static Public Attributes

static unsigned int oglversion = 0

Protected Member Functions

void updateOrientation ()
void culling ()
void sorting ()
void optimizing ()

Protected Attributes

EAGLContext * context
GLuint defaultFramebuffer
GLuint colorRenderbuffer
GLuint depthRenderbuffer
float quadpos [12]
float quaduv [8]
sgMateriallastmat
sgOptimizedMeshfirst_optimized
std::vector< sgMesh * > meshes
std::vector< sgMaterial * > materials
unsigned int orientation
sgMatrix4x4 matglobal2d
sgMatrix4x4 matglobal3d

Detailed Description

Renderer class. This class defines a renderer which manages all objects and draws them.


Constructor & Destructor Documentation

sgRenderer::sgRenderer (  ) 

Constructor. Initializes a new instance of this class.

sgRenderer::~sgRenderer (  ) 

Deconstructor. Frees all memory allocated by this class.


Member Function Documentation

BOOL sgRenderer::init (  )  [virtual]

Initialize. Initializes an instance of this class.

Reimplemented in sgRendererES1, and sgRendererES2.

void sgRenderer::render (  )  [virtual]

Render. Makes this renderer render.

Reimplemented in sgRendererES1, and sgRendererES2.

BOOL sgRenderer::resizeFromLayer ( CAEAGLLayer *  layer  )  [virtual]

Resize from layer. Resizes all render buffers to the new size of the layer.

Parameters:
layer pointer to the iPhones rendering layer

Reimplemented in sgRendererES1, and sgRendererES2.

void sgRenderer::setOrientation ( unsigned int  ori  ) 

Set device orientation. Sets the device orientation to display everything for.

Parameters:
layer pointer to the iPhones rendering layer

Member Data Documentation

Backing height. Height of the window the engine is rendering into.

Backing width. Width of the window the engine is rendering into.

Clear color. Defines the color to clear the framebuffer with.

First camera. Pointer to a first camera, which is empty, but meant to be used to create new cameras from.

First light. Pointer to a first light, which is empty, but meant to be used to create new lights from.

First panel. Pointer to a first panel, which is empty, but meant to be used to create new panels from.

First solid. Pointer to a first solid object, which is empty, but meant to be used to create new solid objects from.

unsigned int sgRenderer::oglversion = 0 [static]

OpenGL ES Version. 0 if the renderer couldnĀ“t be initialized, 1 for OpenGL ES 1.1 and 2 for 2.0.

Render optimized. Culls and sorts the geometry before rendering to speed it up, if this is TRUE.


The documentation for this class was generated from the following files:
Generated on Thu Jun 3 13:31:04 2010 for iSDGE by  doxygen 1.6.3