2D texture core.
More...
#include "Texture2DCore.h"
2D texture core.
Definition at line 39 of file Texture2DCore.h.
◆ Texture2DCore()
scg::Texture2DCore::Texture2DCore |
( |
| ) |
|
◆ ~Texture2DCore()
virtual scg::Texture2DCore::~Texture2DCore |
( |
| ) |
|
|
virtual |
◆ create()
◆ render()
virtual void scg::Texture2DCore::render |
( |
RenderState * |
renderState | ) |
|
|
virtual |
Render core, i.e., bind texture and post-multiply current texture matrix by local texture matrix.
Reimplemented from scg::TextureCore.
Reimplemented in scg::BumpMapCore.
◆ renderPost()
virtual void scg::Texture2DCore::renderPost |
( |
RenderState * |
renderState | ) |
|
|
virtual |
Render core after traversing sub-tree, i.e., restore previous texture matrix and bind previous texture.
Reimplemented from scg::TextureCore.
Reimplemented in scg::BumpMapCore.
◆ rotate2D()
void scg::Texture2DCore::rotate2D |
( |
GLfloat |
angleDeg | ) |
|
Rotate texture around (0,0,1) axis (post-multiply local texture matrix by transformation).
- Parameters
-
angleDeg | rotation angle (degrees) |
◆ scale2D()
void scg::Texture2DCore::scale2D |
( |
glm::vec2 |
scaling | ) |
|
Scale texture in s and t direction (post-multiply local texture matrix by transformation).
- Parameters
-
scaling | scaling factors in s and t direction |
◆ setTexture()
void scg::Texture2DCore::setTexture |
( |
GLsizei |
width, |
|
|
GLsizei |
height, |
|
|
const unsigned char * |
rgbaData, |
|
|
GLenum |
wrapModeS, |
|
|
GLenum |
wrapModeT, |
|
|
GLenum |
minFilter, |
|
|
GLenum |
magFilter |
|
) |
| |
Create texture from RGBA image with given parameters. If minFilter is GL_*_MIPMAP_* (see below), a mipmap is created from the given image.
- Parameters
-
width | texture width |
height | texture height |
rgbaData | array of RGBA values |
wrapModeS | GL_CLAMP, GL_CLAMP_TO_BORDER, GL_CLAMP_TO_EDGE, GL_MIRRORED_REPEAT, or GL_REPEAT |
wrapModeT | see wrapModeS |
minFilter | GL_NEAREST, GL_LINEAR,
GL_NEAREST_MIPMAP_NEAREST, GL_LINEAR_MIPMAP_NEAREST, GL_NEAREST_MIPMAP_LINEAR, or GL_LINEAR_MIPMAP_LINEAR |
magFilter | GL_NEAREST or GL_LINEAR |
The documentation for this class was generated from the following file: