mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-14 14:59:34 +02:00
changed winding order to allow quad from triangle strip
This commit is contained in:
parent
101400809a
commit
2c395b8fb4
2 changed files with 9 additions and 9 deletions
|
@ -47,12 +47,10 @@ void RenderableQuadEntityItem::render(RenderArgs* args) {
|
|||
transform.setTranslation(getPosition());
|
||||
batch.setModelTransform(transform);
|
||||
|
||||
batch._glLineWidth(getLineWidth());
|
||||
if (getLinePoints().size() > 3) {
|
||||
DependencyManager::get<DeferredLightingEffect>()->bindSimpleProgram(batch);
|
||||
DependencyManager::get<GeometryCache>()->renderVertices(batch, gpu::QUAD_STRIP, _lineVerticesID);
|
||||
}
|
||||
batch._glLineWidth(1.0f);
|
||||
|
||||
DependencyManager::get<DeferredLightingEffect>()->bindSimpleProgram(batch);
|
||||
DependencyManager::get<GeometryCache>()->renderVertices(batch, gpu::TRIANGLE_STRIP, _lineVerticesID);
|
||||
|
||||
|
||||
RenderableDebugableEntityItem::render(this, args);
|
||||
};
|
||||
|
|
|
@ -137,10 +137,12 @@ bool QuadEntityItem::setLinePoints(const QVector<glm::vec3>& points) {
|
|||
glm::vec3 point = points.at(i);
|
||||
|
||||
glm::vec3 p1 = glm::vec3(point.x - _lineWidth, point.y - _lineWidth, point.z);
|
||||
glm::vec3 p2 = glm::vec3(point.x + _lineWidth, point.y - _lineWidth, point.z);
|
||||
glm::vec3 p3 = glm::vec3(point.x + _lineWidth, point.y + _lineWidth, point.z);
|
||||
glm::vec3 p4 = glm::vec3(point.x - _lineWidth, point.y + _lineWidth, point.z);
|
||||
glm::vec3 p2 = glm::vec3(point.x - _lineWidth, point.y + _lineWidth, point.z);
|
||||
glm::vec3 p3 = glm::vec3(point.x + _lineWidth, point.y - _lineWidth, point.z);
|
||||
glm::vec3 p4 = glm::vec3(point.x + _lineWidth, point.y + _lineWidth, point.z);
|
||||
_quadVertices << p1 << p2 << p3 << p4;
|
||||
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue