Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ACGL
acgl
Commits
49ca2fa3
Commit
49ca2fa3
authored
Feb 24, 2013
by
Robert Menzel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cube map texture fix
parent
7bc88cfe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
include/ACGL/OpenGL/Objects/Texture.hh
include/ACGL/OpenGL/Objects/Texture.hh
+2
-2
src/ACGL/OpenGL/Objects/Texture.cc
src/ACGL/OpenGL/Objects/Texture.cc
+8
-4
No files found.
include/ACGL/OpenGL/Objects/Texture.hh
View file @
49ca2fa3
...
...
@@ -408,8 +408,8 @@ ACGL_SMARTPOINTER_TYPEDEFS(Texture2DArray)
class
TextureCubeMap
:
public
TextureBase
{
public:
TextureCubeMap
(
GLenum
_internalFormat
=
GL_RGBA
)
:
TextureBase
(
GL_TEXTURE_
BINDING_
CUBE_MAP
,
_internalFormat
)
{}
TextureCubeMap
(
const
glm
::
uvec2
&
_size
,
GLenum
_internalFormat
=
GL_RGBA
)
:
TextureBase
(
GL_TEXTURE_
BINDING_
CUBE_MAP
,
_internalFormat
)
TextureCubeMap
(
GLenum
_internalFormat
=
GL_RGBA
)
:
TextureBase
(
GL_TEXTURE_CUBE_MAP
,
_internalFormat
)
{}
TextureCubeMap
(
const
glm
::
uvec2
&
_size
,
GLenum
_internalFormat
=
GL_RGBA
)
:
TextureBase
(
GL_TEXTURE_CUBE_MAP
,
_internalFormat
)
{
resize
(
_size
);
}
...
...
src/ACGL/OpenGL/Objects/Texture.cc
View file @
49ca2fa3
...
...
@@ -523,11 +523,15 @@ void TextureCubeMap::setImageData( const SharedTextureData &_data, GLenum _cubeS
std
::
cerr
<<
"can't set cubemap side as provided enum does not name a side!"
<<
std
::
endl
;
return
;
}
if
(
!
textureStorageIsAllocated
())
{
texImage2DCube
(
_data
,
_cubeSide
,
_mipmapLayer
);
}
else
{
texSubImage2DCube
(
_data
,
_cubeSide
,
_mipmapLayer
);
if
(
!
_data
)
{
std
::
cerr
<<
"can't set cubemap side as data is invalid"
<<
std
::
endl
;
return
;
}
//if (!textureStorageIsAllocated()) {
texImage2DCube
(
_data
,
_cubeSide
,
_mipmapLayer
);
///} else {
// texSubImage2DCube( _data, _cubeSide, _mipmapLayer );
//}
}
void
TextureCubeMap
::
resize
(
const
glm
::
uvec2
&
_newSize
)
...
...
Write
Preview
Markdown
is supported
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