Browse Source

ref_gl: disable multisample texture for gl4es too

pull/2/head
Alibek Omarov 3 years ago
parent
commit
76ea3c39a0
  1. 4
      ref_gl/gl_export.h
  2. 8
      ref_gl/gl_image.c

4
ref_gl/gl_export.h

@ -1354,9 +1354,9 @@ APIENTRY_LINKAGE void GL_FUNCTION( glGenVertexArrays )( GLsizei n, const GLuint
APIENTRY_LINKAGE GLboolean GL_FUNCTION( glIsVertexArray )( GLuint array ); APIENTRY_LINKAGE GLboolean GL_FUNCTION( glIsVertexArray )( GLuint array );
APIENTRY_LINKAGE void GL_FUNCTION( glSwapInterval ) ( int interval ); APIENTRY_LINKAGE void GL_FUNCTION( glSwapInterval ) ( int interval );
#if defined( XASH_GLES ) #if !defined( XASH_GLES ) && !defined( XASH_GL4ES )
APIENTRY_LINKAGE void GL_FUNCTION( glTexImage2DMultisample )(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); APIENTRY_LINKAGE void GL_FUNCTION( glTexImage2DMultisample )(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
#endif /* XASH_GLES */ #endif /* !XASH_GLES && !XASH_GL4ES */
#if defined( XASH_GL_STATIC ) && !defined( REF_GL_KEEP_MANGLED_FUNCTIONS ) #if defined( XASH_GL_STATIC ) && !defined( REF_GL_KEEP_MANGLED_FUNCTIONS )
#define pglGetError glGetError #define pglGetError glGetError

8
ref_gl/gl_image.c

@ -1047,7 +1047,7 @@ static void GL_TextureImageRAW( gl_texture_t *tex, GLint side, GLint level, GLin
} }
else if( tex->target == GL_TEXTURE_2D_MULTISAMPLE ) else if( tex->target == GL_TEXTURE_2D_MULTISAMPLE )
{ {
#if !defined( XASH_GLES ) #if !defined( XASH_GLES ) && !defined( XASH_GL4ES )
samplesCount = (GLsizei)gEngfuncs.pfnGetCvarFloat("gl_msaa_samples"); samplesCount = (GLsizei)gEngfuncs.pfnGetCvarFloat("gl_msaa_samples");
switch (samplesCount) switch (samplesCount)
{ {
@ -1060,9 +1060,9 @@ static void GL_TextureImageRAW( gl_texture_t *tex, GLint side, GLint level, GLin
samplesCount = 1; samplesCount = 1;
} }
pglTexImage2DMultisample( tex->target, samplesCount, tex->format, width, height, GL_TRUE ); pglTexImage2DMultisample( tex->target, samplesCount, tex->format, width, height, GL_TRUE );
#else /* XASH_GLES */ #else /* !XASH_GLES && !XASH_GL4ES */
Con_Printf( S_ERROR "GLES renderer don't support GL_TEXTURE_2D_MULTISAMPLE!\n" ); gEngfuncs.Con_Printf( S_ERROR "GLES renderer don't support GL_TEXTURE_2D_MULTISAMPLE!\n" );
#endif /* XASH_GLES */ #endif /* !XASH_GLES && !XASH_GL4ES */
} }
else // 2D or RECT else // 2D or RECT
{ {

Loading…
Cancel
Save