ok, I got the test to compile, no funny numbers on the screen. what compiler are you using? For mingw, if you get the "SDL-devel-1.2.15-mingw32.tar.gz" file from the SDL website, then set the SDL_DIR below to match where you put it, then:
@TEMPLATE = app
CONFIG += windows
CONFIG -= console
CONFIG -= app_bundle
CONFIG -= qt
SOURCES += SDL_TEST.cpp
SDL_DIR = C:/Users/Malcolm/comp_stuff/sdl_mingw/SDL-1.2.15
LIBS += -L$${SDL_DIR}/lib -lmingw32 -lSDLmain -lSDL
INCLUDEPATH += $${SDL_DIR}/include/SDL
DEPENDPATH += $${SDL_DIR}/include/SDL
@
should compile:
@/*
*SDL_TEST.cpp. do not use this file under any circumstances. it will probably blow up
*your computer.
*
*/
#include <cstdio>
#include <Windows.h>
#include <SDL.h>
#include <gl/GL.h>
#include <gl/GLU.h>
using namespace std;
int main(int argc, char **argv)
{
SDL_Surface *screen;
/* Initialize defaults, Video and Audio */
if((SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO)==-1)) {
printf("Could not initialize SDL: %s.\n", SDL_GetError());
exit(-1);
}
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 0 );
screen = SDL_SetVideoMode(1920, 1080, 32, SDL_HWSURFACE | /SDL_FULLSCREEN |/ SDL_OPENGL /| SDL_DOUBLEBUF/);
SDL_Delay(1000);
SDL_Quit();
return 0;
}
@
anyhow that worked for me. If you're not using mingw, I would think it shouldn't be too tough. btw, mingw and directx FTW.