summaryrefslogtreecommitdiff
path: root/mainwin.cc
diff options
context:
space:
mode:
authorclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-06-26 17:07:40 (GMT)
committerclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-06-26 17:07:40 (GMT)
commit7b153c2092f74d58e86f08934760a6df490ac038 (patch)
treecc0217fbb83db984c4a456cdd4a0348accfb2f87 /mainwin.cc
parentcc913b4d8f8b62800223b1a86170077cf799dced (diff)
Clifford Wolf:
Improvements in pseudo wireframe shader git-svn-id: http://svn.clifford.at/openscad/trunk@25 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'mainwin.cc')
-rw-r--r--mainwin.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/mainwin.cc b/mainwin.cc
index dc0c8e8..166e1df 100644
--- a/mainwin.cc
+++ b/mainwin.cc
@@ -419,9 +419,6 @@ static void renderGLviaOpenCSG(void *vp)
if (m->root_chain) {
std::vector<OpenCSG::Primitive*> primitives;
- GLint e1 = glGetAttribLocation(m->screen->edgeshader_prog, "e1");
- GLint e2 = glGetAttribLocation(m->screen->edgeshader_prog, "e2");
- GLint e3 = glGetAttribLocation(m->screen->edgeshader_prog, "e3");
int j = 0;
for (int i = 0;; i++)
{
@@ -431,12 +428,12 @@ static void renderGLviaOpenCSG(void *vp)
{
OpenCSG::render(primitives, OpenCSG::Goldfeather, OpenCSG::NoDepthComplexitySampling);
glDepthFunc(GL_EQUAL);
- glUseProgram(m->screen->edgeshader_prog);
+ glUseProgram(m->screen->shaderinfo[0]);
for (; j < i; j++) {
if (m->root_chain->types[j] == CSGTerm::DIFFERENCE) {
- m->root_chain->polysets[j]->render_surface(PolySet::COLOR_CUTOUT, e1, e2, e3);
+ m->root_chain->polysets[j]->render_surface(PolySet::COLOR_CUTOUT, m->screen->shaderinfo);
} else {
- m->root_chain->polysets[j]->render_surface(PolySet::COLOR_MATERIAL, e1, e2, e3);
+ m->root_chain->polysets[j]->render_surface(PolySet::COLOR_MATERIAL, m->screen->shaderinfo);
}
}
glUseProgram(0);
contact: Jan Huwald // Impressum