![]() |
Mali OpenGL ES SDK v2.4.4
Mali Developer Center
Use of the code snippets present within these pages are subject to these EULA terms
|
#include "mCommon.h"#include "MAnimation.h"#include "MImageTGA.h"#include "MPathsManager.h"#include "MGeometryComplex.h"#include "MGeometryCone.h"#include "MGeometryRectangle.h"#include "MGeometrySphere.h"#include "MGeometryTorus.h"#include "MRendererProgram.h"#include "MDRRendererTexture.h"#include "MDRRenderTarget.h"#include <iostream>#include "3d.h"Macros | |
| #define | WINDOW_W 800 |
| #define | WINDOW_H 600 |
| #define | VERTEX_SHADER_FILE "ShadowMap_shadowmap.vert" |
| #define | FRAGMENT_SHADER_FILE "ShadowMap_shadowmap.frag" |
| #define | VERTEX_SHADER_SHADOW_FILE "ShadowMap_shadow.vert" |
| #define | FRAGMENT_SHADER_SHADOW_FILE "ShadowMap_shadow.frag" |
| #define | VERTEX_SHADER_SOLID_FILE "ShadowMap_solid.vert" |
| #define | FRAGMENT_SHADER_SOLID_FILE "ShadowMap_solid.frag" |
| #define | VERTEX_SHADER_FLARE_FILE "ShadowMap_flare.vert" |
| #define | FRAGMENT_SHADER_FLARE_FILE "ShadowMap_flare.frag" |
| #define | FLARE_IMAGE_FILE "ShadowMap_Flare.tga" |
| #define | DRAW_FLOOR |
| #define | DRAW_LIGHT |
Functions | |
| bool | setupGraphics (int width, int height) |
| void | terminateGraphics () |
| void | renderGeometry (MGeometryBase &aGeometry, MRendererProgram &aProgram, Matrix &aM, Matrix &aV, Matrix &aP) |
| void | renderFrame (void) |
| int | main (void) |
Variables | |
| MRendererProgram * | theProgramSolid = NULL |
| MRendererProgram * | theProgramShadow = NULL |
| MRendererProgram * | theProgramShadowMap = NULL |
| MRendererProgram * | theProgramFlare = NULL |
| MAnimation1f | theCamRotYAnim |
| MAnimation1f | theLightRotYAnim |
| MTime | theTime |
| struct timeval | sNow |
| struct timeval | sLastAnim1 |
| struct timeval | sLastAnim2 |
| Matrix | sMatLightM |
| Matrix | sMatLightV |
| Matrix | sMatLightProj |
| Matrix | sMatSceneV |
| Matrix | sMatSceneProj |
| Matrix | sMatCameraV |
| Matrix | sMatIdentity |
| MGeometrySphere * | theGeometrySphere = NULL |
| MGeometryTorus * | theGeometryTorus = NULL |
| MGeometryCone * | theGeometryCone = NULL |
| MGeometryComplex * | theGeometryComplex = NULL |
| MGeometryRectangle * | theGeometryRectangle = NULL |
| MVector4f | theGlobalAmbient |
| MDRRendererTexture * | theTextureFlare = NULL |
| MDRRenderTarget * | theRT = NULL |
| struct timeval | sLastFPS |
| unsigned int | uiFrame = 0 |
| long int | lElapsedFPS = 0L |
| int | g_iWindowW = -1 |
| int | g_iWindowH = -1 |
| int | g_iShadowW = -1 |
| int | g_iShadowH = -1 |
| #define DRAW_FLOOR |
| #define DRAW_LIGHT |
| #define FLARE_IMAGE_FILE "ShadowMap_Flare.tga" |
| #define FRAGMENT_SHADER_FILE "ShadowMap_shadowmap.frag" |
| #define FRAGMENT_SHADER_FLARE_FILE "ShadowMap_flare.frag" |
| #define FRAGMENT_SHADER_SHADOW_FILE "ShadowMap_shadow.frag" |
| #define FRAGMENT_SHADER_SOLID_FILE "ShadowMap_solid.frag" |
| #define VERTEX_SHADER_FILE "ShadowMap_shadowmap.vert" |
| #define VERTEX_SHADER_FLARE_FILE "ShadowMap_flare.vert" |
| #define VERTEX_SHADER_SHADOW_FILE "ShadowMap_shadow.vert" |
| #define VERTEX_SHADER_SOLID_FILE "ShadowMap_solid.vert" |
| #define WINDOW_H 600 |
| #define WINDOW_W 800 |
| int main | ( | void | ) |
| void renderFrame | ( | void | ) |
| void renderGeometry | ( | MGeometryBase & | aGeometry, |
| MRendererProgram & | aProgram, | ||
| Matrix & | aM, | ||
| Matrix & | aV, | ||
| Matrix & | aP | ||
| ) |
| void terminateGraphics | ( | ) |
| int g_iShadowH = -1 |
| int g_iShadowW = -1 |
| int g_iWindowH = -1 |
| int g_iWindowW = -1 |
| long int lElapsedFPS = 0L |
| struct timeval sLastAnim1 |
| struct timeval sLastAnim2 |
| struct timeval sLastFPS |
| Matrix sMatCameraV |
| Matrix sMatIdentity |
| Matrix sMatLightM |
| Matrix sMatLightProj |
| Matrix sMatLightV |
| Matrix sMatSceneProj |
| Matrix sMatSceneV |
| struct timeval sNow |
| MAnimation1f theCamRotYAnim |
| MGeometryComplex* theGeometryComplex = NULL |
| MGeometryCone* theGeometryCone = NULL |
| MGeometryRectangle* theGeometryRectangle = NULL |
| MGeometrySphere* theGeometrySphere = NULL |
| MGeometryTorus* theGeometryTorus = NULL |
| MVector4f theGlobalAmbient |
| MAnimation1f theLightRotYAnim |
| MRendererProgram* theProgramFlare = NULL |
| MRendererProgram* theProgramShadow = NULL |
| MRendererProgram* theProgramShadowMap = NULL |
| MRendererProgram* theProgramSolid = NULL |
| MDRRenderTarget* theRT = NULL |
| MDRRendererTexture* theTextureFlare = NULL |
| MTime theTime |
| unsigned int uiFrame = 0 |