Qopengl materials
-
Where to find materials about Qopengl?
Does Qopengl perform as well as glew?
Cant manage to find way to draw lines, google has not much to offer.tryed:
@
glLineWidth(5);
glColor3f( 1.0f, 1.0f, 1.0f);// Draw a triangle:
glBegin(GL_TRIANGLES); // Lower left vertex
glVertex3f(-1.0f, -0.5f, -4.0f); // Lower right vertex
glVertex3f( 10000.0f, -0.5f, -4.0f); // Upper vertex
glVertex3f( 0.0f, 0.5f, -4.0f); glEnd();glBegin(GL_LINE_STRIP);
glVertex2f(0.1f,2.0f);// eelmine
glVertex2f(-0.5f, -1.0f);
glEnd();
@ -
Hi and welcome to devnet,
Are you looking for something like "this":http://doc.qt.io/qt-5/qtgui-openglwindow-example.html ?
-
[quote author="SGaist" date="1424469193"]Hi and welcome to devnet,
Are you looking for something like "this":http://doc.qt.io/qt-5/qtgui-openglwindow-example.html ?[/quote]
Tested code into that example replacing part that draws traingle with code above but it wont work this way
-
It wasn't meant to be just copy/replace. The example shows how to do it (the triangle part) using a recent version of OpenGL. You are using the old fixed pipeline with your functions calls.