Heh, I'm not sure if I'll even manage simple 2D SDL graphics in a month, let alone OpenGL.
The code:
Code:
program sdltest;
uses sdl;
var scr: PSDL_Surface;
begin
SDL_Init (SDL_INIT_VIDEO);
scr:= SDL_SetVideoMode (640, 480, 8, SDL_ANYFORMAT);
SDL_Quit;
end.
Oh, and also - which compiler are the SDL tutorials (the ones that come with it) written for? There is end; instead of end. and some other differences.
One more thing. I don't get the error checking code.
Something like this...
Code:
if ( SDL_Init (SDL_INIT_VIDEO) < 0 ) then
begin
MessageBox (0, PChar (Format ('Couldn't initialize SDL : %s', [SDL_GetError])), 'Error', MB_OK or MB_ICONHAND);
SDL_Quit;
exit;
end;
Okay, the code itself is pretty straightforward and self explanatory. But this PChar and Format in the MessageBox part... I always get an error there. Using Windows and SDL. Am I forgetting something or what? :?
Bookmarks