Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Pitiot
CGoGN
Commits
84dbb3d7
Commit
84dbb3d7
authored
Oct 03, 2012
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug in pickable & updatemtrices form GL
parent
d90a7c09
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
2 deletions
+15
-2
include/Utils/GLSLShader.h
include/Utils/GLSLShader.h
+2
-0
include/Utils/pickables.h
include/Utils/pickables.h
+5
-0
src/Utils/GLSLShader.cpp
src/Utils/GLSLShader.cpp
+2
-2
src/Utils/pickables.cpp
src/Utils/pickables.cpp
+6
-0
No files found.
include/Utils/GLSLShader.h
View file @
84dbb3d7
...
...
@@ -408,6 +408,8 @@ public:
static
void
pushTransfo
()
{
s_current_matrices
->
pushTransfo
();}
/// pop transformation matrix
static
void
popTransfo
()
{
s_current_matrices
->
popTransfo
();}
// apply a transformation given by its matrix
static
void
applyTransfo
(
const
glm
::
mat4
&
m
)
{
s_current_matrices
->
apply
(
m
);}
};
...
...
include/Utils/pickables.h
View file @
84dbb3d7
...
...
@@ -193,6 +193,11 @@ public:
*/
void
draw
();
/**
* draw without applying transformation
*/
void
drawNoTransfo
();
/**
* return a ref on the transformation matrix
*/
...
...
src/Utils/GLSLShader.cpp
View file @
84dbb3d7
...
...
@@ -1085,8 +1085,8 @@ void GLSLShader::updateAllFromGLMatrices()
glGetDoublev
(
GL_MODELVIEW_MATRIX
,
modelview
);
glGetDoublev
(
GL_PROJECTION_MATRIX
,
projection
);
glm
::
mat4
model
;
glm
::
mat4
proj
;
glm
::
mat4
&
model
=
currentModelView
()
;
glm
::
mat4
&
proj
=
currentProjection
()
;
for
(
unsigned
int
i
=
0
;
i
<
4
;
++
i
)
{
...
...
src/Utils/pickables.cpp
View file @
84dbb3d7
...
...
@@ -163,6 +163,12 @@ void Pickable::draw()
Utils
::
GLSLShader
::
updateCurrentMatrices
();
}
void
Pickable
::
drawNoTransfo
()
{
m_drawable
->
draw
();
}
glm
::
mat4
&
Pickable
::
transfo
()
{
...
...
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