Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ACGL
acgl
Commits
30b2db11
Commit
30b2db11
authored
May 23, 2013
by
Robert Menzel
Browse files
added assert and more comments
parent
b1f76d43
Changes
2
Show whitespace changes
Inline
Side-by-side
include/ACGL/OpenGL/Data/TextureData.hh
View file @
30b2db11
...
...
@@ -91,6 +91,7 @@ public:
// ================================================================================================= SETTERS \/
// ========================================================================================================= \/
public:
//! _pData has to be created by new GLubyte[...] and will get deleted by this TextureData object!
void
setData
(
GLubyte
*
_pData
)
{
pData
=
_pData
;
}
void
setWidth
(
GLsizei
_width
)
{
width
=
_width
;
}
void
setHeight
(
GLsizei
_height
)
{
height
=
_height
;
}
...
...
src/ACGL/OpenGL/Data/TextureData.cc
View file @
30b2db11
...
...
@@ -132,6 +132,7 @@ glm::vec4 TextureData::getTexel( glm::uvec2 _texCoord )
void
TextureData
::
setTexel
(
glm
::
uvec2
_texCoord
,
glm
::
vec4
_color
)
{
assert
(
pData
&&
"can't set texels if there is no data store, define data using setData()"
);
// clamp negative to 0:
_texCoord
.
x
=
std
::
max
(
0u
,
_texCoord
.
x
);
_texCoord
.
y
=
std
::
max
(
0u
,
_texCoord
.
y
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment