#include <Renderer.h>
Inherited by OpenGLRenderer.
Inheritance diagram for Renderer:
Public Member Functions | |
Renderer () | |
virtual | ~Renderer () |
void | reset () |
void | resetToDefaults () |
void | apply () |
void | lock (const unsigned int flag) |
void | unlock (const unsigned int flag) |
virtual void | setDefaults ()=0 |
TextureID | addTexture (const char *filename, unsigned int flags=0) |
TextureID | addTexture (Image *image, unsigned int flags=0) |
TextureID | addCubemap (const char *fNegX, const char *fPosX, const char *fNegY, const char *fPosY, const char *fNegZ, const char *fPosZ) |
TextureID | addCubemap (Image *images[6]) |
void | deleteTexture (const int i) |
ShaderID | addShader (const char *filename, const char *extraDefines=NULL) |
void | deleteShader (const int i) |
virtual void | changeShaderConstant1f (const char *name, const float constant)=0 |
virtual void | changeShaderConstant2f (const char *name, const Vec2 &constant)=0 |
virtual void | changeShaderConstant3f (const char *name, const Vec3 &constant)=0 |
virtual void | changeShaderConstant4f (const char *name, const Vec4 &constant)=0 |
virtual void | changeDepthFunc (const int depthFunc)=0 |
virtual void | changeBlending (const sFactor, const dFactor, const int blendMode=BLENDMODE_ADD)=0 |
virtual void | changeMask (const int mask)=0 |
ShaderID | addFragmentShader (unsigned int type, char *filename=NULL) |
ShaderID | addFragmentShader (unsigned int type, unsigned int shaderID) |
ShaderID | addVertexShader (char *filename) |
void | deleteFragmentShader (const int index) |
void | deleteVertexShader (const int index) |
virtual void | changeFragmentShader (const ShaderID shader)=0 |
virtual void | changeVertexShader (const ShaderID shader)=0 |
void | setTexture (const char *name, const TextureID texID) |
void | setTextures (const TextureID t0) |
void | setTextures (const TextureID t0, const TextureID t1) |
void | setTextures (const TextureID t0, const TextureID t1, const TextureID t2) |
void | setTextures (const TextureID t0, const TextureID t1, const TextureID t2, const TextureID t3) |
void | setTextures (const TextureID t0, const TextureID t1, const TextureID t2, const TextureID t3, const TextureID t4) |
void | setTextures (const TextureID t0, const TextureID t1, const TextureID t2, const TextureID t3, const TextureID t4, const TextureID t5) |
void | setShader (const ShaderID shader) |
void | setDepthFunc (const int depthFunc) |
void | setBlending (const int src, const int dest, const int blendMode=BLENDMODE_ADD) |
void | setMask (const int mask) |
void | setFragmentShader (const ShaderID shader) |
void | setVertexShader (const ShaderID shader) |
Public Attributes | |
unsigned int | lockFlags |
Protected Member Functions | |
TextureID | insertTexture (Texture &texture) |
virtual bool | createTexture (Texture &texture)=0 |
virtual void | removeTexture (Texture &texture)=0 |
virtual void | changeTextureUnit (const int tex)=0 |
virtual void | changeTexture (const TextureID textureID)=0 |
virtual void | assignNamedTextures ()=0 |
ShaderID | insertShader (Shader &shader) |
virtual bool | createShader (Shader &shader, const char *vertexShaderText, const char *fragmentShaderText)=0 |
virtual void | removeShader (Shader &shader)=0 |
virtual void | changeShader (const ShaderID shader)=0 |
ShaderID | insertFragmentShader (FragmentShader &fragmentShader) |
virtual void | createFragmentShader (FragmentShader &fragmentShader)=0 |
virtual void | removeFragmentShader (FragmentShader &fragmentShader)=0 |
virtual void | uploadFragmentShader (FragmentShader &fragmentShader)=0 |
ShaderID | insertVertexShader (VertexShader &vertexShader) |
virtual void | createVertexShader (VertexShader &vertexShader)=0 |
virtual void | removeVertexShader (VertexShader &vertexShader)=0 |
virtual void | uploadVertexShader (VertexShader &vertexShader)=0 |
Protected Attributes | |
Set< Texture > | textures |
int | maxTextures |
int | currentTextureUnit |
TextureID | selectedTextures [MAX_TEXTURES] |
TextureID | currentTextures [MAX_TEXTURES] |
const char * | selectedTextureNames [MAX_TEXTURES] |
int | nNamedTextures |
Set< Shader > | shaders |
ShaderID | currentShader |
ShaderID | selectedShader |
int | selectedDepthFunc |
int | currentDepthFunc |
int | selectedBlendMode |
int | currentBlendMode |
int | selectedBlendSrc |
int | currentBlendSrc |
int | selectedBlendDest |
int | currentBlendDest |
int | selectedMask |
int | currentMask |
Set< VertexShader > | vertexShaders |
Set< FragmentShader > | fragmentShaders |
ShaderID | selectedVertexShader |
ShaderID | currentVertexShader |
ShaderID | selectedFragmentShader |
ShaderID | currentFragmentShader |
Definition at line 118 of file Renderer.h.
|
Author: Petter Alstermark, petter@alstermark.com Definition at line 12 of file Renderer.cpp. References lockFlags. |
|
Definition at line 19 of file Renderer.cpp. |
|
Definition at line 165 of file Renderer.cpp. References createTexture(), Texture::depth, Texture::format, Image::getFormat(), Image::getHeight(), Image::getWidth(), Texture::height, Texture::images, insertTexture(), LOG_ERROR, LOG_SUCCESS, TEXTURE_CUBEMAP, TEXTURE_NONE, Texture::textureKind, and Texture::width. Here is the call graph for this function: |
|
Definition at line 141 of file Renderer.cpp. References LOG_ERROR, and TEXTURE_NONE. Referenced by Menu::load(), and Join::load(). |
|
Definition at line 359 of file Renderer.cpp. References insertFragmentShader(), FragmentShader::shaderID, and FragmentShader::type. Here is the call graph for this function: |
|
Definition at line 325 of file Renderer.cpp. References createFragmentShader(), insertFragmentShader(), FragmentShader::length, LOG_SUCCESS, FragmentShader::program, SHADER_NONE, FragmentShader::type, and uploadFragmentShader(). Here is the call graph for this function: |
|
Definition at line 232 of file Renderer.cpp. References createShader(), insertShader(), LOG_ERROR, LOG_SUCCESS, and SHADER_NONE. Referenced by Menu::load(). Here is the call graph for this function: |
|
Definition at line 113 of file Renderer.cpp. References Texture::clampS, Texture::clampT, createTexture(), Texture::depth, Texture::format, Image::getFormat(), Image::getHeight(), Image::getWidth(), Texture::height, Texture::images, insertTexture(), TEXTURE_2D, TEXTURE_CLAMP_S, TEXTURE_CLAMP_T, TEXTURE_HEIGHTMAP, TEXTURE_NONE, TEXTURE_NORMALMAP, Texture::textureKind, Image::toGrayScale(), Image::toNormalMap(), and Texture::width. Here is the call graph for this function: |
|
Definition at line 99 of file Renderer.cpp. References Image::loadImage(), and TEXTURE_NONE. Referenced by ObjLevel::load(), Menu::load(), Join::load(), Menu::loadMain(), Play::loadTextures(), MS_Material::reloadTexture(), Join::setGalaxy(), and Menu::setModel(). Here is the call graph for this function: |
|
Definition at line 370 of file Renderer.cpp. References createVertexShader(), insertVertexShader(), VertexShader::length, VertexShader::program, SHADER_NONE, and uploadVertexShader(). Here is the call graph for this function: |
|
|
Implemented in OpenGLRenderer. Referenced by apply(). |
|
Referenced by apply(). |
|
Implemented in OpenGLRenderer. Referenced by apply(). |
|
Implemented in OpenGLRenderer. |
|
Implemented in OpenGLRenderer. Referenced by apply(). |
|
Implemented in OpenGLRenderer. Referenced by apply(). |
|
Implemented in OpenGLRenderer. |
|
Implemented in OpenGLRenderer. |
|
Implemented in OpenGLRenderer. |
|
Implemented in OpenGLRenderer. |
|
Implemented in OpenGLRenderer. Referenced by apply(). |
|
Implemented in OpenGLRenderer. Referenced by apply(). |
|
Implemented in OpenGLRenderer. |
|
Implemented in OpenGLRenderer. Referenced by addFragmentShader(). |
|
Implemented in OpenGLRenderer. Referenced by addShader(). |
|
Implemented in OpenGLRenderer. Referenced by addCubemap(), and addTexture(). |
|
Implemented in OpenGLRenderer. Referenced by addVertexShader(). |
|
Definition at line 411 of file Renderer.cpp. References fragmentShaders, removeFragmentShader(), and UNDEFINED. Here is the call graph for this function: |
|
Definition at line 314 of file Renderer.cpp. References LOG_SUCCESS, removeShader(), shaders, and UNDEFINED. Referenced by Menu::unload(). Here is the call graph for this function: |
|
Definition at line 207 of file Renderer.cpp. References LOG_ERROR, LOG_SUCCESS, removeTexture(), TEXTURE_2D, TEXTURE_CUBEMAP, textures, and UNDEFINED. Referenced by MS_Material::clear(), Play::unload(), Menu::unload(), Join::unload(), Join::unloadGalaxies(), Menu::unloadMain(), and ObjLevel::~ObjLevel(). Here is the call graph for this function: |
|
Definition at line 436 of file Renderer.cpp. References removeVertexShader(), UNDEFINED, and vertexShaders. Here is the call graph for this function: |
|
Definition at line 396 of file Renderer.cpp. References Set< TYPE >::add(), fragmentShaders, Set< TYPE >::getCount(), and UNDEFINED. Referenced by addFragmentShader(). Here is the call graph for this function: |
|
Definition at line 299 of file Renderer.cpp. References Set< TYPE >::add(), Set< TYPE >::getCount(), shaders, and UNDEFINED. Referenced by addShader(). Here is the call graph for this function: |
|
Definition at line 188 of file Renderer.cpp. References Set< TYPE >::add(), Image::clear(), Set< TYPE >::getCount(), Texture::images, textures, and UNDEFINED. Referenced by addCubemap(), and addTexture(). Here is the call graph for this function: |
|
Definition at line 421 of file Renderer.cpp. References Set< TYPE >::add(), Set< TYPE >::getCount(), UNDEFINED, and vertexShaders. Referenced by addVertexShader(). Here is the call graph for this function: |
|
Definition at line 25 of file Renderer.cpp. References lockFlags. Referenced by MainApp::load(). |
|
Implemented in OpenGLRenderer. Referenced by deleteFragmentShader(). |
|
Implemented in OpenGLRenderer. Referenced by deleteShader(). |
|
Implemented in OpenGLRenderer. Referenced by deleteTexture(). |
|
Implemented in OpenGLRenderer. Referenced by deleteVertexShader(). |
|
Definition at line 80 of file Renderer.cpp. References ALL, BLENDING_NONE, BLENDMODE_ADD, LEQUAL, maxTextures, nNamedTextures, selectedBlendDest, selectedBlendMode, selectedBlendSrc, selectedDepthFunc, selectedMask, selectedShader, selectedTextures, SHADER_NONE, and TEXTURE_NONE. Referenced by apply(), and resetToDefaults(). |
|
Definition at line 59 of file Renderer.cpp. References ALL, BLENDING_NONE, BLENDMODE_ADD, currentBlendDest, currentBlendMode, currentBlendSrc, currentDepthFunc, currentMask, currentShader, currentTextures, currentTextureUnit, LEQUAL, maxTextures, reset(), SHADER_NONE, and TEXTURE_NONE. Referenced by OpenGLRenderer::init(). Here is the call graph for this function: |
|
|
Implemented in OpenGLRenderer. |
|
Definition at line 277 of file Renderer.h. References selectedDepthFunc. Referenced by Explosion::drawAndUpdate(), Menu::drawCreate(), Play::drawExplosions(), Menu::drawFrame(), Join::drawFrame(), Join::drawGalaxies(), Menu::drawJoin(), Menu::drawMain(), Play::drawParticleSystems(), Play::drawPlayer(), Menu::drawSettings(), and OpenGLFont::startTextMode(). |
|
Definition at line 293 of file Renderer.h. References selectedFragmentShader. |
|
Definition at line 289 of file Renderer.h. References selectedMask. Referenced by Play::drawAvatar(), Menu::drawCreate(), Play::drawExplosions(), Play::drawExtras(), Play::drawFrame(), Menu::drawFrame(), Menu::drawJoin(), Menu::drawLabel(), Join::drawLevels(), Play::drawLifebar(), Menu::drawMain(), Play::drawParticleSystems(), Play::drawPlayer(), Menu::drawQuad(), Join::drawQuad(), Menu::drawSelect(), Menu::drawSelection(), Menu::drawSettings(), and Play::drawShadow(). |
|
Definition at line 272 of file Renderer.h. References selectedShader. |
|
Definition at line 226 of file Renderer.h. References nNamedTextures, selectedTextureNames, and selectedTextures. |
|
Definition at line 262 of file Renderer.h. References selectedTextures. |
|
Definition at line 254 of file Renderer.h. References selectedTextures. |
|
Definition at line 247 of file Renderer.h. References selectedTextures. |
|
Definition at line 241 of file Renderer.h. References selectedTextures. |
|
Definition at line 236 of file Renderer.h. References selectedTextures. |
|
|
Definition at line 297 of file Renderer.h. References selectedVertexShader. |
|
Definition at line 32 of file Renderer.cpp. References lockFlags. |
|
Implemented in OpenGLRenderer. Referenced by addFragmentShader(). |
|
Implemented in OpenGLRenderer. Referenced by addVertexShader(). |
|
Definition at line 213 of file Renderer.h. Referenced by OpenGLRenderer::changeBlending(), and resetToDefaults(). |
|
Definition at line 211 of file Renderer.h. Referenced by OpenGLRenderer::changeBlending(), and resetToDefaults(). |
|
Definition at line 212 of file Renderer.h. Referenced by OpenGLRenderer::changeBlending(), and resetToDefaults(). |
|
Definition at line 210 of file Renderer.h. Referenced by OpenGLRenderer::changeDepthFunc(), and resetToDefaults(). |
|
Definition at line 220 of file Renderer.h. Referenced by OpenGLRenderer::changeFragmentShader(). |
|
Definition at line 214 of file Renderer.h. Referenced by OpenGLRenderer::changeMask(), and resetToDefaults(). |
|
|
Definition at line 201 of file Renderer.h. Referenced by OpenGLRenderer::changeTexture(), and resetToDefaults(). |
|
Definition at line 199 of file Renderer.h. Referenced by OpenGLRenderer::changeTexture(), OpenGLRenderer::changeTextureUnit(), and resetToDefaults(). |
|
Definition at line 219 of file Renderer.h. Referenced by OpenGLRenderer::changeVertexShader(). |
|
Definition at line 218 of file Renderer.h. Referenced by OpenGLRenderer::changeFragmentShader(), deleteFragmentShader(), and insertFragmentShader(). |
|
Definition at line 192 of file Renderer.h. Referenced by apply(), Menu::load(), lock(), Renderer(), Menu::unload(), and unlock(). |
|
Definition at line 198 of file Renderer.h. Referenced by apply(), OpenGLRenderer::init(), reset(), and resetToDefaults(). |
|
Definition at line 203 of file Renderer.h. Referenced by OpenGLRenderer::assignNamedTextures(), reset(), and setTexture(). |
|
Definition at line 213 of file Renderer.h. Referenced by apply(), reset(), and setBlending(). |
|
Definition at line 211 of file Renderer.h. Referenced by apply(), reset(), and setBlending(). |
|
Definition at line 212 of file Renderer.h. Referenced by apply(), reset(), and setBlending(). |
|
Definition at line 210 of file Renderer.h. Referenced by apply(), reset(), and setDepthFunc(). |
|
Definition at line 220 of file Renderer.h. Referenced by setFragmentShader(). |
|
Definition at line 214 of file Renderer.h. |
|
Definition at line 207 of file Renderer.h. Referenced by apply(), reset(), and setShader(). |
|
Definition at line 202 of file Renderer.h. Referenced by OpenGLRenderer::assignNamedTextures(), and setTexture(). |
|
Definition at line 200 of file Renderer.h. Referenced by apply(), reset(), setTexture(), and setTextures(). |
|
Definition at line 219 of file Renderer.h. Referenced by setVertexShader(). |
|
|
Definition at line 197 of file Renderer.h. Referenced by OpenGLRenderer::changeTexture(), deleteTexture(), and insertTexture(). |
|
Definition at line 217 of file Renderer.h. Referenced by OpenGLRenderer::changeVertexShader(), deleteVertexShader(), and insertVertexShader(). |