Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 171716 | Differences between
and this patch

Collapse All | Expand All

(-)glN64/Config_linux.cpp (-3 / +15 lines)
Lines 17-23 Link Here
17
static GtkWidget *configWindow = NULL;
17
static GtkWidget *configWindow = NULL;
18
//static GtkWidget *bitdepthCombo[2], *resolutionCombo[2];
18
//static GtkWidget *bitdepthCombo[2], *resolutionCombo[2];
19
static GtkWidget *resolutionCombo;
19
static GtkWidget *resolutionCombo;
20
static GtkWidget *enable2xSAICheck, *forceBilinearCheck, *enableFogCheck;
20
static GtkWidget *enable2xSAICheck, *enableAnisotropicFilteringCheck, *forceBilinearCheck, *enableFogCheck;
21
static GtkWidget *enableHardwareFBCheck, *enablePolygonStippleCheck;
21
static GtkWidget *enableHardwareFBCheck, *enablePolygonStippleCheck;
22
static GtkWidget *textureDepthCombo;
22
static GtkWidget *textureDepthCombo;
23
static GtkWidget *textureCacheEntry;
23
static GtkWidget *textureCacheEntry;
Lines 109-114 Link Here
109
109
110
	OGL.forceBilinear = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(forceBilinearCheck) );
110
	OGL.forceBilinear = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(forceBilinearCheck) );
111
	OGL.enable2xSaI = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(enable2xSAICheck) );
111
	OGL.enable2xSaI = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(enable2xSAICheck) );
112
	OGL.enableAnisotropicFiltering = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(enableAnisotropicFilteringCheck));
112
	OGL.fog = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(enableFogCheck) );
113
	OGL.fog = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(enableFogCheck) );
113
	OGL.frameBufferTextures = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(enableHardwareFBCheck) );
114
	OGL.frameBufferTextures = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(enableHardwareFBCheck) );
114
	OGL.usePolygonStipple = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(enablePolygonStippleCheck) );
115
	OGL.usePolygonStipple = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(enablePolygonStippleCheck) );
Lines 143-148 Link Here
143
/*	fprintf( f, "width=%d\n",                 OGL.width );
144
/*	fprintf( f, "width=%d\n",                 OGL.width );
144
	fprintf( f, "height=%d\n",                OGL.height );*/
145
	fprintf( f, "height=%d\n",                OGL.height );*/
145
	fprintf( f, "force bilinear=%d\n",        OGL.forceBilinear );
146
	fprintf( f, "force bilinear=%d\n",        OGL.forceBilinear );
147
	fprintf( f, "enable anisotropic=%d\n", OGL.enableAnisotropicFiltering );
146
	fprintf( f, "enable 2xSAI=%d\n",          OGL.enable2xSaI );
148
	fprintf( f, "enable 2xSAI=%d\n",          OGL.enable2xSaI );
147
	fprintf( f, "enable fog=%d\n",            OGL.fog );
149
	fprintf( f, "enable fog=%d\n",            OGL.fog );
148
	fprintf( f, "enable HardwareFB=%d\n",     OGL.frameBufferTextures );
150
	fprintf( f, "enable HardwareFB=%d\n",     OGL.frameBufferTextures );
Lines 182-187 Link Here
182
	gtk_entry_set_text( GTK_ENTRY(GTK_COMBO(resolutionCombo)->entry), text );
184
	gtk_entry_set_text( GTK_ENTRY(GTK_COMBO(resolutionCombo)->entry), text );
183
185
184
	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(enable2xSAICheck),          (OGL.enable2xSaI) );
186
	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(enable2xSAICheck),          (OGL.enable2xSaI) );
187
	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(enableAnisotropicFilteringCheck),          (OGL.enableAnisotropicFiltering) );
185
	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(forceBilinearCheck),        (OGL.forceBilinear) );
188
	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(forceBilinearCheck),        (OGL.forceBilinear) );
186
	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(enableFogCheck),            (OGL.fog) );
189
	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(enableFogCheck),            (OGL.fog) );
187
	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(enablePolygonStippleCheck), (OGL.usePolygonStipple) );
190
	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(enablePolygonStippleCheck), (OGL.usePolygonStipple) );
Lines 235-241 Link Here
235
	gtk_container_set_border_width( GTK_CONTAINER(displayFrame), 7 );
238
	gtk_container_set_border_width( GTK_CONTAINER(displayFrame), 7 );
236
	gtk_container_add( GTK_CONTAINER(GTK_DIALOG(configWindow)->vbox), displayFrame );
239
	gtk_container_add( GTK_CONTAINER(GTK_DIALOG(configWindow)->vbox), displayFrame );
237
240
238
	displayTable = gtk_table_new( 5, 3, FALSE );
241
	displayTable = gtk_table_new( 6, 3, FALSE );
239
	gtk_container_set_border_width( GTK_CONTAINER(displayTable), 7 );
242
	gtk_container_set_border_width( GTK_CONTAINER(displayTable), 7 );
240
	gtk_table_set_col_spacings( GTK_TABLE(displayTable), 3 );
243
	gtk_table_set_col_spacings( GTK_TABLE(displayTable), 3 );
