mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Update border comment in Cube3DOverlay
This commit is contained in:
parent
75d560744b
commit
0b23b57e1e
1 changed files with 6 additions and 4 deletions
|
@ -64,10 +64,12 @@ void Cube3DOverlay::render(RenderArgs* args) {
|
|||
glTranslatef(positionToCenter.x, positionToCenter.y, positionToCenter.z);
|
||||
if (_isSolid) {
|
||||
if (_borderSize > 0) {
|
||||
// Disable writing to the depth mask so that the following draw
|
||||
// will not be occluded by this one. This means the border
|
||||
// could be covered by overlays that are further back and drawn
|
||||
// later, but this is good enough for the use-case.
|
||||
// Draw a cube at a larger size behind the main cube, creating
|
||||
// a border effect.
|
||||
// Disable writing to the depth mask so that the "border" cube will not
|
||||
// occlude the main cube. This means the border could be covered by
|
||||
// overlays that are further back and drawn later, but this is good
|
||||
// enough for the use-case.
|
||||
glDepthMask(GL_FALSE);
|
||||
glPushMatrix();
|
||||
glColor4f(1.0f, 1.0f, 1.0f, alpha);
|
||||
|
|
Loading…
Reference in a new issue