ref_gl: disable multisample texture for gl4es too

This commit is contained in:
Alibek Omarov 2021-11-27 05:11:45 +03:00
parent e67bd4811a
commit 76ea3c39a0
2 changed files with 6 additions and 6 deletions

View File

@ -1354,9 +1354,9 @@ APIENTRY_LINKAGE void GL_FUNCTION( glGenVertexArrays )( GLsizei n, const GLuint
APIENTRY_LINKAGE GLboolean GL_FUNCTION( glIsVertexArray )( GLuint array );
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);
#endif /* XASH_GLES */
#endif /* !XASH_GLES && !XASH_GL4ES */
#if defined( XASH_GL_STATIC ) && !defined( REF_GL_KEEP_MANGLED_FUNCTIONS )
#define pglGetError glGetError

View File

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