241
	gtk_table_set_row_spacings( GTK_TABLE(displayTable), 3 );
244
	gtk_table_set_row_spacings( GTK_TABLE(displayTable), 3 );
Lines 301-307 Link Here
301
	resolutionCombo = gtk_combo_new();
304
	resolutionCombo = gtk_combo_new();
302
	gtk_combo_set_value_in_list( GTK_COMBO(resolutionCombo), TRUE, FALSE );
305
	gtk_combo_set_value_in_list( GTK_COMBO(resolutionCombo), TRUE, FALSE );
303
	gtk_combo_set_popdown_strings( GTK_COMBO(resolutionCombo), resolutionList );
306
	gtk_combo_set_popdown_strings( GTK_COMBO(resolutionCombo), resolutionList );
304
307
	
308
	enableAnisotropicFilteringCheck = gtk_check_button_new_with_label( "Enable anisotropic filtering" );
305
	enable2xSAICheck = gtk_check_button_new_with_label( "Enable 2xSAI texture scaling" );
309
	enable2xSAICheck = gtk_check_button_new_with_label( "Enable 2xSAI texture scaling" );
306
	forceBilinearCheck = gtk_check_button_new_with_label( "Force bilinear filtering" );
310
	forceBilinearCheck = gtk_check_button_new_with_label( "Force bilinear filtering" );
307
	enableFogCheck = gtk_check_button_new_with_label( "Enable fog" );
311
	enableFogCheck = gtk_check_button_new_with_label( "Enable fog" );
Lines 335-340 Link Here
335
	// row 4
339
	// row 4
336
	gtk_table_attach_defaults( GTK_TABLE(displayTable), enable2xSAICheck, 0, 1, 4, 5 );
340
	gtk_table_attach_defaults( GTK_TABLE(displayTable), enable2xSAICheck, 0, 1, 4, 5 );
337
	gtk_table_attach_defaults( GTK_TABLE(displayTable), enablePolygonStippleCheck, 1, 2, 4, 5 );
341
	gtk_table_attach_defaults( GTK_TABLE(displayTable), enablePolygonStippleCheck, 1, 2, 4, 5 );
342
	
343
	// row 5
344
	gtk_table_attach_defaults( GTK_TABLE(displayTable), enableAnisotropicFilteringCheck, 0, 1, 5, 6);
338
345
339
	// textures frame
346
	// textures frame
340
	texturesFrame = gtk_frame_new( "Textures" );
347
	texturesFrame = gtk_frame_new( "Textures" );
Lines 404-409 Link Here
404
//	OGL.windowedBits = 0;
411
//	OGL.windowedBits = 0;
405
	OGL.forceBilinear = 0;
412
	OGL.forceBilinear = 0;
406
	OGL.enable2xSaI = 0;
413
	OGL.enable2xSaI = 0;
414
	OGL.enableAnisotropicFiltering = 0;
407
	OGL.fog = 1;
415
	OGL.fog = 1;
408
	OGL.textureBitDepth = 1; // normal (16 & 32 bits)
416
	OGL.textureBitDepth = 1; // normal (16 & 32 bits)
409
	OGL.frameBufferTextures = 0;
417
	OGL.frameBufferTextures = 0;
Lines 472-477 Link Here
472
		{
480
		{
473
			OGL.enable2xSaI = atoi( val );
481
			OGL.enable2xSaI = atoi( val );
474
		}
482
		}
483
		else if (!strcasecmp( line, "enable anisotropic"))
484
		{
485
			OGL.enableAnisotropicFiltering = atoi( val );
486
		}
475
		else if (!strcasecmp( line, "enable fog" ))
487
		else if (!strcasecmp( line, "enable fog" ))
476
		{
488
		{
477
			OGL.fog = atoi( val );
489
			OGL.fog = atoi( val );
(-)glN64/OpenGL.h (+1 lines)
Lines 72-77 Link Here
72
	int		maxGeneralCombiners;
72
	int		maxGeneralCombiners;
73
73
74
	BOOL	enable2xSaI;
74
	BOOL	enable2xSaI;
75
	BOOL	enableAnisotropicFiltering;
75
	BOOL	frameBufferTextures;
76
	BOOL	frameBufferTextures;
76
	int		textureBitDepth;
77
	int		textureBitDepth;
77
	float	originAdjust;
78
	float	originAdjust;
(-)glN64/Textures.cpp (+4 lines)
Lines 748-753 Link Here
748
	// Set clamping modes
748
	// Set clamping modes
749
	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, texture->clampS ? GL_CLAMP_TO_EDGE : GL_REPEAT );
749
	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, texture->clampS ? GL_CLAMP_TO_EDGE : GL_REPEAT );
750
	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, texture->clampT ? GL_CLAMP_TO_EDGE : GL_REPEAT );
750
	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, texture->clampT ? GL_CLAMP_TO_EDGE : GL_REPEAT );
751
	
752
	// Anisotropic filtering
753
	if (OGL.enableAnisotropicFiltering)
754
		glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 4.0f);
751
755
752
	texture->lastDList = RSP.DList;
756
	texture->lastDList = RSP.DList;

Return to bug 171716