Browse Source

ref_gl: fix gles1 and gles2 build

pull/2/head
Alibek Omarov 3 years ago
parent
commit
e67bd4811a
  1. 5
      ref_gl/gl_export.h
  2. 4
      ref_gl/gl_image.c

5
ref_gl/gl_export.h

@ -1182,7 +1182,6 @@ APIENTRY_LINKAGE void GL_FUNCTION( glTexGeni )(GLenum coord, GLenum pname, GLint @@ -1182,7 +1182,6 @@ APIENTRY_LINKAGE void GL_FUNCTION( glTexGeni )(GLenum coord, GLenum pname, GLint
APIENTRY_LINKAGE void GL_FUNCTION( glTexGeniv )(GLenum coord, GLenum pname, const GLint *params);
APIENTRY_LINKAGE void GL_FUNCTION( glTexImage1D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
APIENTRY_LINKAGE void GL_FUNCTION( glTexImage2D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
APIENTRY_LINKAGE void GL_FUNCTION( glTexImage2DMultisample )(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
APIENTRY_LINKAGE void GL_FUNCTION( glTexParameterf )(GLenum target, GLenum pname, GLfloat param);
APIENTRY_LINKAGE void GL_FUNCTION( glTexParameterfv )(GLenum target, GLenum pname, const GLfloat *params);
APIENTRY_LINKAGE void GL_FUNCTION( glTexParameteri )(GLenum target, GLenum pname, GLint param);
@ -1355,6 +1354,10 @@ APIENTRY_LINKAGE void GL_FUNCTION( glGenVertexArrays )( GLsizei n, const GLuint @@ -1355,6 +1354,10 @@ 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 )
APIENTRY_LINKAGE void GL_FUNCTION( glTexImage2DMultisample )(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
#endif /* XASH_GLES */
#if defined( XASH_GL_STATIC ) && !defined( REF_GL_KEEP_MANGLED_FUNCTIONS )
#define pglGetError glGetError
#define pglGetString glGetString

4
ref_gl/gl_image.c

@ -1047,6 +1047,7 @@ static void GL_TextureImageRAW( gl_texture_t *tex, GLint side, GLint level, GLin @@ -1047,6 +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 )
samplesCount = (GLsizei)gEngfuncs.pfnGetCvarFloat("gl_msaa_samples");
switch (samplesCount)
{
@ -1059,6 +1060,9 @@ static void GL_TextureImageRAW( gl_texture_t *tex, GLint side, GLint level, GLin @@ -1059,6 +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 // 2D or RECT
{

Loading…
Cancel
Save