Removed obsolete opengl module

This commit is contained in:
2018-04-04 09:40:53 +02:00
parent e02c294ff6
commit 467514ea6c
12 changed files with 41 additions and 33 deletions

View File

@@ -8,6 +8,7 @@
#include <QPainter>
#include <QOpenGLWidget>
#include <QOpenGLFunctions>
#include "../misc/Renderable3D.h"
#include "../misc/Shader.h"
@@ -35,7 +36,7 @@ public:
rs.shader->setVertices(rt.getVertices());
rs.shader->setNormals(rt.getNormals());
rs.shader->setVertexColor(rt.getRGBA());
glDrawArrays(GL_TRIANGLES, 0, rt.count());
rs.funcs->glDrawArrays(GL_TRIANGLES, 0, rt.count());
rs.shader->unsetVertices();
rs.shader->unsetNormals();
rs.shader->unsetVertexColor();
@@ -45,7 +46,7 @@ public:
rs.shader->setColor(0,0,0,128);
rs.shader->setVertices(rt2.getVertices());
//rs.shader->setVertexColor(rt2.getRGBA());
glDrawArrays(GL_LINES, 0, rt2.count());
rs.funcs->glDrawArrays(GL_LINES, 0, rt2.count());
rs.shader->unsetVertices();
//rs.shader->unsetVertexColor();
}
@@ -56,8 +57,8 @@ public:
/** render the given grid using GL commands */
void renderTransp(const RenderSettings& rs, const RenderTriangle& rt, bool wireframe) {
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
rs.funcs->glEnable(GL_BLEND);
rs.funcs->glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
rs.shader->bind();
rs.shader->setModelMatrix(QMatrix4x4());
@@ -65,7 +66,7 @@ public:
rs.shader->setVertices(rt.getVertices());
rs.shader->setNormals(rt.getNormals());
rs.shader->setVertexColor(rt.getRGBA());
glDrawArrays(GL_TRIANGLES, 0, rt.count());
rs.funcs->glDrawArrays(GL_TRIANGLES, 0, rt.count());
rs.shader->unsetVertices();
rs.shader->unsetNormals();
rs.shader->unsetVertexColor();
@@ -75,14 +76,14 @@ public:
rs.shader->setColor(0,0,0,128);
rs.shader->setVertices(rt2.getVertices());
//rs.shader->setVertexColor(rt2.getRGBA());
glDrawArrays(GL_LINES, 0, rt2.count());
rs.funcs->glDrawArrays(GL_LINES, 0, rt2.count());
rs.shader->unsetVertices();
//rs.shader->unsetVertexColor();
}
rs.shader->release();
glDisable(GL_BLEND);
rs.funcs->glDisable(GL_BLEND);
}