#include <sgRenderer.h>
Public Member Functions | |
| sgRenderer () | |
| ~sgRenderer () | |
| virtual BOOL | init () |
| virtual void | render () |
| virtual BOOL | resizeFromLayer (CAEAGLLayer *layer) |
| void | setOrientation (unsigned int ori) |
Public Attributes | |
| sgObject * | first_solid |
| sgCamera * | first_cam |
| sgLight * | first_light |
| sgPanel * | first_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] |
| sgMaterial * | lastmat |
| sgOptimizedMesh * | first_optimized |
| std::vector< sgMesh * > | meshes |
| std::vector< sgMaterial * > | materials |
| unsigned int | orientation |
| sgMatrix4x4 | matglobal2d |
| sgMatrix4x4 | matglobal3d |
Renderer class. This class defines a renderer which manages all objects and draws them.
| sgRenderer::sgRenderer | ( | ) |
Constructor. Initializes a new instance of this class.
| sgRenderer::~sgRenderer | ( | ) |
Deconstructor. Frees all memory allocated by this class.
| 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.
| 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.
| layer | pointer to the iPhones rendering layer |
Backing height. Height of the window the engine is rendering into.
| GLint sgRenderer::backingWidth |
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.
| BOOL sgRenderer::optimize |
Render optimized. Culls and sorts the geometry before rendering to speed it up, if this is TRUE.
1.6.3