Skip to content
Snippets Groups Projects
Commit 45b9a300 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix crash for transparent remote views

parent 914f0aba
No related branches found
No related tags found
No related merge requests found
...@@ -324,9 +324,11 @@ class drawPView { ...@@ -324,9 +324,11 @@ class drawPView {
} }
else{ else{
// real translucent blending (requires back-to-front traversal) // real translucent blending (requires back-to-front traversal)
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // glBlendEquation(GL_FUNC_ADD); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
// glBlendEquation(GL_FUNC_ADD);
glEnable(GL_BLEND); glEnable(GL_BLEND);
if(eyeChanged(_ctx, p)){ if(p->va_triangles && p->va_triangles->getNumVertices() &&
eyeChanged(_ctx, p)){
Msg::Debug("Sorting View[%d] for transparency", p->getIndex()); Msg::Debug("Sorting View[%d] for transparency", p->getIndex());
p->va_triangles->sort(p->getEye().x(), p->getEye().y(), p->getEye().z()); p->va_triangles->sort(p->getEye().x(), p->getEye().y(), p->getEye().z());
} }
...@@ -356,8 +358,9 @@ class drawPView { ...@@ -356,8 +358,9 @@ class drawPView {
// draw the "pseudo" vertex arrays for vectors // draw the "pseudo" vertex arrays for vectors
drawVectorArray(_ctx, p, p->va_vectors); drawVectorArray(_ctx, p, p->va_vectors);
// to avoid looping over elements we should also store these // to avoid looping over elements (and to enable drawing glyphs
// glyphs in "pseudo" vertex arrays // for remote views) we should also store these glyphs in "pseudo"
// vertex arrays
drawGlyphs(_ctx, p); drawGlyphs(_ctx, p);
// draw the 3D strings // draw the 3D strings
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment