File tree 2 files changed +13
-7
lines changed
source/examples/qt-example
2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -50,11 +50,6 @@ WindowQt::WindowQt(const QSurfaceFormat & format)
50
50
qDebug () << " Could not create OpenGL context." ;
51
51
QApplication::quit ();
52
52
}
53
- else
54
- {
55
- qDebug ().nospace () << " Created OpenGL context "
56
- << m_context->format ().version ().first << " ." << m_context->format ().version ().second ;
57
- }
58
53
}
59
54
60
55
WindowQt::~WindowQt ()
Original file line number Diff line number Diff line change 22
22
#include < glm/gtx/transform.hpp>
23
23
24
24
#include < glbinding/gl/gl.h>
25
+ #include < glbinding/ContextInfo.h>
25
26
26
27
#include < globjects/globjects.h>
27
28
#include < globjects/Uniform.h>
@@ -73,17 +74,27 @@ class Window : public WindowQt, AbstractCoordinateProvider
73
74
virtual void initializeGL () override
74
75
{
75
76
init ();
76
-
77
77
DebugMessage::enable ();
78
78
79
+ std::cout << std::endl
80
+ << " OpenGL Version: " << glbinding::ContextInfo::version () << std::endl
81
+ << " OpenGL Vendor: " << glbinding::ContextInfo::vendor () << std::endl
82
+ << " OpenGL Renderer: " << glbinding::ContextInfo::renderer () << std::endl << std::endl;
83
+
84
+ #ifdef MAC_OS
85
+ Shader::clearGlobalReplacements ();
86
+ Shader::globalReplace (" #version 140" , " #version 150" );
87
+
88
+ debug () << " Using global OS X shader replacement '#version 140' -> '#version 150'" << std::endl;
89
+ #endif
90
+
79
91
glClearColor (1 .f , 1 .f , 1 .f , 0 .f );
80
92
81
93
m_sphere = new Program ();
82
94
m_sphere->attach (
83
95
Shader::fromFile (GL_VERTEX_SHADER, " data/gbuffers/sphere.vert" )
84
96
, Shader::fromFile (GL_FRAGMENT_SHADER, " data/gbuffers/sphere.frag" ));
85
97
86
-
87
98
m_icosahedron = new Icosahedron (2 );
88
99
89
100
m_camera.setZNear (1 .f );
You can’t perform that action at this time.
0 commit comments