[SDL] SDL and OpenGL - How do I draw?
Christophe Cavalaria
chris.cavalaria at free.fr
Sat Dec 30 06:58:12 PST 2006
Chris Rajula wrote:
> Hello everybody!
>
> I have quite recently begun coding using SDL and OpenGL, but I'm at a loss
> here... I have set up a small testing-program, but when I start drawing to
> the window using OpenGL commands followed by SDL_GL_SwapBuffers();,
> nothing happens. The window just stays black...
> I dont have that much experience in programming, so it is possible that
> something small has slipped my mind.
> Here are links to the different source files:
> http://uploads.theswedishconspiracy.com/stuff/test.cpp
> http://uploads.theswedishconspiracy.com/stuff/init.h
> http://uploads.theswedishconspiracy.com/stuff/init.cpp
>
> Can anyone help me?
>
> Thanks beforehand.
> /Chris
I faced a similar problem not long ago. Make sure you use the result of
sdl-config --cflags during build time and that you properly include SDL by
doing :
#include <SDL.h>
and NOT
#include <SDL/SDL.h>
I was debugging a small opengl app that worked for the one who wrote it and
failed on my computer with a black window like you.
More information about the SDL
mailing list