mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 16:23:39 +02:00
Fixes for OS X: GLSL version must be first line in source, don't init glut
(Qt apparently uses it?)
This commit is contained in:
parent
f15c670c4e
commit
f0055bd419
5 changed files with 14 additions and 11 deletions
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
//
|
||||
// For licensing information, see http://http.developer.nvidia.com/GPUGems/gpugems_app01.html:
|
||||
//
|
||||
|
@ -30,8 +32,6 @@
|
|||
// Copyright (c) 2004 Sean O'Neil
|
||||
//
|
||||
|
||||
#version 120
|
||||
|
||||
uniform vec3 v3LightPos;
|
||||
uniform float g;
|
||||
uniform float g2;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
//
|
||||
// For licensing information, see http://http.developer.nvidia.com/GPUGems/gpugems_app01.html:
|
||||
//
|
||||
|
@ -30,8 +32,6 @@
|
|||
// Copyright (c) 2004 Sean O'Neil
|
||||
//
|
||||
|
||||
#version 120
|
||||
|
||||
uniform vec3 v3CameraPos; // The camera's current position
|
||||
uniform vec3 v3LightPos; // The direction vector to the light source
|
||||
uniform vec3 v3InvWavelength; // 1 / pow(wavelength, 4) for the red, green, and blue channels
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
//
|
||||
// For licensing information, see http://http.developer.nvidia.com/GPUGems/gpugems_app01.html:
|
||||
//
|
||||
|
@ -30,8 +32,6 @@
|
|||
// Copyright (c) 2004 Sean O'Neil
|
||||
//
|
||||
|
||||
#version 120
|
||||
|
||||
uniform vec3 v3LightPos;
|
||||
uniform float g;
|
||||
uniform float g2;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
//
|
||||
// For licensing information, see http://http.developer.nvidia.com/GPUGems/gpugems_app01.html:
|
||||
//
|
||||
|
@ -30,8 +32,6 @@
|
|||
// Copyright (c) 2004 Sean O'Neil
|
||||
//
|
||||
|
||||
#version 120
|
||||
|
||||
uniform vec3 v3CameraPos; // The camera's current position
|
||||
uniform vec3 v3LightPos; // The direction vector to the light source
|
||||
uniform vec3 v3InvWavelength; // 1 / pow(wavelength, 4) for the red, green, and blue channels
|
||||
|
|
|
@ -224,15 +224,18 @@ Application::Application(int& argc, char** argv) :
|
|||
// enable mouse tracking; otherwise, we only get drag events
|
||||
_glWidget->setMouseTracking(true);
|
||||
|
||||
// initialize glut, which we use for rendering spheres and such
|
||||
glutInit(&argc, argv);
|
||||
|
||||
// initialization continues in initializeGL when OpenGL context is ready
|
||||
}
|
||||
|
||||
void Application::initializeGL() {
|
||||
printLog( "Created Display Window.\n" );
|
||||
|
||||
// initialize glut for shape drawing; Qt apparently initializes it on OS X
|
||||
#ifndef __APPLE__
|
||||
int argc = 0;
|
||||
glutInit(&argc, 0);
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
glewInit();
|
||||
printLog( "Glew Init complete.\n" );
|
||||
|
|
Loading…
Reference in a new issue