openMSX
Public Member Functions | List of all members
gl::ColorTexture Class Reference

#include <GLUtil.hh>

Inheritance diagram for gl::ColorTexture:
Inheritance graph
[legend]
Collaboration diagram for gl::ColorTexture:
Collaboration graph
[legend]

Public Member Functions

 ColorTexture ()=default
 Default constructor, zero-sized texture.
 
 ColorTexture (GLsizei width, GLsizei height)
 Create color texture with given size.
 
void resize (GLsizei width, GLsizei height)
 
GLsizei getWidth () const
 
GLsizei getHeight () const
 
- Public Member Functions inherited from gl::Texture
 Texture (const Texture &)=delete
 
Textureoperator= (const Texture &)=delete
 
 Texture (bool interpolation=false, bool wrap=false)
 Allocate a openGL texture name and enable/disable interpolation.
 
 Texture (Null)
 Create null-handle (not yet allocate an openGL handle).
 
 ~Texture ()
 Release openGL texture name.
 
 Texture (Texture &&other) noexcept
 Move constructor and assignment.
 
Textureoperator= (Texture &&other) noexcept
 
void allocate ()
 Allocate an openGL texture name.
 
void reset ()
 Release openGL texture name.
 
GLuint get () const
 Returns the underlying openGL handler id.
 
void * getImGui () const
 Return as a 'void*' (needed for 'Dear ImGui').
 
void bind () const
 Makes this texture the active GL texture.
 
void setInterpolation (bool interpolation)
 Enable/disable bilinear interpolation for this texture.
 
void setWrapMode (bool wrap)
 

Additional Inherited Members

- Protected Attributes inherited from gl::Texture
GLuint textureId
 

Detailed Description

Definition at line 101 of file GLUtil.hh.

Constructor & Destructor Documentation

◆ ColorTexture() [1/2]

gl::ColorTexture::ColorTexture ( )
default

Default constructor, zero-sized texture.

◆ ColorTexture() [2/2]

gl::ColorTexture::ColorTexture ( GLsizei  width,
GLsizei  height 
)

Create color texture with given size.

Initial content is undefined.

Definition at line 81 of file GLUtil.cc.

References resize().

Member Function Documentation

◆ getHeight()

GLsizei gl::ColorTexture::getHeight ( ) const
inline

Definition at line 114 of file GLUtil.hh.

Referenced by openmsx::GLScaler::execute(), and openmsx::GLHQScaler::scaleImage().

◆ getWidth()

GLsizei gl::ColorTexture::getWidth ( ) const
inline

Definition at line 113 of file GLUtil.hh.

◆ resize()

void gl::ColorTexture::resize ( GLsizei  width,
GLsizei  height 
)

Definition at line 86 of file GLUtil.cc.

References gl::Texture::bind().

Referenced by ColorTexture().


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