SDL + GTK +OPENGL Example

Hi folks,

I searched the archives sometime ago and saw that Sam one time sent an
SDL/GTK/OPENGL example.
Anyone has it and could send to me ?

Im getting a hard time on this. Im using SDL/GTK in Win32 without
problems. But when I add SDL_OPENGL flag to the SetVideoMode my app crashes!

Here’s some code:

gtk_widget_show (window);

{
    char SDL_windowhack[32];

    sprintf(SDL_windowhack,"SDL_WINDOWID=%ld",

        gdk_win32_drawable_get_handle(window->window));

    putenv(SDL_windowhack);
}

//////////////////////////////////////////////////////////////// SDL

const SDL_VideoInfo* info = NULL;

SDL_Init( SDL_INIT_VIDEO );


info = SDL_GetVideoInfo();

SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 8);
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 8);
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8);
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, info->vfmt->BitsPerPixel);
//SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1);

screen = SDL_SetVideoMode( 640, 480, 32, SDL_SWSURFACE | SDL_OPENGL  

); <======= HERE IS THE PROBLEM

//////////////////////////////////////////////////////////////// SDL

Thnxs ppl!

Bruce