Some clean up, web version prepare

This commit is contained in:
Vladislav Khorev committed 2026-07-17 21:27:47 +03:00
1 parent e9c888e2bf
commit 0975f3b9cd
104 files changed
+779 -1483

No files matched your search

+2 -2
View File
@@ -2,7 +2,7 @@
#include <iostream>
#include "Environment.h"
namespace ZL {
namespace FRG {
FrameBuffer::FrameBuffer(int w, int h, bool useMipmaps)
: width(w), height(h), useMipmaps(useMipmaps) {
@@ -59,4 +59,4 @@ namespace ZL {
glViewport(0, 0, Environment::width, Environment::height);
}
} // namespace ZL
} // namespace FRG
+2 -2
View File
@@ -2,7 +2,7 @@
#include "render/OpenGlExtensions.h"
#include <memory>
namespace ZL {
namespace FRG {
class FrameBuffer {
private:
@@ -28,4 +28,4 @@ namespace ZL {
int getHeight() const { return height; }
};
} // namespace ZL
} // namespace FRG
+1 -1
View File
@@ -117,7 +117,7 @@ PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArray = NULL;
#endif
namespace ZL {
namespace FRG {
bool BindOpenGlFunctions()
{
+1 -1
View File
@@ -154,7 +154,7 @@ extern PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArray;
#else
#endif
namespace ZL {
namespace FRG {
+1 -1
View File
@@ -1,7 +1,7 @@
#include "render/Renderer.h"
#include <cmath>
namespace ZL {
namespace FRG {
Matrix4f MakeOrthoMatrix(float width, float height, float zNear, float zFar)
{
+1 -1
View File
@@ -8,7 +8,7 @@
#include "TextureManager.h"
#include <Eigen/Dense>
namespace ZL {
namespace FRG {
using Eigen::Vector2f;
using Eigen::Vector3f;
+1 -1
View File
@@ -6,7 +6,7 @@
#include <android/log.h>
#endif
namespace ZL {
namespace FRG {
ShaderResource::ShaderResource(const std::string &vertexCode, const std::string &fragmentCode) {
+1 -1
View File
@@ -3,7 +3,7 @@
#include "render/OpenGlExtensions.h"
#include "utils/Utils.h"
namespace ZL {
namespace FRG {
constexpr size_t CONST_MAX_SHADER_STACK_SIZE = 16;
+2 -2
View File
@@ -3,7 +3,7 @@
#include <iostream>
#include <cmath>
namespace ZL {
namespace FRG {
// Build a look-at view matrix (column-major, same convention as the engine).
static Eigen::Matrix4f lookAt(const Eigen::Vector3f& eye,
@@ -167,4 +167,4 @@ namespace ZL {
glViewport(0, 0, Environment::width, Environment::height);
}
} // namespace ZL
} // namespace FRG
+2 -2
View File
@@ -2,7 +2,7 @@
#include "render/OpenGlExtensions.h"
#include <Eigen/Dense>
namespace ZL {
namespace FRG {
class ShadowMap {
private:
@@ -44,4 +44,4 @@ namespace ZL {
const Eigen::Vector3f& getLightDirection() const { return lightDirection; }
};
} // namespace ZL
} // namespace FRG
+5 -5
View File
@@ -10,7 +10,7 @@
#include <cmath>
#include <unordered_set>
namespace ZL {
namespace FRG {
struct GlyphAtlasData {
std::unordered_map<uint32_t, GlyphInfo> glyphs;
@@ -71,13 +71,13 @@ bool TextRenderer::init(Renderer& renderer, const std::string& ttfPath, int pixe
#endif
}
ZL::CheckGlError(__FILE__, __LINE__);
FRG::CheckGlError(__FILE__, __LINE__);
if (!loadGlyphs(ttfPath, pixelSize, zipfilename)) return false;
ZL::CheckGlError(__FILE__, __LINE__);
FRG::CheckGlError(__FILE__, __LINE__);
textMesh.data.PositionData.resize(6, Eigen::Vector3f(0, 0, 0));
textMesh.RefreshVBO();
ZL::CheckGlError(__FILE__, __LINE__);
FRG::CheckGlError(__FILE__, __LINE__);
return true;
}
@@ -515,4 +515,4 @@ void TextRenderer::drawText(const std::string& text, float x, float y, float sca
// Сброс бинда текстуры не обязателен, но можно для чистоты
glBindTexture(GL_TEXTURE_2D, 0);
}
} // namespace ZL
} // namespace FRG
+2 -2
View File
@@ -9,7 +9,7 @@
#include <array>
namespace ZL {
namespace FRG {
struct GlyphInfo {
Eigen::Vector2f uv; // u,v координата левого верхнего угла в атласе (0..1)
@@ -62,4 +62,4 @@ private:
std::unordered_map<std::string, CachedText> cache;
};
} // namespace ZL
} // namespace FRG
+1 -1
View File
@@ -5,7 +5,7 @@
#endif
#include <iostream>
namespace ZL
namespace FRG
{
#ifdef EMSCRIPTEN
using std::min;
+1 -1
View File
@@ -9,7 +9,7 @@
#define PNG_ENABLED
#endif
namespace ZL
namespace FRG
{
struct TextureDataStruct {
+1 -1
View File
@@ -4,7 +4,7 @@
#include "UiManager.h"
#include <Eigen/Core>
namespace ZL
namespace FRG
{
// Axis-aligned textured quad with cached mesh. Rebuild only when rect changes.
struct UiQuad {