mirror of
https://github.com/XProger/OpenLara.git
synced 2025-02-24 07:22:58 +01:00
Merge branch 'master' of https://github.com/XProger/OpenLara
This commit is contained in:
commit
4921d3433d
@ -807,7 +807,9 @@ namespace GAPI {
|
|||||||
glGenerateMipmap(target);
|
glGenerateMipmap(target);
|
||||||
if ((opt & (OPT_VOLUME | OPT_CUBEMAP | OPT_NEAREST)) == 0 && (Core::support.maxAniso > 0)) {
|
if ((opt & (OPT_VOLUME | OPT_CUBEMAP | OPT_NEAREST)) == 0 && (Core::support.maxAniso > 0)) {
|
||||||
glTexParameteri(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, min(int(Core::support.maxAniso), 8));
|
glTexParameteri(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, min(int(Core::support.maxAniso), 8));
|
||||||
|
#if !defined(_OS_RPI) && !defined(_OS_CLOVER) // TODO
|
||||||
glTexParameteri(target, GL_TEXTURE_MAX_LEVEL, 3);
|
glTexParameteri(target, GL_TEXTURE_MAX_LEVEL, 3);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1122,9 +1124,13 @@ namespace GAPI {
|
|||||||
#ifdef _GAPI_GLES
|
#ifdef _GAPI_GLES
|
||||||
int GLES_VERSION = 1;
|
int GLES_VERSION = 1;
|
||||||
#if defined(__SDL2__)
|
#if defined(__SDL2__)
|
||||||
SDL_GL_GetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, &GLES_VERSION);
|
SDL_GL_GetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, &GLES_VERSION);
|
||||||
#else
|
#else
|
||||||
glGetIntegerv(GL_MAJOR_VERSION, &GLES_VERSION);
|
#if defined(_OS_RPI) || defined(_OS_CLOVER)
|
||||||
|
GLES_VERSION = 2;
|
||||||
|
#else
|
||||||
|
glGetIntegerv(GL_MAJOR_VERSION, &GLES_VERSION);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
GLES3 = GLES_VERSION > 2;
|
GLES3 = GLES_VERSION > 2;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
set -e
|
set -e
|
||||||
clang++ -std=c++11 -Os -s -g -marm -march=armv7ve -mtune=cortex-a7 -mfloat-abi=hard -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -Wl,--gc-sections -DNDEBUG -D__CLOVER__ main.cpp ../../libs/stb_vorbis/stb_vorbis.c ../../libs/minimp3/minimp3.cpp ../../libs/tinf/tinflate.c -I/opt/vc/include -I../../ -L/opt/vc/lib/ -lGLESv2 -lEGL -lm -lrt -lpthread -lasound -ludev -o../../../bin/OpenLara
|
clang++ -std=c++11 -Os -s -g -marm -march=armv7ve -mtune=cortex-a7 -mfloat-abi=hard -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -Wl,--gc-sections -Wno-invalid-source-encoding -DNDEBUG -D__CLOVER__ main.cpp ../../libs/stb_vorbis/stb_vorbis.c ../../libs/minimp3/minimp3.cpp ../../libs/tinf/tinflate.c -I/opt/vc/include -I../../ -L/opt/vc/lib/ -lGLESv2 -lEGL -lm -lrt -lpthread -lasound -ludev -o../../../bin/OpenLara
|
||||||
strip ../../../bin/OpenLara --strip-all --remove-section=.comment --remove-section=.note
|
strip ../../../bin/OpenLara --strip-all --remove-section=.comment --remove-section=.note
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
set -e
|
set -e
|
||||||
clang++ -std=c++11 -Os -s -g -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -Wl,--gc-sections -DNDEBUG -D__RPI__ main.cpp ../../libs/stb_vorbis/stb_vorbis.c ../../libs/minimp3/minimp3.cpp ../../libs/tinf/tinflate.c -I/opt/vc/include -I../../ -o../../../bin/OpenLara -L/opt/vc/lib/ -lbrcmGLESv2 -lbrcmEGL -lX11 -lm -lrt -lpthread -lasound -lbcm_host -ludev
|
clang++ -std=c++11 -Os -s -g -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -Wl,--gc-sections -Wno-invalid-source-encoding -DNDEBUG -D__RPI__ main.cpp ../../libs/stb_vorbis/stb_vorbis.c ../../libs/minimp3/minimp3.cpp ../../libs/tinf/tinflate.c -I/opt/vc/include -I../../ -o../../../bin/OpenLara -L/opt/vc/lib/ -lbrcmGLESv2 -lbrcmEGL -lX11 -lm -lrt -lpthread -lasound -lbcm_host -ludev
|
||||||
strip ../../../bin/OpenLara --strip-all --remove-section=.comment --remove-section=.note
|
strip ../../../bin/OpenLara --strip-all --remove-section=.comment --remove-section=.note
|
||||||
|
@ -469,6 +469,27 @@ void inputUpdate() {
|
|||||||
|
|
||||||
EGLDisplay display;
|
EGLDisplay display;
|
||||||
|
|
||||||
|
int checkLanguage() {
|
||||||
|
char *lang = getenv("LANG");
|
||||||
|
if (!lang || strlen(lang) < 2) return 0;
|
||||||
|
|
||||||
|
uint16 id;
|
||||||
|
memcpy(&id, lang, 2);
|
||||||
|
|
||||||
|
if (id == TWOCC("en")) return STR_LANG_EN - STR_LANG_EN;
|
||||||
|
if (id == TWOCC("fr")) return STR_LANG_FR - STR_LANG_EN;
|
||||||
|
if (id == TWOCC("de")) return STR_LANG_DE - STR_LANG_EN;
|
||||||
|
if (id == TWOCC("es")) return STR_LANG_ES - STR_LANG_EN;
|
||||||
|
if (id == TWOCC("it")) return STR_LANG_IT - STR_LANG_EN;
|
||||||
|
if (id == TWOCC("pl")) return STR_LANG_PL - STR_LANG_EN;
|
||||||
|
if (id == TWOCC("uk")) return STR_LANG_RU - STR_LANG_EN;
|
||||||
|
if (id == TWOCC("be")) return STR_LANG_RU - STR_LANG_EN;
|
||||||
|
if (id == TWOCC("ru")) return STR_LANG_RU - STR_LANG_EN;
|
||||||
|
if (id == TWOCC("ja")) return STR_LANG_JA - STR_LANG_EN;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
bcm_host_init();
|
bcm_host_init();
|
||||||
|
|
||||||
@ -503,6 +524,8 @@ int main(int argc, char **argv) {
|
|||||||
gettimeofday(&t, NULL);
|
gettimeofday(&t, NULL);
|
||||||
startTime = t.tv_sec;
|
startTime = t.tv_sec;
|
||||||
|
|
||||||
|
Core::defLang = checkLanguage();
|
||||||
|
|
||||||
sndInit();
|
sndInit();
|
||||||
|
|
||||||
char *lvlName = argc > 1 ? argv[1] : NULL;
|
char *lvlName = argc > 1 ? argv[1] : NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user