Blank screen
Hello, hi, ola oi hej hel hul hal whatever!
I'm using SDL and OpenGL for a game project. It works *perfect* under my own computer, which has Ubuntu 5.10 (Breezy badger, GNOME)..and the problem is, that it doesn't show anything on the screen except white for other people! =/
It is tested under Debian Etch and Fedora Core, also twice under different Windows comps (Ofcourse compiled on them to get the .exe). It can't be about texture loading, since I can't draw quads or triangles either.
What could be the problem?
Quote:Original post by D-Slicer
I get GL_INVALID_OPERATION all the time...where could the problem be?
Lots of gl functions throw INVALID_OPERATION. Narrow it down to the *first* call which triggers it, then look that function up in the docs. That'll tell you what you're doing wrong.
In other words, RTFM.
Mkay, after some debugging I see that SDL_CreateThread has some problems =O
int func(void* param)
{
glGetError~
}
SDL_CreateThread(func, (void*)¶m);
any ideas..?
int func(void* param)
{
glGetError~
}
SDL_CreateThread(func, (void*)¶m);
any ideas..?
Quote:Original post by D-SlicerI don't know what SDL_CreateThread does behind the scenes, but a thread must have a current OpenGL context in order to call OpenGL functions. Are you setting a current context for that new thread? In Windows this is done with wglMakeCurrent. SDL probably has its own cross-platform way to do it.
Mkay, after some debugging I see that SDL_CreateThread has some problems =O
int func(void* param)
{
glGetError~
}
SDL_CreateThread(func, (void*)¶m);
any ideas..?
Using one OpenGL context in more than one thread is usually a bad idea. I recommend doing whatever needs to be done to prepare the data in the separate thread (ie: loading files) and then sending that data to OpenGL in the OpenGL thread.
EDIT: I don't see how this would be working perfectly on your system, however I don't know too much about multithreading in Linux.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement