#include <GLTexture.h>

Public Member Functions | |
| GLTexture () | |
| virtual | ~GLTexture () |
| virtual void | draw (bool force=false) |
| bool | create (Image &bitmap, bool mipMap=true) |
| bool | create (const void *data, GLint width, GLint height, GLint components, GLint alignment=4, GLenum format=GL_RGB, bool mipMap=true) |
| bool | create (GLint width, GLint height, GLenum format=GL_RGB) |
| bool | createBufferTexture (GLint width, GLint height, bool depthTex) |
| bool | replace (Image &bitmap, bool mipMap=true) |
| bool | textureValid () |
| GLenum | getTexType () |
| GLenum | getTexFormat () |
| GLuint | getTexName () |
| int | getWidth () |
| int | getHeight () |
Static Public Member Functions | |
| static unsigned int | getTextureSpace () |
| static unsigned int | getTextureSets () |
| static void | resetTextureSets () |
| static bool | validateSize (int size) |
Protected Member Functions | |
| bool | createTexture (const void *data, GLint width, GLint height, GLint components, GLint alignment, GLenum format, bool mipMap) |
| bool | createObject () |
Protected Attributes | |
| unsigned int | usedSpace_ |
| int | width_ |
| int | height_ |
| GLuint | texNum_ |
| GLenum | texType_ |
| GLenum | texFormat_ |
Static Protected Attributes | |
| static unsigned int | textureSpace_ = 0 |
| static unsigned int | textureSets_ = 0 |
Definition at line 28 of file GLTexture.h.
| GLTexture::GLTexture | ( | ) |
Definition at line 30 of file GLTexture.cpp.
| GLTexture::~GLTexture | ( | ) | [virtual] |
Definition at line 38 of file GLTexture.cpp.
References glDeleteTextures(), texNum_, textureSpace_, and usedSpace_.
| void GLTexture::draw | ( | bool | force = false |
) | [virtual] |
Implements GLTextureBase.
Definition at line 49 of file GLTexture.cpp.
References glBindTexture(), GLTextureBase::lastBind_, texNum_, textureSets_, and texType_.
Referenced by Landscape::actualDrawLandReflection(), Landscape::actualDrawLandShader(), Landscape::actualDrawLandTextured(), ImageModifier::addBitmap(), ScoreDialog::addLine(), DeformTextures::deformLandscape(), Lightning::draw(), WaterWaves::draw(), WallActionRenderer::draw(), ExplosionLaserBeamRenderer::draw(), Sun::draw(), SkyRoof::draw(), Wall::draw(), SoftwareMouse::draw(), GLWSelectorPart::draw(), GLWScorchedInfo::draw(), GLWImageList::draw(), GLWIcon::draw(), GLLenseFlare::draw(), ProgressDialog::draw(), TargetRendererImplTank::drawArrow(), SkyDome::drawBackdrop(), BackdropDialog::drawBackground(), GLWPlanView::drawBuoys(), GLWPlanView::drawCameraPointer(), BackdropDialog::drawFooter(), Landscape::drawGraphicalReflectionMap(), Landscape::drawGraphicalShadowMap(), TutorialDialog::drawHighlight(), GLMenuEntry::drawIcon(), NetworkSelectDialog::drawIcon(), TargetRendererImplTank::drawInfo(), ModelRendererTree::drawInternal(), SkyDome::drawLayers(), BackdropDialog::drawLogo(), GLWWindow::drawMaximizedWindow(), ModelRendererMesh::drawMesh(), GLWWindView::drawScene(), TargetRendererImpl::drawShield(), GLWPlanView::drawTanks(), GLWPlanView::drawTexture(), Water2Renderer::drawWaterNoShaders(), Landscape::generate(), GLWIcon::initFromXML(), ParticleRendererQuads::renderParticle(), replace(), GLSLProgram::set_gl_texture(), ShadowMap::setTexture(), and Landscape::updatePlanATexture().
| bool GLTexture::create | ( | Image & | bitmap, | |
| bool | mipMap = true | |||
| ) |
Definition at line 97 of file GLTexture.cpp.
References Image::getAlignment(), Image::getBits(), Image::getComponents(), Image::getHeight(), Image::getWidth(), GL_LUMINANCE, GL_RGB, and GL_RGBA.
Referenced by GLWDropDownColor::addColor(), GLWImageList::addDirectory(), ExplosionTextures::addTextureToSet(), ExplosionTextures::createTextures(), Wall::draw(), SoftwareMouse::draw(), GLWChannelView::draw(), GLWChannelText::draw(), ProgressDialog::draw(), TargetRendererImplTank::drawArrow(), BackdropDialog::drawBackground(), BackdropDialog::drawFooter(), TutorialDialog::drawHighlight(), GLMenuEntry::drawIcon(), ModelRendererTree::drawInternalPre(), BackdropDialog::drawLogo(), GLWPlanView::drawMap(), GLWWindow::drawMaximizedWindow(), TargetRendererImpl::drawShield(), Water2Renderer::generate(), Water2::generate(), Landscape::generate(), WaterWaves::generateWaves(), Accessory::getTexture(), TankAvatar::getTexture(), WallActionRenderer::init(), ExplosionLaserBeamRenderer::init(), GLLenseFlare::init(), TextureStore::loadTexture(), PlayerDialog::PlayerDialog(), ClientConnectionAcceptHandler::processMessage(), replace(), TankAvatar::setFromBuffer(), ProgressDialog::setIcon(), and ShadowMap::ShadowMap().
| bool GLTexture::create | ( | const void * | data, | |
| GLint | width, | |||
| GLint | height, | |||
| GLint | components, | |||
| GLint | alignment = 4, |
|||
| GLenum | format = GL_RGB, |
|||
| bool | mipMap = true | |||
| ) |
Definition at line 132 of file GLTexture.cpp.
References createObject(), createTexture(), S3D::dialogExit(), S3D::formatStringBuffer(), GL_TEXTURE_1D, GL_TEXTURE_2D, glBindTexture(), texNum_, texType_, and validateSize().
| bool GLTexture::create | ( | GLint | width, | |
| GLint | height, | |||
| GLenum | format = GL_RGB | |||
| ) |
Definition at line 242 of file GLTexture.cpp.
References createObject(), GL_CLAMP_TO_EDGE, GL_LINEAR, GL_RGBA, GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, GL_UNSIGNED_BYTE, glBindTexture(), glTexImage2D(), glTexParameteri(), height_, NULL, texFormat_, texNum_, texType_, and width_.
| bool GLTexture::createBufferTexture | ( | GLint | width, | |
| GLint | height, | |||
| bool | depthTex | |||
| ) |
Definition at line 266 of file GLTexture.cpp.
References createObject(), GL_CLAMP_TO_EDGE, GL_COMPARE_R_TO_TEXTURE_ARB, GL_DEPTH_BITS, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT16_ARB, GL_DEPTH_COMPONENT24_ARB, GL_LEQUAL, GL_LINEAR, GL_RGB, GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC_ARB, GL_TEXTURE_COMPARE_MODE_ARB, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, GL_UNSIGNED_BYTE, GL_UNSIGNED_INT, glBindTexture(), glGetIntegerv(), glTexImage2D(), glTexParameteri(), height_, NULL, texFormat_, texNum_, texType_, and width_.
Referenced by Water2Renderer::generate().
| bool GLTexture::replace | ( | Image & | bitmap, | |
| bool | mipMap = true | |||
| ) |
Definition at line 59 of file GLTexture.cpp.
References create(), draw(), Image::getBits(), Image::getComponents(), Image::getHeight(), GLStateExtension::getNoTexSubImage(), Image::getWidth(), GL_LUMINANCE, GL_RGB, GL_RGBA, GL_UNPACK_ROW_LENGTH, GL_UNSIGNED_BYTE, glDeleteTextures(), glPixelStorei(), glTexSubImage2D(), height_, texNum_, textureValid(), texType_, and width_.
Referenced by BackdropDialog::capture(), Water2Renderer::draw(), Landscape::drawShadows(), Water::generate(), Sun::generate(), SkyDome::generate(), Landscape::generate(), MovementMap::limitTexture(), MovementMap::movementTexture(), ComsSyncCheckMessage::readMessage(), Landscape::restoreLandscapeTexture(), InfoMap::showGrid(), InfoMap::showHeightBands(), Landscape::updatePlanATexture(), and Landscape::updatePlanTexture().
| bool GLTexture::textureValid | ( | ) |
Definition at line 311 of file GLTexture.cpp.
References GL_TRUE, glIsTexture(), and texNum_.
Referenced by createObject(), ExplosionTextures::createTextures(), ProgressDialog::draw(), TutorialDialog::drawHighlight(), WallActionRenderer::init(), and replace().
| GLenum GLTexture::getTexType | ( | ) | [inline] |
| GLenum GLTexture::getTexFormat | ( | ) | [inline] |
| GLuint GLTexture::getTexName | ( | ) | [inline] |
Definition at line 57 of file GLTexture.h.
References texNum_.
Referenced by BackdropDialog::capture(), and GLFrameBufferObject::create().
| int GLTexture::getWidth | ( | ) | [inline] |
Definition at line 58 of file GLTexture.h.
References width_.
Referenced by GLFrameBufferObject::bind(), BackdropDialog::capture(), and GLFrameBufferObject::create().
| int GLTexture::getHeight | ( | ) | [inline] |
Definition at line 59 of file GLTexture.h.
References height_.
Referenced by GLFrameBufferObject::bind(), BackdropDialog::capture(), and GLFrameBufferObject::create().
| static unsigned int GLTexture::getTextureSpace | ( | ) | [inline, static] |
Definition at line 61 of file GLTexture.h.
References textureSpace_.
Referenced by TankMenus::showTextureDetails().
| static unsigned int GLTexture::getTextureSets | ( | ) | [inline, static] |
Definition at line 62 of file GLTexture.h.
References textureSets_.
Referenced by FrameTimer::draw().
| static void GLTexture::resetTextureSets | ( | ) | [inline, static] |
Definition at line 63 of file GLTexture.h.
References textureSets_.
Referenced by FrameTimer::draw().
| bool GLTexture::validateSize | ( | int | size | ) | [static] |
| bool GLTexture::createTexture | ( | const void * | data, | |
| GLint | width, | |||
| GLint | height, | |||
| GLint | components, | |||
| GLint | alignment, | |||
| GLenum | format, | |||
| bool | mipMap | |||
| ) | [protected] |
Definition at line 162 of file GLTexture.cpp.
References GL_GENERATE_MIPMAP_SGIS, GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR, GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER, GL_TRUE, GL_UNPACK_ALIGNMENT, GL_UNPACK_ROW_LENGTH, GL_UNPACK_SKIP_PIXELS, GL_UNPACK_SKIP_ROWS, GL_UNSIGNED_BYTE, glPixelStorei(), glTexImage1D(), glTexImage2D(), glTexParameteri(), GLStateExtension::hasHardwareMipmaps(), height_, texFormat_, textureSpace_, usedSpace_, and width_.
Referenced by create().
| bool GLTexture::createObject | ( | ) | [protected] |
Definition at line 114 of file GLTexture.cpp.
References glGenTextures(), glPrioritizeTextures(), priority, texNum_, and textureValid().
Referenced by create(), and createBufferTexture().
unsigned int GLTexture::textureSpace_ = 0 [static, protected] |
Definition at line 67 of file GLTexture.h.
Referenced by createTexture(), getTextureSpace(), and ~GLTexture().
unsigned int GLTexture::textureSets_ = 0 [static, protected] |
Definition at line 68 of file GLTexture.h.
Referenced by draw(), getTextureSets(), and resetTextureSets().
unsigned int GLTexture::usedSpace_ [protected] |
int GLTexture::width_ [protected] |
Definition at line 70 of file GLTexture.h.
Referenced by create(), createBufferTexture(), createTexture(), getWidth(), and replace().
int GLTexture::height_ [protected] |
Definition at line 70 of file GLTexture.h.
Referenced by create(), createBufferTexture(), createTexture(), getHeight(), and replace().
GLuint GLTexture::texNum_ [protected] |
Definition at line 71 of file GLTexture.h.
Referenced by create(), createBufferTexture(), createObject(), draw(), getTexName(), replace(), textureValid(), and ~GLTexture().
GLenum GLTexture::texType_ [protected] |
Definition at line 72 of file GLTexture.h.
Referenced by create(), createBufferTexture(), draw(), getTexType(), and replace().
GLenum GLTexture::texFormat_ [protected] |
Definition at line 73 of file GLTexture.h.
Referenced by create(), createBufferTexture(), createTexture(), and getTexFormat().
1.5.3