* NEW: Add dependency to libglew, needed for gb.opengl component.

libglew : http://glew.sourceforge.net/



git-svn-id: svn://localhost/gambas/trunk@2507 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Laurent Carlier 2009-12-24 09:23:24 +00:00
parent 93969ee0b3
commit aaeaf5e5bc
3 changed files with 11 additions and 3 deletions

View file

@ -33,8 +33,8 @@ GB_COMPONENT(
[SDL],
[src],
[GB_FIND(SDL_opengl.h SDL.h SDL_image.h SDL_ttf.h, `sdl-config --prefix`, include/SDL)],
[GB_FIND(libSDL_image.$SHLIBEXT libSDL_ttf.$SHLIBEXT , /usr /usr/X11R6 /usr/local `sdl-config --prefix`, lib)],
[$X_LIBS -lSDL_image -lSDL_ttf -lGLU],
[GB_FIND(libSDL_image.$SHLIBEXT libSDL_ttf.$SHLIBEXT libGLEW.$SHLIBEXT, /usr /usr/X11R6 /usr/local `sdl-config --prefix`, lib)],
[$X_LIBS -lSDL_image -lSDL_ttf -lGLU -lGLEW],
[$SDL_CFLAGS])
AC_OUTPUT( \

View file

@ -23,9 +23,9 @@
#ifndef __SDL_H_H
#define __SDL_H_H
#include <GL/glew.h>
#include "SDL.h"
#include "SDL_syswm.h"
#include "SDL_opengl.h"
#include <X11/cursorfont.h>
#include "SDLapp.h"

View file

@ -64,6 +64,14 @@ void SDLwindow::Show()
return;
}
GLenum err = glewInit();
if (GLEW_OK != err)
{
/* Problem: glewInit failed, something is seriously wrong. */
fprintf(stderr, "Error: Failed to init GLEW \n%s\n", glewGetErrorString(err));
return;
}
hCtx = glXGetCurrentContext();
hDrw = glXGetCurrentDrawable();
hDpy = glXGetCurrentDisplay();