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
25d5c229
Commit
25d5c229
authored
Feb 18, 2013
by
Robert Menzel
Browse files
fixed missing include, compatibility of ShaderProgram with new texture classes
parent
7415723c
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/ACGL/OpenGL/Objects/ShaderProgram.hh
View file @
25d5c229
...
...
@@ -306,8 +306,8 @@ public:
inline
void
setProgramUniform
(
GLint
_location
,
const
glm
::
dmat4x3
&
_v
,
GLboolean
_transpose
=
GL_FALSE
)
const
{
glProgramUniformMatrix4x3dv
(
mObjectName
,
_location
,
1
,
_transpose
,
glm
::
value_ptr
(
_v
));
}
inline
void
setProgramUniform
(
GLint
_location
,
const
glm
::
dmat4
&
_v
,
GLboolean
_transpose
=
GL_FALSE
)
const
{
glProgramUniformMatrix4dv
(
mObjectName
,
_location
,
1
,
_transpose
,
glm
::
value_ptr
(
_v
));
}
inline
void
setProgramTexture
(
GLint
_location
,
const
ConstSharedTexture
&
_texture
,
GLint
_unit
)
const
{
glProgramUniform1i
(
mObjectName
,
_location
,
_unit
);
_texture
->
bind
(
_unit
);
}
inline
void
setProgramTexture
(
const
std
::
string
&
_nameInShader
,
const
ConstSharedTexture
&
_texture
,
GLint
_unit
)
const
{
setProgramUniform
(
getUniformLocation
(
_nameInShader
),
(
GLint
)
_unit
);
_texture
->
bind
(
_unit
);
}
inline
void
setProgramTexture
(
GLint
_location
,
const
ConstSharedTexture
Base
&
_texture
,
GLint
_unit
)
const
{
glProgramUniform1i
(
mObjectName
,
_location
,
_unit
);
_texture
->
bind
(
_unit
);
}
inline
void
setProgramTexture
(
const
std
::
string
&
_nameInShader
,
const
ConstSharedTexture
Base
&
_texture
,
GLint
_unit
)
const
{
setProgramUniform
(
getUniformLocation
(
_nameInShader
),
(
GLint
)
_unit
);
_texture
->
bind
(
_unit
);
}
#endif
...
...
src/ACGL/OpenGL/Data/TextureDataLoadStore.cc
View file @
25d5c229
...
...
@@ -16,6 +16,11 @@
#include
<fstream>
#include
"lodepng/lodepng.h"
#ifdef ACGL_COMPILE_WITH_QT
#include
<QImage>
#include
<QGLWidget>
#endif
using
namespace
ACGL
;
using
namespace
ACGL
::
OpenGL
;
using
namespace
ACGL
::
Utils
;
...
...
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