mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 05:23:33 +02:00
replace GL_LINES with a call to renderWireBox for node bounds
This commit is contained in:
parent
125dc5010e
commit
bd38df2a15
1 changed files with 2 additions and 42 deletions
|
@ -12,6 +12,7 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#include <DependencyManager.h>
|
||||
#include <GeometryCache.h>
|
||||
|
||||
#include "Application.h"
|
||||
|
@ -155,52 +156,11 @@ void NodeBounds::draw() {
|
|||
|
||||
void NodeBounds::drawNodeBorder(const glm::vec3& center, float scale, float red, float green, float blue) {
|
||||
glPushMatrix();
|
||||
|
||||
glTranslatef(center.x, center.y, center.z);
|
||||
glScalef(scale, scale, scale);
|
||||
|
||||
glLineWidth(2.5);
|
||||
glColor3f(red, green, blue);
|
||||
glBegin(GL_LINES);
|
||||
|
||||
glVertex3f(-0.5, -0.5, -0.5);
|
||||
glVertex3f( 0.5, -0.5, -0.5);
|
||||
|
||||
glVertex3f(-0.5, -0.5, -0.5);
|
||||
glVertex3f(-0.5, 0.5, -0.5);
|
||||
|
||||
glVertex3f(-0.5, -0.5, -0.5);
|
||||
glVertex3f(-0.5, -0.5, 0.5);
|
||||
|
||||
glVertex3f(-0.5, 0.5, -0.5);
|
||||
glVertex3f( 0.5, 0.5, -0.5);
|
||||
|
||||
glVertex3f(-0.5, 0.5, -0.5);
|
||||
glVertex3f(-0.5, 0.5, 0.5);
|
||||
|
||||
glVertex3f( 0.5, 0.5, 0.5);
|
||||
glVertex3f(-0.5, 0.5, 0.5);
|
||||
|
||||
glVertex3f( 0.5, 0.5, 0.5);
|
||||
glVertex3f( 0.5, -0.5, 0.5);
|
||||
|
||||
glVertex3f( 0.5, 0.5, 0.5);
|
||||
glVertex3f( 0.5, 0.5, -0.5);
|
||||
|
||||
glVertex3f( 0.5, -0.5, 0.5);
|
||||
glVertex3f(-0.5, -0.5, 0.5);
|
||||
|
||||
glVertex3f( 0.5, -0.5, 0.5);
|
||||
glVertex3f( 0.5, -0.5, -0.5);
|
||||
|
||||
glVertex3f( 0.5, 0.5, -0.5);
|
||||
glVertex3f( 0.5, -0.5, -0.5);
|
||||
|
||||
glVertex3f(-0.5, 0.5, 0.5);
|
||||
glVertex3f(-0.5, -0.5, 0.5);
|
||||
|
||||
glEnd();
|
||||
|
||||
DependencyManager::get<GeometryCache>()->renderWireCube(1.0f);
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue