Fix compilation with older sdk

This commit is contained in:
Shinovon 2026-05-01 14:34:05 +05:00
parent 52e1b18729
commit 9adfa881b3
5 changed files with 16 additions and 8 deletions

View file

@ -14,9 +14,13 @@
#include "rwwdgl.h"
#ifdef __SYMBIAN32__
#ifdef RW_GL3
#include <gles2/gl2.h>
#include <gles2/gl2ext.h>
#else
#include <gles/gl.h>
#endif
#else
#ifdef RW_OPENGL
#include "glad/glad.h"
#endif

View file

@ -457,7 +457,7 @@ setFilterMode(uint32 stage, int32 filter, int32 maxAniso = 1)
}
if(natras->maxAnisotropy != maxAniso){
setActiveTexture(stage);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, (float)maxAniso);
// glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, (float)maxAniso);
natras->maxAnisotropy = maxAniso;
}
}
@ -1365,10 +1365,6 @@ initOpenGL(void)
resetRenderState();
#ifndef __SYMBIAN32__
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &maxAnisotropy);
#endif
glEnable(GL_NORMALIZE);
openIm2D();

View file

@ -1,6 +1,6 @@
#ifdef RW_GLES1
#include <gles/gl.h>
#include <gles/glext.h>
//#include <gles/glext.h>
#include <gles/egl.h>
#endif

View file

@ -112,8 +112,13 @@ struct LLLink
}
};
#ifndef RW_GL3
#define __offsetof(type, field) (reinterpret_cast <size_t> \
(&reinterpret_cast <const volatile char &> \
(static_cast<type *> (0)->field)))
#endif
#define LLLinkGetData(linkvar,type,entry) \
((type*)(((rw::uint8*)(linkvar))-offsetof(type,entry)))
((type*)(((rw::uint8*)(linkvar))-offsetof(type,entry)))
// Have to be careful since the link might be deleted.
#define FORLIST(_link, _list) \