Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Atte Sillanpaeae
VR-demos
Commits
b85520c7
Commit
b85520c7
authored
Apr 04, 2018
by
Ruben Jesus Garcia Hernandez
Browse files
Atom bonds in GearVR
parent
b38a4b4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
OculusMobile/NOMADGearvrT/Src/OvrApp.cpp
View file @
b85520c7
...
...
@@ -563,6 +563,25 @@ void OvrApp::RenderAtoms(const float *m) //m[16]
if
((
e
=
glGetError
())
!=
GL_NO_ERROR
)
eprintf
(
"Gl error after Render cloned Atom timestep =%d: %d
\n
"
,
currentSet
,
e
);
}
// painting cloned atoms
//now bonds
if
(
numBonds
&&
displaybonds
/*&& showAtoms*/
)
{
glLineWidth
(
bondThickness
);
glBindVertexArray
(
AtomTVAO
[
2
]);
glUseProgram
(
UnitCellP
);
glUniformMatrix4fv
(
UnitCellMatrixLoc
,
1
,
GL_FALSE
,
m
);
glUniform4fv
(
UnitCellColourLoc
,
1
,
bondscolours
);
if
((
e
=
glGetError
())
!=
GL_NO_ERROR
)
eprintf
(
"Gl error after Render Atom bonds uniform timestep =%d: %d
\n
"
,
currentSet
,
e
);
if
(
currentSet
==
0
||
fixedAtoms
)
glDrawElements
(
GL_LINES
,
numBonds
[
0
],
GL_UNSIGNED_INT
,
(
void
*
)
0
);
else
glDrawElements
(
GL_LINES
,
numBonds
[
currentSet
]
-
numBonds
[
currentSet
-
1
],
GL_UNSIGNED_INT
,
(
void
*
)(
sizeof
(
int
)
*
numBonds
[
currentSet
-
1
])
);
glLineWidth
(
1.0
f
);
if
((
e
=
glGetError
())
!=
GL_NO_ERROR
)
eprintf
(
"Gl error after Render Atom bonds timestep =%d: %d
\n
"
,
currentSet
,
e
);
glBindVertexArray
(
0
);
}
}
// no tess
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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