[ioquake3] 26/39: OpenGL2: Remove check for GL_ARB_texture_non_power_of_two.

Simon McVittie smcv at debian.org
Sat Nov 5 20:26:24 UTC 2016


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian/master
in repository ioquake3.

commit ba59df8c8c7746e17ed3a882521e3f5af985ccc4
Author: SmileTheory <SmileTheory at gmail.com>
Date:   Fri Oct 21 16:58:42 2016 -0700

    OpenGL2: Remove check for GL_ARB_texture_non_power_of_two.
    
    Core in OpenGL 2.0.
---
 code/renderergl2/tr_extensions.c | 14 --------------
 code/renderergl2/tr_image.c      | 14 +++-----------
 code/renderergl2/tr_local.h      |  1 -
 3 files changed, 3 insertions(+), 26 deletions(-)

diff --git a/code/renderergl2/tr_extensions.c b/code/renderergl2/tr_extensions.c
index 3f8460f..609303f 100644
--- a/code/renderergl2/tr_extensions.c
+++ b/code/renderergl2/tr_extensions.c
@@ -138,20 +138,6 @@ void GLimp_InitExtraExtensions()
 		ri.Printf(PRINT_ALL, result[2], extension);
 	}
 
-	// GL_ARB_texture_non_power_of_two
-	extension = "GL_ARB_texture_non_power_of_two";
-	glRefConfig.textureNonPowerOfTwo = qfalse;
-	if( GLimp_HaveExtension( extension ) )
-	{
-		glRefConfig.textureNonPowerOfTwo = qtrue; // !!r_ext_texture_non_power_of_two->integer
-
-		ri.Printf(PRINT_ALL, result[glRefConfig.textureNonPowerOfTwo], extension);
-	}
-	else
-	{
-		ri.Printf(PRINT_ALL, result[2], extension);
-	}
-
 	// GL_ARB_texture_float
 	extension = "GL_ARB_texture_float";
 	glRefConfig.textureFloat = qfalse;
diff --git a/code/renderergl2/tr_image.c b/code/renderergl2/tr_image.c
index 02e1354..aecafc7 100644
--- a/code/renderergl2/tr_image.c
+++ b/code/renderergl2/tr_image.c
@@ -1492,7 +1492,7 @@ static qboolean RawImage_ScaleToPower2( byte **data, int *inout_width, int *inou
 	//
 	// convert to exact power of 2 sizes
 	//
-	if (glRefConfig.textureNonPowerOfTwo && !mipmap)
+	if (!mipmap)
 	{
 		scaled_width = width;
 		scaled_height = height;
@@ -2749,16 +2749,8 @@ void R_CreateBuiltinImages( void ) {
 	{
 		int width, height, hdrFormat, rgbFormat;
 
-		if(glRefConfig.textureNonPowerOfTwo)
-		{
-			width = glConfig.vidWidth;
-			height = glConfig.vidHeight;
-		}
-		else
-		{
-			width = NextPowerOfTwo(glConfig.vidWidth);
-			height = NextPowerOfTwo(glConfig.vidHeight);
-		}
+		width = glConfig.vidWidth;
+		height = glConfig.vidHeight;
 
 		hdrFormat = GL_RGBA8;
 		if (r_hdr->integer && glRefConfig.framebufferObject && glRefConfig.textureFloat)
diff --git a/code/renderergl2/tr_local.h b/code/renderergl2/tr_local.h
index c24f056..696081c 100644
--- a/code/renderergl2/tr_local.h
+++ b/code/renderergl2/tr_local.h
@@ -1386,7 +1386,6 @@ typedef struct {
 	int maxRenderbufferSize;
 	int maxColorAttachments;
 
-	qboolean textureNonPowerOfTwo;
 	qboolean textureFloat;
 	textureCompressionRef_t textureCompression;
 	qboolean swizzleNormalmap;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/ioquake3.git



More information about the Pkg-games-commits mailing list