#include <ShadowMap.h>
Public Member Functions | |
| ShadowMap () | |
| virtual | ~ShadowMap () |
| void | setTexture () |
| void | addSquare (float x, float y, float w, float opacity=1.0f) |
| void | addCircle (float sx, float sy, float sw, float opacity=1.0f) |
| bool | shouldAddShadow () |
| unsigned int | getShadowCount () |
Protected Member Functions | |
| void | addShadow (float sx, float sy, float sw, float opacity, bool circle) |
Protected Attributes | |
| unsigned int | shadowCount_ |
| GLTexture | shadowTexture_ |
| GLubyte * | shadowBytes_ |
| GLint | size_ |
| GLint | sizeSq_ |
Definition at line 26 of file ShadowMap.h.
| ShadowMap::ShadowMap | ( | ) |
Definition at line 30 of file ShadowMap.cpp.
References GLTexture::create(), GL_LUMINANCE, shadowBytes_, shadowTexture_, size_, and sizeSq_.
| ShadowMap::~ShadowMap | ( | ) | [virtual] |
| void ShadowMap::setTexture | ( | ) |
Definition at line 42 of file ShadowMap.cpp.
References GLTexture::draw(), GLStateExtension::getNoTexSubImage(), GL_LUMINANCE, GL_TEXTURE_2D, GL_UNSIGNED_BYTE, glTexSubImage2D(), shadowBytes_, shadowCount_, shadowTexture_, size_, and sizeSq_.
Referenced by Landscape::actualDrawLandTextured().
| void ShadowMap::addSquare | ( | float | x, | |
| float | y, | |||
| float | w, | |||
| float | opacity = 1.0f | |||
| ) |
| void ShadowMap::addCircle | ( | float | sx, | |
| float | sy, | |||
| float | sw, | |||
| float | opacity = 1.0f | |||
| ) |
Definition at line 71 of file ShadowMap.cpp.
References addShadow().
Referenced by TargetRendererImplTarget::render(), and TargetRendererImplTank::render().
| bool ShadowMap::shouldAddShadow | ( | ) |
Definition at line 76 of file ShadowMap.cpp.
References GLStateExtension::getNoTexSubImage(), GLStateExtension::hasHardwareShadows(), GLStateExtension::hasMultiTex(), and OptionsDisplay::instance().
Referenced by addShadow(), TargetRendererImplTarget::render(), and TargetRendererImplTank::render().
| unsigned int ShadowMap::getShadowCount | ( | ) | [inline] |
| void ShadowMap::addShadow | ( | float | sx, | |
| float | sy, | |||
| float | sw, | |||
| float | opacity, | |||
| bool | circle | |||
| ) | [protected] |
Definition at line 85 of file ShadowMap.cpp.
References LandscapeMaps::getGroundMaps(), GroundMaps::getLandscapeHeight(), ScorchedContext::getLandscapeMaps(), GroundMaps::getLandscapeWidth(), ScorchedClient::instance(), int(), MAX, MIN, shadowBytes_, shadowCount_, shouldAddShadow(), and size_.
Referenced by addCircle(), and addSquare().
unsigned int ShadowMap::shadowCount_ [protected] |
Definition at line 41 of file ShadowMap.h.
Referenced by addShadow(), getShadowCount(), and setTexture().
GLTexture ShadowMap::shadowTexture_ [protected] |
GLubyte* ShadowMap::shadowBytes_ [protected] |
Definition at line 43 of file ShadowMap.h.
Referenced by addShadow(), setTexture(), ShadowMap(), and ~ShadowMap().
GLint ShadowMap::size_ [protected] |
Definition at line 44 of file ShadowMap.h.
Referenced by addShadow(), setTexture(), and ShadowMap().
GLint ShadowMap::sizeSq_ [protected] |
1.5.3