Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
P
panoramic
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Luis Penaranda
panoramic
Commits
f40aaca4
Commit
f40aaca4
authored
Jan 25, 2013
by
Luis Peñaranda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
require glew only on mac
parent
c9501685
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
openglcanvas.cpp
openglcanvas.cpp
+3
-1
openglcanvas.h
openglcanvas.h
+5
-3
No files found.
openglcanvas.cpp
View file @
f40aaca4
...
...
@@ -593,12 +593,14 @@ void OpenGLCanvas::setShaders() {
char
*
vs
,
*
fs
;
#ifdef GLEW_VERSION_1_5
#ifndef __APPLE__
#ifdef GLEW_VERSION_1_5
GLenum
err
=
glewInit
();
if
(
err
!=
GLEW_OK
){
fprintf
(
stderr
,
"error in GLEW initialization: %s
\n
"
,
glewGetString
(
err
));
exit
(
-
1
);
}
#endif
#endif
GLuint
v
=
glCreateShader
(
GL_VERTEX_SHADER
);
...
...
openglcanvas.h
View file @
f40aaca4
#ifndef OPENGLCANVAS_H
#define OPENGLCANVAS_H
// GLew might not be needed if a recent version of OpenGL is present
#include <GL/glew.h>
#if (!defined GLEW_VERSION_1_5) || (!defined GL_VERSION_3_1)
// GLew might not be needed on mac, or if a recent version of OpenGL is present
#ifndef __APPLE__
#include <GL/glew.h>
#if (!defined GLEW_VERSION_1_5) || (!defined GL_VERSION_3_1)
#error GLEW 1.5.2 is required
#endif
#endif
#define GL_GLEXT_PROTOTYPES 1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment