Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
navi is currently offline  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
#include <glew/glew.h>

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 #36152 is a reply to message #36151] Sun, 06 May 2012 09:42 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Take a look at WinGl package. You can just copy glew related files from there to your project and add following settings to upp project:
-D_WIN32 -DGLEW_STATIC
Re: How to add "GLEW" or "GLee" to GLCtrl? [message #36153 is a reply to message #36152] Sun, 06 May 2012 12:05 Go to previous messageGo to next message
navi is currently offline  navi
Messages: 107
Registered: February 2012
Location: Sydney, Australia
Experienced Member
Quote:

Take a look at WinGl package. You can just copy glew related files from there to your project and add following settings to upp project:
-D_WIN32 -DGLEW_STATIC


where is the WinGL package?
Re: How to add "GLEW" or "GLee" to GLCtrl? [message #36154 is a reply to message #36153] Sun, 06 May 2012 12:56 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

http://code.google.com/p/upp-mirror/source/browse/#svn%2Ftru nk%2Frainbow%2FWinGl
Re: How to add "GLEW" or "GLee" to GLCtrl? [message #36157 is a reply to message #36154] Mon, 07 May 2012 11:35 Go to previous message
navi is currently offline  navi
Messages: 107
Registered: February 2012
Location: Sydney, Australia
Experienced Member
Quote:


Take a look at WinGl package. You can just copy glew related files from there to your project and add following settings to upp project:
-D_WIN32 -DGLEW_STATIC

http://code.google.com/p/upp-mirror/source/browse/#svn%2Ftru nk%2Frainbow%2FWinGl




Thank you very much unodgs. Much appreciate your help!! Very Happy 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

Previous Topic: How to Drad & Drop individual cell in ArrayCtrl..??
Next Topic: Form with OpenGL Display object
Goto Forum:
  


Current Time: Fri Mar 29 09:18:44 CET 2024

Total time taken to generate the page: 0.01663 seconds