filename | src/gtkui/main_win.c |
changeset | 635:76c63aac3590 |
prev | 618:3ade50e8603c |
next | 658:f5926310bfbe |
author | nkeynes |
date | Thu Feb 14 13:54:11 2008 +0000 (16 years ago) |
branch | lxdream-render |
permissions | -rw-r--r-- |
last change | Commit render work in progress. Main changes: * Preliminary OSMesa support * Move the generic gl code out to pvr2/ * Implement scene data structure + reader * Remove the 1/z adjustments |
file | annotate | diff | log | raw |
1.1 --- a/src/gtkui/main_win.c Wed Jan 30 02:39:57 2008 +00001.2 +++ b/src/gtkui/main_win.c Thu Feb 14 13:54:11 2008 +00001.3 @@ -250,16 +250,21 @@1.4 Display *display = gdk_x11_display_get_xdisplay( gtk_widget_get_display(win->window));1.5 Screen *screen = gdk_x11_screen_get_xscreen( gtk_widget_get_screen(win->window));1.6 int screen_no = XScreenNumberOfScreen(screen);1.7 +#ifndef HAVE_LIBOSMESA1.8 if( !video_glx_init(display, screen_no) ) {1.9 ERROR( "Unable to initialize GLX, aborting" );1.10 exit(3);1.11 }1.12 +#endif1.14 - XVisualInfo *visual = video_glx_get_visual();1.15 - GdkVisual *gdkvis = gdk_x11_screen_lookup_visual( gtk_widget_get_screen(win->window), visual->visualid );1.16 - GdkColormap *colormap = gdk_colormap_new( gdkvis, FALSE );1.17 win->video = gtk_drawing_area_new();1.18 - gtk_widget_set_colormap( win->video, colormap );1.19 +1.20 + XVisualInfo *visual = video_gtk_get_visual();1.21 + if( visual != NULL ) {1.22 + GdkVisual *gdkvis = gdk_x11_screen_lookup_visual( gtk_widget_get_screen(win->window), visual->visualid );1.23 + GdkColormap *colormap = gdk_colormap_new( gdkvis, FALSE );1.24 + gtk_widget_set_colormap( win->video, colormap );1.25 + }1.26 GTK_WIDGET_SET_FLAGS(win->video, GTK_CAN_FOCUS|GTK_CAN_DEFAULT);1.27 gtk_widget_set_size_request( win->video, 640, 480 );1.28 gtk_widget_set_double_buffered( win->video, FALSE );
.