#include <OpenGLRenderer.h>
Inherits Renderer.
Inheritance diagram for OpenGLRenderer:
Public Member Functions | |
OpenGLRenderer () | |
void | init () |
void | setDefaults () |
void | changeDepthFunc (const int depthFunc) |
void | changeBlending (const int src, const int dest, const int blendMode) |
void | changeMask (const int mask) |
void | changeTextureUnit (const int tex) |
void | changeTexture (const TextureID textureID) |
void | assignNamedTextures () |
void | changeShader (const ShaderID shader) |
void | changeShaderConstant1f (const char *name, const float constant) |
void | changeShaderConstant2f (const char *name, const Vec2 &constant) |
void | changeShaderConstant3f (const char *name, const Vec3 &constant) |
void | changeShaderConstant4f (const char *name, const Vec4 &constant) |
void | changeFragmentShader (const ShaderID shader) |
void | changeVertexShader (const ShaderID shader) |
Protected Member Functions | |
bool | createTexture (Texture &texture) |
void | removeTexture (Texture &texture) |
bool | createShader (Shader &shader, const char *vertexShaderText, const char *fragmentShaderText) |
void | removeShader (Shader &shader) |
void | createFragmentShader (FragmentShader &fragmentShader) |
void | removeFragmentShader (FragmentShader &fragmentShader) |
void | uploadFragmentShader (FragmentShader &fragmentShader) |
void | createVertexShader (VertexShader &vertexShader) |
void | removeVertexShader (VertexShader &vertexShader) |
void | uploadVertexShader (VertexShader &vertexShader) |
Static Protected Attributes | |
static GLenum | targets [] = { GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP_ARB} |
Author: Petter Alstermark, petter@alstermark.com
Definition at line 13 of file OpenGLRenderer.h.
|
Definition at line 40 of file OpenGLRenderer.cpp. References init(). Here is the call graph for this function: |
|
Implements Renderer. Definition at line 224 of file OpenGLRenderer.cpp. References Renderer::currentShader, glGetUniformLocationARB, glUniform1iARB, Renderer::nNamedTextures, Renderer::selectedTextureNames, SHADER_NONE, and Renderer::shaders. |
|
Definition at line 94 of file OpenGLRenderer.cpp. References BLENDING_NONE, Renderer::currentBlendDest, Renderer::currentBlendMode, Renderer::currentBlendSrc, and glBlendEquationEXT. |
|
Implements Renderer. Definition at line 77 of file OpenGLRenderer.cpp. References Renderer::currentDepthFunc, and DEPTH_NONE. |
|
else if (fragmentShaders[shader].type == GL_FRAGMENT_SHADER_ATI) { glBindFragmentShaderATI(fragmentShaders[shader].shaderID); } else if (fragmentShaders[shader].type == GL_REGISTER_COMBINERS_NV) { glCallList(fragmentShaders[shader].shaderID); Implements Renderer. Definition at line 424 of file OpenGLRenderer.cpp. References Renderer::currentFragmentShader, Renderer::fragmentShaders, GL_FRAGMENT_PROGRAM_ARB, glBindProgramARB, and SHADER_NONE. |
|
Implements Renderer. Definition at line 116 of file OpenGLRenderer.cpp. References ALPHA, BLUE, COLOR, Renderer::currentMask, DEPTH, GREEN, and RED. |
|
Implements Renderer. Definition at line 305 of file OpenGLRenderer.cpp. References Renderer::currentShader, glUseProgramObjectARB, SHADER_NONE, and Renderer::shaders. |
|
Implements Renderer. Definition at line 319 of file OpenGLRenderer.cpp. References Renderer::currentShader, glGetUniformLocationARB, glUniform1fARB, SHADER_NONE, and Renderer::shaders. |
|
Implements Renderer. Definition at line 329 of file OpenGLRenderer.cpp. References Renderer::currentShader, glGetUniformLocationARB, glUniform2fARB, SHADER_NONE, Renderer::shaders, Vec2::x, and Vec2::y. |
|
Implements Renderer. Definition at line 340 of file OpenGLRenderer.cpp. References Renderer::currentShader, glGetUniformLocationARB, glUniform3fARB, SHADER_NONE, Renderer::shaders, Vec3::x, Vec3::y, and Vec3::z. |
|
Implements Renderer. Definition at line 351 of file OpenGLRenderer.cpp. References Renderer::currentShader, glGetUniformLocationARB, glUniform4fARB, SHADER_NONE, Renderer::shaders, Vec4::w, Vec4::x, Vec4::y, and Vec4::z. |
|
if (textureID == TEXTURE_NONE) { glDisable(GL_TEXTURE_2D); } else { glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, textures[textureID].textureID); Implements Renderer. Definition at line 187 of file OpenGLRenderer.cpp. References Renderer::currentTextures, Renderer::currentTextureUnit, targets, TEXTURE_NONE, and Renderer::textures. |
|
Implements Renderer. Definition at line 179 of file OpenGLRenderer.cpp. References Renderer::currentTextureUnit, GL_TEXTURE0_ARB, and glActiveTextureARB. |
|
Implements Renderer. Definition at line 456 of file OpenGLRenderer.cpp. References Renderer::currentVertexShader, GL_VERTEX_PROGRAM_ARB, glBindProgramARB, SHADER_NONE, and Renderer::vertexShaders. |
|
else Implements Renderer. Definition at line 363 of file OpenGLRenderer.cpp. References GL_FRAGMENT_PROGRAM_ARB, glBindProgramARB, glGenProgramsARB, and FragmentShader::shaderID. |
|
Implements Renderer. Definition at line 236 of file OpenGLRenderer.cpp. References Shader::fragmentShader, GL_FRAGMENT_SHADER_ARB, GL_OBJECT_COMPILE_STATUS_ARB, GL_OBJECT_LINK_STATUS_ARB, GL_VERTEX_SHADER_ARB, glAttachObjectARB, glCompileShaderARB, glCreateProgramObjectARB, glCreateShaderObjectARB, glGetInfoLogARB, glGetObjectParameterivARB, glLinkProgramARB, glShaderSourceARB, LOG_ERROR, Shader::programObj, removeShader(), and Shader::vertexShader. Here is the call graph for this function: |
|
Implements Renderer. Definition at line 131 of file OpenGLRenderer.cpp. References Texture::clampS, Texture::clampT, Image::getData(), Image::getFormat(), Image::getHeight(), Image::getWidth(), GL_CLAMP_TO_EDGE_EXT, GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, Texture::images, targets, TEXTURE_2D, TEXTURE_CUBEMAP, Texture::textureID, and Texture::textureKind. Here is the call graph for this function: |
|
Implements Renderer. Definition at line 402 of file OpenGLRenderer.cpp. References GL_VERTEX_PROGRAM_ARB, glBindProgramARB, glGenProgramsARB, and VertexShader::shaderID. |
|
Definition at line 47 of file OpenGLRenderer.cpp. References GL_ARB_multitexture_supported, GL_MAX_TEXTURE_UNITS_ARB, MAX_TEXTURES, Renderer::maxTextures, Renderer::resetToDefaults(), and setDefaults(). Referenced by OpenGLRenderer(). Here is the call graph for this function: |
|
Implements Renderer. Definition at line 380 of file OpenGLRenderer.cpp. References GL_FRAGMENT_PROGRAM_ARB, glDeleteProgramsARB, FragmentShader::shaderID, and FragmentShader::type. |
|
Implements Renderer. Definition at line 296 of file OpenGLRenderer.cpp. References Shader::fragmentShader, glDeleteObjectARB, Shader::programObj, and Shader::vertexShader. Referenced by createShader(). |
|
Implements Renderer. Definition at line 172 of file OpenGLRenderer.cpp. References Texture::textureID. |
|
Implements Renderer. Definition at line 410 of file OpenGLRenderer.cpp. References glDeleteProgramsARB, and VertexShader::shaderID. |
|
Implements Renderer. Definition at line 63 of file OpenGLRenderer.cpp. Referenced by init(). |
|
Implements Renderer. Definition at line 395 of file OpenGLRenderer.cpp. References GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, glProgramStringARB, FragmentShader::length, and FragmentShader::program. |
|
Implements Renderer. Definition at line 417 of file OpenGLRenderer.cpp. References GL_PROGRAM_FORMAT_ASCII_ARB, GL_VERTEX_PROGRAM_ARB, glProgramStringARB, VertexShader::length, and VertexShader::program. |
|
Definition at line 38 of file OpenGLRenderer.cpp. Referenced by changeTexture(), and createTexture(). |