Yes, you're right but it don't work.
I've already try it without success.
My header now is:
//#ifdef _APPLE_OPENGL_FRAMEWORK
//#include <OpenGL/gl.h>
//#include <OpenGL/glu.h>
//#else
#define GL_GLEXT_PROTOTYPES 1
#include <GL/gl.h>
#include <GL/glu.h>
//#endif
and i have always the same output.
I try to analize the glext.h and i see this:
----------------------------------- from glext.h
#ifndef GL_VERSION_2_0
#define GL_VERSION_2_0 1
#ifdef GL_GLEXT_PROTOTYPES
The GL_GLEXT_PROTOTYPES definition was checked only if GL_VERSION_2_0
wasn't defined before.
It's possible GL_VERSION_2_0 is already defined? (due a bug?)
Il giorno 03/lug/07, alle ore 15:55, Brian Paul ha scritto:
Sandro Cavazzoni wrote:
Hi to all,
i'm writing an application based on opengl and i use GLSL for a
custom shader.
The application over mac osx compile and work correctly.
On linux I installed MESA 7 on my ubuntu feisty.
When i try to compile it i've this error
/home/skaman/workspace/netvideo/bk-deps g++ -c -o
netvideo_wx_av_box.o -I/usr/include/ffmpeg -I/usr/local/
include// -I./xpm/ -D__STDC_CONSTANT_MACROS -I/usr/lib/wx/
include/gtk2-unicode-debug-2.8 -I/usr/include/wx-2.8 -
D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXDEBUG__ -D__WXGTK__ -
pthread -g -O2 ./src/gui/elements/wx_av_box.cpp
./src/gui/elements/wx_av_box.cpp: In member function ‘void
wxAVBox::Render()’:
./src/gui/elements/wx_av_box.cpp:111: error: ‘glUseProgram’
was not declared in this scope
./src/gui/elements/wx_av_box.cpp:113: error: â
€˜glGetUniformLocation’ was not declared in this scope
./src/gui/elements/wx_av_box.cpp:114: error: ‘glUniform1f’ was
not declared in this scope
./src/gui/elements/wx_av_box.cpp:119: error: ‘glUniform1i’ was
not declared in this scope
./src/gui/elements/wx_av_box.cpp: In member function ‘void
wxAVBox::InitGL()’:
./src/gui/elements/wx_av_box.cpp:245: error: ‘glCreateProgram’
was not declared in this scope
./src/gui/elements/wx_av_box.cpp:246: error: ‘glCreateShader’
was not declared in this scope
./src/gui/elements/wx_av_box.cpp:249: error: ‘glShaderSource’
was not declared in this scope
./src/gui/elements/wx_av_box.cpp:250: error: ‘glCompileShader’
was not declared in this scope
./src/gui/elements/wx_av_box.cpp:257: error: ‘glGetShaderiv’
was not declared in this scope
./src/gui/elements/wx_av_box.cpp:260: error: ‘glGetShaderInfoLogâ
€™ was not declared in this scope
./src/gui/elements/wx_av_box.cpp:269: error: ‘glAttachShader’
was not declared in this scope
./src/gui/elements/wx_av_box.cpp:270: error: ‘glLinkProgram’
was not declared in this scope
./src/gui/elements/wx_av_box.cpp:277: error: ‘glGetProgramiv’
was not declared in this scope
./src/gui/elements/wx_av_box.cpp:280: error: â
€˜glGetProgramInfoLog’ was not declared in this scope
In my source files i've included the header so:
#ifdef _APPLE_OPENGL_FRAMEWORK // it's defined only under OSX
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#else
#include <GL/gl.h>
#include <GL/glu.h>
#endif
and on my system:
[EMAIL PROTECTED]:~/workspace/netvideo$ sudo find / | grep "GL\/gl\.h"
/usr/local/include/GL/gl.h
[EMAIL PROTECTED]:~/workspace/netvideo$ Now, i wrong something... but what?
Prototypes for GL functions aren't enabled by default (to encourage
using glXGetProcAddress). To fix this, try defining
GL_GLEXT_PROTOTYPES=1 either on the cmd line (-
DGL_GLEXT_PROTOTYPES=1) or in your code (#define
GL_GLEXT_PROTOTYPES 1) before including GL/gl.h
-Brian
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev