|
|
Home » Community » Newbie corner » How to add "GLEW" or "GLee" to GLCtrl?
How to add "GLEW" or "GLee" to GLCtrl? [message #36151] |
Sun, 06 May 2012 09:35 |
navi
Messages: 107 Registered: February 2012 Location: Sydney, Australia
|
Experienced Member |
|
|
Objective: trying to use GL_ARB_vertex_buffer_object aka VBO with U++ GLCtrl in Win32
Problem: Trying to add GLEW or GLee to U++ project with GLCtrl. so I copied the "GLEW" and "GLee" folder to "MinGW\include\" folder and tried adding
in GLCtrl.h just before
#include <GL/gl.h>
#include <GL/glu.h>
near line 15. but getting the following error when try to call the GLEW function "glewInit()"
GLenum err = glewInit();
if (GLEW_OK != err)
{
...
}
ERROR:
----- CtrlLib ( GUI GCC FORCE_SIZE BLITZ WIN32 ) (1 / 10)
----- GLCtrl ( GUI GCC FORCE_SIZE BLITZ WIN32 ) (2 / 10)
BLITZ: GLPicking.cpp Win32GLCtrl.cpp X11GLCtrl.cpp GLCtrl.cpp
----- CtrlCore ( GUI GCC FORCE_SIZE BLITZ WIN32 ) (3 / 10)
----- Draw ( GUI GCC FORCE_SIZE BLITZ WIN32 ) (4 / 10)
----- plugin/bmp ( GUI GCC FORCE_SIZE BLITZ WIN32 ) (5 / 10)
----- RichText ( GUI GCC FORCE_SIZE BLITZ WIN32 ) (6 / 10)
----- Core ( GUI GCC FORCE_SIZE BLITZ WIN32 ) (7 / 10)
----- plugin/z ( GUI GCC FORCE_SIZE BLITZ WIN32 ) (8 / 10)
----- plugin/png ( GUI GCC FORCE_SIZE BLITZ WIN32 ) (9 / 10)
----- MySecondGL ( GUI MAIN GCC FORCE_SIZE BLITZ WIN32 ) (10 / 10)
BLITZ: My_OGL_Obj_Lib.cpp cube.cpp box_calc.cpp Sheet2D.cpp
main.cpp
GLCtrl: 4 file(s) built in (0:00.74), 187 msecs / file, duration = 2203 msecs, parallelization 88%
MySecondGL: 5 file(s) built in (0:01.67), 334 msecs / file, duration = 2438 msecs, parallelization 85%
Linking...
C:/upp_portable_win32/out/uppsrc/MySecondGL/MINGW.Blitz.Force_Size.Gui.Main\main.o:main.cpp:(.text$_ZN4MyGL6GLInit
Ev+0xe): undefined reference to `_imp__glewInit'
collect2: ld returned 1 exit status
There were errors. (0:06.31)
I'm a newbie to programming. Just started to learn U++ and discover the wonderful world of U++ and OpenGL Programming. Have no experience in programming Win32, MFC or any other framework. Since I started with OpenGL, I have manage to use immediate mode drawing using glBegin() glEnd(), using vertex array and glDrawElements() and etc. naturally wanted to progress into VBO and eventually to GLSL. so far with immediate mode no GL extension was required thus had no big drama avoiding GLUT as framework. I really want to use U++ instead of GLUT as U++ is object oriented and works in window mode and supports rich library of Widgets and Controls. how can I successfully add GLEW and GLee to U++ GLCtrl?
|
|
|
|
|
|
Re: How to add "GLEW" or "GLee" to GLCtrl? [message #36157 is a reply to message #36154] |
Mon, 07 May 2012 11:35 |
navi
Messages: 107 Registered: February 2012 Location: Sydney, Australia
|
Experienced Member |
|
|
Thank you very much unodgs. Much appreciate your help!! I made the silly mistake of #define GLEW_STATIC after the #include <glew files>. Looking at WinGL.h found the correct way. also I used the modified glew files from the WinGL project as you said.
#ifndef GLEW_STATIC
#define GLEW_STATIC
#endif
#include <glew/glew.h>
#include <glew/wglew.h>
[Updated on: Mon, 07 May 2012 12:01] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat May 04 10:46:03 CEST 2024
Total time taken to generate the page: 0.02939 seconds
|
|
|