CGVIS Utils
Loading...
Searching...
No Matches
GLTexture1D Class Reference

#include <GLTexture1D.h>

Public Member Functions

 GLTexture1D (GLint magFilter=GL_NEAREST, GLint minFilter=GL_NEAREST, GLint wrapX=GL_REPEAT)
 Create an empty GL_TEXTURE_1D with sampler parameters.
 GLTexture1D (const GLTexture1D &other)
 Copy‑construct and duplicate texture contents and parameters.
GLTexture1D & operator= (GLTexture1D other)
 Copy‑assign and duplicate texture contents and parameters.
 ~GLTexture1D ()
 Destroy and delete the GL texture name.
const GLuint getId () const
 Retrieve the OpenGL texture object name.
void setData (const std::vector< GLubyte > &data, uint32_t size, uint8_t componentCount=4)
 Upload interleaved unsigned‑byte data to the texture.

Constructor & Destructor Documentation

◆ GLTexture1D() [1/2]

GLTexture1D::GLTexture1D ( GLint magFilter = GL_NEAREST,
GLint minFilter = GL_NEAREST,
GLint wrapX = GL_REPEAT )

Create an empty GL_TEXTURE_1D with sampler parameters.

Parameters
magFilterGL magnification filter (e.g., GL_NEAREST or GL_LINEAR).
minFilterGL minification filter (e.g., GL_NEAREST or GL_LINEAR).
wrapXGL wrap mode for S (x) coordinate (e.g., GL_REPEAT).
Postcondition
A texture object is generated and the given parameters are applied.
Here is the caller graph for this function:

◆ GLTexture1D() [2/2]

GLTexture1D::GLTexture1D ( const GLTexture1D & other)

Copy‑construct and duplicate texture contents and parameters.

Here is the call graph for this function:

◆ ~GLTexture1D()

GLTexture1D::~GLTexture1D ( )

Destroy and delete the GL texture name.

Member Function Documentation

◆ getId()

const GLuint GLTexture1D::getId ( ) const

Retrieve the OpenGL texture object name.

Returns
GLuint of the managed GL_TEXTURE_1D.
Here is the caller graph for this function:

◆ operator=()

GLTexture1D & GLTexture1D::operator= ( GLTexture1D other)

Copy‑assign and duplicate texture contents and parameters.

Here is the call graph for this function:

◆ setData()

void GLTexture1D::setData ( const std::vector< GLubyte > & data,
uint32_t size,
uint8_t componentCount = 4 )

Upload interleaved unsigned‑byte data to the texture.

Parameters
dataPixel bytes, size must be componentCount * size.
sizeNumber of texels in x.
componentCountComponents per texel (1..4 → R/RG/RGB/RGBA).
Exceptions
GLExceptionif data.size() != componentCount*size.
Postcondition
Internal format/format/type are set according to componentCount and the texture storage is defined at level 0.
Here is the caller graph for this function:

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