Commit 45cb3586 authored by Andreas Neu's avatar Andreas Neu
Browse files

Added method setTexSubImage2D within Texture.hh in order to support glTexSubImage2D.

parent a70c4d1b
......@@ -223,6 +223,27 @@ public:
mType,
_pData);
}
//! Set data for specific area within the texture
inline void setTexSubImage2D(
const GLvoid* _pData,
int _x,
int _y,
int _width,
int _height)
{
bind();
glTexSubImage2D(
mTarget,
0,
_x,
_y,
_width,
_height,
mFormat,
mType(),
_pData);
}
//! Generate mipmaps from the current base texture (i.e. the texture from level 0).
void generateMipmaps(void) const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment