CGVIS Utils
Loading...
Searching...
No Matches
GLTexture1D.h
Go to the documentation of this file.
1#ifndef __EMSCRIPTEN__
2#pragma once
3
4#include <vector>
5
6#include "GLEnv.h"
7
17public:
25 GLTexture1D(GLint magFilter=GL_NEAREST, GLint minFilter=GL_NEAREST,
26 GLint wrapX=GL_REPEAT);
27
29 GLTexture1D(const GLTexture1D& other);
32
35
40 const GLuint getId() const;
41
51 void setData(const std::vector<GLubyte>& data, uint32_t size,
52 uint8_t componentCount=4);
53
54private:
55 GLuint id;
56 GLint internalformat;
57 GLenum format;
58 GLenum type;
59
60 GLint magFilter;
61 GLint minFilter;
62 GLint wrapX;
63 std::vector<GLubyte> data;
64 uint32_t size;
65 uint8_t componentCount;
66};
67#endif
Cross‑platform OpenGL window/context helper for desktop and Emscripten.
GLTexture1D(GLint magFilter=GL_NEAREST, GLint minFilter=GL_NEAREST, GLint wrapX=GL_REPEAT)
Create an empty GL_TEXTURE_1D with sampler parameters.
Definition GLTexture1D.cpp:8
void setData(const std::vector< GLubyte > &data, uint32_t size, uint8_t componentCount=4)
Upload interleaved unsigned‑byte data to the texture.
Definition GLTexture1D.cpp:55
const GLuint getId() const
Retrieve the OpenGL texture object name.
Definition GLTexture1D.cpp:51
GLTexture1D & operator=(GLTexture1D other)
Copy‑assign and duplicate texture contents and parameters.
Definition GLTexture1D.cpp:32
~GLTexture1D()
Destroy and delete the GL texture name.
Definition GLTexture1D.cpp:46