Im tring to use opengl with SDL, but im having a problem whit SDL_SetVideoMode()
Im using visual studio 2005 pro, windows 2000
theres no errors at building it, it just happens when i execute the program, heres the message:
"Windows has triggered a breakpoint in Open GL Teste1.exe.
This may be due to a corruption of the heap, and indicates a bug in Open GL Teste1.exe or any of the DLLs it has loaded.
The output window may have more diagnostic information"
So visual studio gives me a green arrow wheres my SDL_SetVideoMode function are:
[b]if(SDL_SetVideoMode(640,480,0,SDL_OPENGL)==0)cout<<SDL_GetError()<<endl;[/b]
If i take the argument “SDL_OPENGL” out it works fine…
Here’s the output of VS:
HEAP[Open GL Teste1.exe]: Invalid Address specified to RtlFreeHeap( 130000, 15cf40 )
Windows has triggered a breakpoint in Open GL Teste1.exe.
This may be due to a corruption of the heap, and indicates a bug in Open GL Teste1.exe or any of the DLLs it has loaded.
The output window may have more diagnostic information
HEAP[Open GL Teste1.exe]: Invalid Address specified to RtlFreeHeap( 130000, 1426c0 )
Windows has triggered a breakpoint in Open GL Teste1.exe.
This may be due to a corruption of the heap, and indicates a bug in Open GL Teste1.exe or any of the DLLs it has loaded.
The output window may have more diagnostic information
HEAP[Open GL Teste1.exe]: Invalid Address specified to RtlFreeHeap( 130000, 15f0e0 )
Windows has triggered a breakpoint in Open GL Teste1.exe.
This may be due to a corruption of the heap, and indicates a bug in Open GL Teste1.exe or any of the DLLs it has loaded.
The output window may have more diagnostic information
The program ‘[1076] Open GL Teste1.exe: Native’ has exited with code 0 (0x0).
Those are my additional dependences( properties/linker/input):
SDL.lib
SDLmain.lib
openGL32.lib
and my includes:
#include “SDL/SDL.h”
#include “SDL/SDL_opengl.h”
I dont know whats happening…
edit: since its the first time im tring to use opengl, maybe im missing something stupid…i don’t know…