Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
CGoGN
CGoGN
Commits
d7994bef
Commit
d7994bef
authored
Jun 16, 2011
by
Maire Nicolas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Oubli de modification de GLSLShader pour la mise à jour des uniforms de clipping.
Petites corrections au niveau de l'interface Qt.
parent
18afaf68
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
16 deletions
+11
-16
Apps/Tuto/stage_shader.cpp
Apps/Tuto/stage_shader.cpp
+6
-3
Apps/Tuto/stage_shader.ui
Apps/Tuto/stage_shader.ui
+0
-13
include/Utils/GLSLShader.h
include/Utils/GLSLShader.h
+3
-0
src/Utils/GLSLShader.cpp
src/Utils/GLSLShader.cpp
+2
-0
No files found.
Apps/Tuto/stage_shader.cpp
View file @
d7994bef
...
...
@@ -97,9 +97,12 @@ void StageShader::button_compile()
QString
st2
=
dynamic_cast
<
Utils
::
QT
::
uiDockInterface
*>
(
dockWidget
())
->
fragmentEdit
->
toPlainText
();
QString
st3
=
dynamic_cast
<
Utils
::
QT
::
uiDockInterface
*>
(
dockWidget
())
->
geometryEdit
->
toPlainText
();
m_shader
->
reloadVertexShaderFromMemory
(
st1
.
toStdString
().
c_str
());
m_shader
->
reloadFragmentShaderFromMemory
(
st2
.
toStdString
().
c_str
());
m_shader
->
reloadGeometryShaderFromMemory
(
st3
.
toStdString
().
c_str
());
if
(
st1
.
toStdString
().
length
()
>
0
)
m_shader
->
reloadVertexShaderFromMemory
(
st1
.
toStdString
().
c_str
());
if
(
st2
.
toStdString
().
length
()
>
0
)
m_shader
->
reloadFragmentShaderFromMemory
(
st2
.
toStdString
().
c_str
());
if
(
st3
.
toStdString
().
length
()
>
0
)
m_shader
->
reloadGeometryShaderFromMemory
(
st3
.
toStdString
().
c_str
());
m_shader
->
recompile
();
updateGLMatrices
();
...
...
Apps/Tuto/stage_shader.ui
View file @
d7994bef
...
...
@@ -171,19 +171,6 @@
</item>
</layout>
</item>
<item
row=
"1"
column=
"0"
>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
...
...
include/Utils/GLSLShader.h
View file @
d7994bef
...
...
@@ -285,6 +285,9 @@ public:
*/
virtual
void
restoreUniformsAttribs
()
{
CGoGNerr
<<
"Warning restoreUniformsAttribs not implemented"
<<
CGoGNendl
;}
virtual
void
updateClippingUniforms
()
{
CGoGNerr
<<
"Warning updateClippingUniforms not implemented"
<<
CGoGNendl
;}
/**
*
*/
...
...
src/Utils/GLSLShader.cpp
View file @
d7994bef
...
...
@@ -823,6 +823,8 @@ bool GLSLShader::recompile()
restoreUniformsAttribs
();
updateClippingUniforms
();
return
true
;
}
...
...
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