Skip to content

Commit

Permalink
ref/gl: do not set type on 1D textures on GLES (will fallback to 2D)
Browse files Browse the repository at this point in the history
  • Loading branch information
mittorn committed Dec 16, 2023
1 parent e43015e commit 412e999
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ref/gl/gl_image.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,9 +646,12 @@ static void GL_SetTextureTarget( gl_texture_t *tex, rgbdata_t *pic )
pic->numMips = Q_max( 1, pic->numMips );

// trying to determine texture type
#ifndef XASH_GLES
if( pic->width > 1 && pic->height <= 1 )
tex->target = GL_TEXTURE_1D;
else if( FBitSet( pic->flags, IMAGE_CUBEMAP ))
else
#endif // just skip first condition
if( FBitSet( pic->flags, IMAGE_CUBEMAP ))
tex->target = GL_TEXTURE_CUBE_MAP_ARB;
else if( FBitSet( pic->flags, IMAGE_MULTILAYER ) && pic->depth >= 1 )
tex->target = GL_TEXTURE_2D_ARRAY_EXT;
Expand Down

0 comments on commit 412e999

Please sign in to comment.