Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
OpenGL
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
C-Fu
OpenGL
Commits
04d8c453
Commit
04d8c453
authored
Nov 07, 2016
by
Anakin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fdsgds<gv<df
parent
ed66d77b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
MshViewer/Source/OpenGlController.cpp
MshViewer/Source/OpenGlController.cpp
+10
-3
No files found.
MshViewer/Source/OpenGlController.cpp
View file @
04d8c453
...
...
@@ -277,9 +277,6 @@ void OpenGLController::updateScene()
for
(
unsigned
int
modelIndex
=
0
;
modelIndex
<
vModels
.
size
();
modelIndex
++
)
{
// give the MVPs to the shader
glBindBuffer
(
GL_UNIFORM_BUFFER
,
gluiInstanceBufferID
);
glBufferSubData
(
GL_UNIFORM_BUFFER
,
sizeof
(
glm
::
mat4
),
NULL
,
&
getMVPMatrix
(
0
));
glBindBuffer
(
GL_UNIFORM_BUFFER
,
0
);
//glUniformMatrix4fv(gluiMatrixID, 1, GL_FALSE, &getMVPMatrix(modelIndex)[0][0]);
...
...
@@ -385,4 +382,14 @@ void OpenGLController::loadMsh(const char * path)
tempBufferData
.
data
(),
GL_STATIC_DRAW
);
//TODO: limit to max model count
std
::
vector
<
glm
::
mat4
>
tempMVPs
;
for
(
int
i
=
0
;
i
<
vModels
.
size
();
i
++
)
tempMVPs
.
push_back
(
getMVPMatrix
(
i
));
glBindBuffer
(
GL_UNIFORM_BUFFER
,
gluiInstanceBufferID
);
glBufferSubData
(
GL_UNIFORM_BUFFER
,
sizeof
(
glm
::
mat4
)
*
vModels
.
size
(),
NULL
,
tempMVPs
.
data
());
glBindBuffer
(
GL_UNIFORM_BUFFER
,
0
);
}
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