glade port: reenable gtkglext 3d rendering
This commit is contained in:
parent
1fb75500a0
commit
f10f44b0ac
|
@ -170,8 +170,8 @@ fill_config( struct my_config *config,
|
|||
printf( " --disable-sound Disables the sound emulation\n");
|
||||
printf( " --disable-limiter Disables the 60 fps limiter\n");
|
||||
printf( " --3d-engine=ENGINE Select 3d rendering engine, available ENGINES:\n");
|
||||
printf( " 0 = 3d disabled - default\n");
|
||||
printf( " 1 = internal desmume software rasterizer\n");
|
||||
printf( " 0 = 3d disabled\n");
|
||||
printf( " 1 = internal desmume software rasterizer (default)\n");
|
||||
#ifdef INCLUDE_OPENGL_2D
|
||||
printf( " --opengl-2d Enables using OpenGL for screen rendering\n");
|
||||
printf( " --soft-convert Use software colour conversion during OpenGL\n");
|
||||
|
|
|
@ -124,7 +124,7 @@ fill_configured_features( struct configured_features *config,
|
|||
\n\
|
||||
--3d-engine=ENGINE Selects 3D rendering engine\n\
|
||||
0 = disabled\n\
|
||||
1 = internal desmume rasterizer\n\
|
||||
1 = internal desmume rasterizer (default)\n\
|
||||
2 = gtkglext off-screen 3d opengl\n\n"));
|
||||
#endif
|
||||
g_print( _("\
|
||||
|
@ -171,11 +171,11 @@ fill_configured_features( struct configured_features *config,
|
|||
char *end_char;
|
||||
int engine = strtoul( &argv[i][12], &end_char, 10);
|
||||
|
||||
if ( engine == 0 || engine == 1) {
|
||||
if ( engine >= 0 && engine <= 2) {
|
||||
config->engine_3d = engine;
|
||||
}
|
||||
else {
|
||||
g_printerr( _("Only 0(disabled) or 1(gtkglext off-screen 3d) are currently supported\n"));
|
||||
g_printerr( _("Supported 3d engines: 0, 1, 2; use --help option for details\n"));
|
||||
good_args = 0;
|
||||
}
|
||||
}
|
||||
|
@ -529,31 +529,19 @@ common_gtk_glade_main( struct configured_features *my_config) {
|
|||
gtk_widget_show(pDrawingArea2);
|
||||
|
||||
{
|
||||
int use_null_3d = !my_config->engine_3d;
|
||||
int engine = my_config->engine_3d;
|
||||
|
||||
#ifdef GTKGLEXT_AVAILABLE
|
||||
if ( !use_null_3d) {
|
||||
if ( my_config->engine_3d==2 )
|
||||
/* setup the gdk 3D emulation */
|
||||
if ( init_opengl_gdk_3Demu(GDK_DRAWABLE(pWindow->window))) {
|
||||
NDS_3D_SetDriver(1);
|
||||
|
||||
if (!gpu3D->NDS_3D_Init()) {
|
||||
fprintf( stderr, _("Failed to initialise openGL 3D emulation; "
|
||||
"removing 3D support\n"));
|
||||
use_null_3d = 1;
|
||||
if(!init_opengl_gdk_3Demu(GDK_DRAWABLE(pWindow->window))){
|
||||
fprintf( stderr, _("Failed to initialise openGL 3D emulation; "
|
||||
"removing 3D support\n"));
|
||||
engine = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
fprintf( stderr, _("Failed to setup openGL 3D emulation; "
|
||||
"removing 3D support\n"));
|
||||
use_null_3d = 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if ( use_null_3d) {
|
||||
NDS_3D_SetDriver ( 0);
|
||||
gpu3D->NDS_3D_Init();
|
||||
}
|
||||
NDS_3D_ChangeCore(engine);
|
||||
if(gpu3D == GPU3D_NULL);
|
||||
}
|
||||
|
||||
// on_menu_tileview_activate(NULL,NULL);
|
||||
|
|
|
@ -186,7 +186,7 @@ fill_configured_features( struct configured_features *config,
|
|||
#endif
|
||||
{ "3d-engine", 0, 0, G_OPTION_ARG_INT, &config->engine_3d, "Select 3d rendering engine. Available engines:\n"
|
||||
"\t\t\t\t 0 = 3d disabled\n"
|
||||
"\t\t\t\t 1 = internal rasterizer\n"
|
||||
"\t\t\t\t 1 = internal rasterizer (default)\n"
|
||||
// GTKGLEXT and LIBOSMESA are currently exclusive, so, no conflict below
|
||||
#ifdef GTKGLEXT_AVAILABLE
|
||||
"\t\t\t\t 2 = gtkglext off-screen opengl\n"
|
||||
|
|
Loading…
Reference in New Issue