switching over to geometry cache method for rendering lines

This commit is contained in:
Eric Levin 2015-05-26 15:46:25 -07:00
parent 92c55d69ba
commit f1fc7a2a09

View file

@ -12,6 +12,7 @@
#include <glm/gtx/quaternion.hpp> #include <glm/gtx/quaternion.hpp>
#include <gpu/GPUConfig.h> #include <gpu/GPUConfig.h>
#include <GeometryCache.h>
#include <DeferredLightingEffect.h> #include <DeferredLightingEffect.h>
#include <PerfStat.h> #include <PerfStat.h>
@ -30,11 +31,13 @@ void RenderableLineEntityItem::render(RenderArgs* args) {
glm::quat rotation = getRotation(); glm::quat rotation = getRotation();
glm::vec4 lineColor(toGlm(getXColor()), getLocalRenderAlpha()); glm::vec4 lineColor(toGlm(getXColor()), getLocalRenderAlpha());
glPushMatrix(); glPushMatrix();
auto geometryCache = DependencyManager::get<GeometryCache>();
glTranslatef(position.x, position.y, position.z); glTranslatef(position.x, position.y, position.z);
glm::vec3 axis = glm::axis(rotation); glm::vec3 axis = glm::axis(rotation);
glRotatef(glm::degrees(glm::angle(rotation)), axis.x, axis.y, axis.z); glRotatef(glm::degrees(glm::angle(rotation)), axis.x, axis.y, axis.z);
glm::vec3 p1 = {0.0f, 0.0f, 0.0f}; glm::vec3 p1 = {0.0f, 0.0f, 0.0f};
glm::vec3& p2 = dimensions; glm::vec3 p2 = {1.0f, 1.0, 0.0f};
//Now we need to switch over to using gemoetryCache renderVertices method like in circleOverlay3D
DependencyManager::get<DeferredLightingEffect>()->renderLine(p1, p2, lineColor, lineColor); DependencyManager::get<DeferredLightingEffect>()->renderLine(p1, p2, lineColor, lineColor);
glPopMatrix(); glPopMatrix();
RenderableDebugableEntityItem::render(this, args); RenderableDebugableEntityItem::render(this, args);