Update emscripten version
This commit is contained in:
1 parent
ea8f64c940
commit
2a7498695a
18 files changed
+76
-66
No files matched your search
+7
-7
@@ -1,4 +1,4 @@
|
||||
#include "Game.h"
|
||||
#include "Game.h"
|
||||
#include "AnimatedModel.h"
|
||||
#include "Localization.h"
|
||||
#include "utils/Utils.h"
|
||||
@@ -17,7 +17,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef EMSCRIPTEN
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#include <emscripten.h>
|
||||
#endif
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace FRG
|
||||
static const float zoomMax = 20.0f;
|
||||
|
||||
|
||||
#ifdef EMSCRIPTEN
|
||||
#ifdef __EMSCRIPTEN__
|
||||
const char* CONST_ZIP_FILE = "resources.zip";
|
||||
const char* CONST_MUSIC_ZIP_FILE = "music.zip";
|
||||
#else
|
||||
@@ -46,7 +46,7 @@ namespace FRG
|
||||
float y = 0;
|
||||
float z = 0;
|
||||
|
||||
#ifdef EMSCRIPTEN
|
||||
#ifdef __EMSCRIPTEN__
|
||||
Game* Game::s_instance = nullptr;
|
||||
|
||||
// Коллбэк успешной загрузки resources.zip
|
||||
@@ -103,7 +103,7 @@ namespace FRG
|
||||
renderer.InitOpenGL();
|
||||
//logger() << "Android test step 1 " << std::endl;
|
||||
|
||||
#if defined(EMSCRIPTEN) || defined(__ANDROID__)
|
||||
#if defined(__EMSCRIPTEN__) || defined(__ANDROID__)
|
||||
// These shaders and loading.png are preloaded separately (not from zip),
|
||||
// so they are available immediately without waiting for resources.zip.
|
||||
//logger() << "Android test step 1 " << std::endl;
|
||||
@@ -143,7 +143,7 @@ namespace FRG
|
||||
loadingMesh.data = CreateRect2D({ 0.0f, 0.0f }, { minDimension * 0.5f, minDimension * 0.5f }, 3);
|
||||
loadingMesh.RefreshVBO();
|
||||
|
||||
#ifdef EMSCRIPTEN
|
||||
#ifdef __EMSCRIPTEN__
|
||||
s_instance = this;
|
||||
|
||||
std::string resPath = FRG::getPersistentResourcePath("resources.zip");
|
||||
@@ -217,7 +217,7 @@ namespace FRG
|
||||
loadSteps.push([this]() {
|
||||
|
||||
|
||||
#if defined(EMSCRIPTEN) || defined(__ANDROID__)
|
||||
#if defined(__EMSCRIPTEN__) || defined(__ANDROID__)
|
||||
renderer.shaderManager.AddShaderFromFiles("env_sky", "resources/shaders/env_sky.vertex", "resources/shaders/env_sky_web.fragment", CONST_ZIP_FILE);
|
||||
renderer.shaderManager.AddShaderFromFiles("defaultAtmosphere", "resources/shaders/defaultAtmosphere.vertex", "resources/shaders/defaultAtmosphere_web.fragment", CONST_ZIP_FILE);
|
||||
renderer.shaderManager.AddShaderFromFiles("planetBake", "resources/shaders/planet_bake.vertex", "resources/shaders/planet_bake_web.fragment", CONST_ZIP_FILE);
|
||||
|
||||
Reference in new issue
Block a user