2D bump map core storing a texture (optional) and a normal map.
More...
#include "BumpMapCore.h"
|
| BumpMapCore () |
|
virtual | ~BumpMapCore () |
|
void | setNormalMap (GLsizei width, GLsizei height, const unsigned char *rgbaData, GLenum wrapModeS, GLenum wrapModeT, GLenum minFilter, GLenum magFilter) |
|
virtual void | render (RenderState *renderState) |
|
virtual void | renderPost (RenderState *renderState) |
|
| Texture2DCore () |
|
virtual | ~Texture2DCore () |
|
void | setTexture (GLsizei width, GLsizei height, const unsigned char *rgbaData, GLenum wrapModeS, GLenum wrapModeT, GLenum minFilter, GLenum magFilter) |
|
void | rotate2D (GLfloat angleDeg) |
|
void | scale2D (glm::vec2 scaling) |
|
| TextureCore () |
|
virtual | ~TextureCore ()=0 |
|
TextureCore * | rotate (GLfloat angleDeg, glm::vec3 axis) |
|
TextureCore * | scale (glm::vec3 scaling) |
|
TextureCore * | setMatrix (glm::mat4 matrix) |
|
| Core () |
|
virtual | ~Core ()=0 |
|
2D bump map core storing a texture (optional) and a normal map.
Definition at line 37 of file BumpMapCore.h.
◆ BumpMapCore()
scg::BumpMapCore::BumpMapCore |
( |
| ) |
|
◆ ~BumpMapCore()
virtual scg::BumpMapCore::~BumpMapCore |
( |
| ) |
|
|
virtual |
◆ create()
◆ render()
virtual void scg::BumpMapCore::render |
( |
RenderState * |
renderState | ) |
|
|
virtual |
Render core, i.e., bind texture and normal map, and post-multiply current texture matrix by local texture matrix.
Reimplemented from scg::Texture2DCore.
◆ renderPost()
virtual void scg::BumpMapCore::renderPost |
( |
RenderState * |
renderState | ) |
|
|
virtual |
Render core after traversing sub-tree, i.e., restore previous texture matrix and bind previous texture and normal map.
Reimplemented from scg::Texture2DCore.
◆ setNormalMap()
void scg::BumpMapCore::setNormalMap |
( |
GLsizei |
width, |
|
|
GLsizei |
height, |
|
|
const unsigned char * |
rgbaData, |
|
|
GLenum |
wrapModeS, |
|
|
GLenum |
wrapModeT, |
|
|
GLenum |
minFilter, |
|
|
GLenum |
magFilter |
|
) |
| |
Create normal map from RGBA image with given parameters. If minFilter is GL_*_MIPMAP_* (see below), a mipmap is created from the given image.
- Parameters
-
width | normal map width |
height | normal map 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 |
◆ texNormal_
GLuint scg::BumpMapCore::texNormal_ |
|
protected |
◆ texNormalOld_
GLint scg::BumpMapCore::texNormalOld_ |
|
protected |
The documentation for this class was generated from the following file: