openMSX
|
Most basic/generic texture: only contains a texture ID. More...
#include <GLUtil.hh>
Public Member Functions | |
Texture () | |
Default constructor, allocate a openGL texture name. More... | |
Texture (Texture &&other) | |
Move constructor and assignment. More... | |
Texture & | operator= (Texture &&other) |
~Texture () | |
Release openGL texture name. More... | |
void | bind () |
Makes this texture the active GL texture. More... | |
void | enableInterpolation () |
Enables bilinear interpolation for this texture. More... | |
void | disableInterpolation () |
Disables bilinear interpolation for this texture and uses nearest neighbour instead. More... | |
void | setWrapMode (bool wrap) |
void | drawRect (GLfloat tx, GLfloat ty, GLfloat twidth, GLfloat theight, GLint x, GLint y, GLint width, GLint height) |
Draws this texture as a rectangle on the frame buffer. More... | |
Protected Attributes | |
GLuint | textureId |
Friends | |
class | FrameBufferObject |
Most basic/generic texture: only contains a texture ID.
Current implementation always assumes 2D textures.
openmsx::Texture::Texture | ( | ) |
Default constructor, allocate a openGL texture name.
Definition at line 38 of file GLUtil.cc.
References disableInterpolation(), and textureId.
|
inline |
openmsx::Texture::~Texture | ( | ) |
|
inline |
Makes this texture the active GL texture.
The other methods of this class and its subclasses will implicitly bind the texture, so you only need this method to explicitly bind this texture for use in GL function calls outside of this class.
Definition at line 61 of file GLUtil.hh.
References textureId.
Referenced by disableInterpolation(), openmsx::GLScaler::drawMultiTex(), drawRect(), enableInterpolation(), openmsx::GLHQLiteScaler::GLHQLiteScaler(), openmsx::GLHQScaler::GLHQScaler(), openmsx::GLPostProcessor::GLPostProcessor(), openmsx::GLPostProcessor::paint(), openmsx::ColorTexture::resize(), openmsx::GLSaIScaler::scaleImage(), openmsx::GLScaleNxScaler::scaleImage(), openmsx::GLHQScaler::scaleImage(), openmsx::GLHQLiteScaler::scaleImage(), openmsx::GLRGBScaler::scaleImage(), openmsx::GLSimpleScaler::scaleImage(), openmsx::GLTVScaler::scaleImage(), openmsx::GLScaler::scaleImage(), openmsx::SDLGLOffScreenSurface::SDLGLOffScreenSurface(), setWrapMode(), openmsx::LuminanceTexture::updateImage(), openmsx::GLHQScaler::uploadBlock(), and openmsx::GLHQLiteScaler::uploadBlock().
void openmsx::Texture::disableInterpolation | ( | ) |
Disables bilinear interpolation for this texture and uses nearest neighbour instead.
Definition at line 56 of file GLUtil.cc.
References bind().
Referenced by openmsx::GLHQLiteScaler::scaleImage(), openmsx::GLRGBScaler::scaleImage(), openmsx::GLSimpleScaler::scaleImage(), and Texture().
void openmsx::Texture::drawRect | ( | GLfloat | tx, |
GLfloat | ty, | ||
GLfloat | twidth, | ||
GLfloat | theight, | ||
GLint | x, | ||
GLint | y, | ||
GLint | width, | ||
GLint | height | ||
) |
void openmsx::Texture::enableInterpolation | ( | ) |
Enables bilinear interpolation for this texture.
Definition at line 49 of file GLUtil.cc.
References bind().
Referenced by openmsx::GLPostProcessor::GLPostProcessor(), openmsx::GLHQLiteScaler::scaleImage(), openmsx::GLSimpleScaler::scaleImage(), openmsx::GLRGBScaler::scaleImage(), and openmsx::SDLGLOffScreenSurface::SDLGLOffScreenSurface().
void openmsx::Texture::setWrapMode | ( | bool | wrap | ) |
Definition at line 63 of file GLUtil.cc.
References bind().
Referenced by openmsx::GLHQLiteScaler::GLHQLiteScaler(), openmsx::GLHQScaler::GLHQScaler(), openmsx::GLPostProcessor::GLPostProcessor(), and openmsx::SDLGLOffScreenSurface::SDLGLOffScreenSurface().
|
friend |
|
protected |
Definition at line 82 of file GLUtil.hh.
Referenced by bind(), openmsx::FrameBufferObject::FrameBufferObject(), operator=(), Texture(), and ~Texture().