openMSX
Public Member Functions | Protected Attributes | Friends | List of all members
openmsx::Texture Class Reference

Most basic/generic texture: only contains a texture ID. More...

#include <GLUtil.hh>

Inheritance diagram for openmsx::Texture:
Inheritance graph
[legend]

Public Member Functions

 Texture ()
 Default constructor, allocate a openGL texture name. More...
 
 Texture (Texture &&other)
 Move constructor and assignment. More...
 
Textureoperator= (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
 

Detailed Description

Most basic/generic texture: only contains a texture ID.

Current implementation always assumes 2D textures.

Definition at line 36 of file GLUtil.hh.

Constructor & Destructor Documentation

openmsx::Texture::Texture ( )

Default constructor, allocate a openGL texture name.

Definition at line 38 of file GLUtil.cc.

References disableInterpolation(), and textureId.

openmsx::Texture::Texture ( Texture &&  other)
inline

Move constructor and assignment.

Definition at line 43 of file GLUtil.hh.

openmsx::Texture::~Texture ( )

Release openGL texture name.

Definition at line 44 of file GLUtil.cc.

References textureId.

Member Function Documentation

void openmsx::Texture::bind ( )
inline
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 
)

Draws this texture as a rectangle on the frame buffer.

Definition at line 72 of file GLUtil.cc.

References bind().

void openmsx::Texture::enableInterpolation ( )
Texture& openmsx::Texture::operator= ( Texture &&  other)
inline

Definition at line 48 of file GLUtil.hh.

References textureId.

void openmsx::Texture::setWrapMode ( bool  wrap)

Friends And Related Function Documentation

friend class FrameBufferObject
friend

Definition at line 89 of file GLUtil.hh.

Member Data Documentation

GLuint openmsx::Texture::textureId
protected

The documentation for this class was generated from the following files: