Added android version too

This commit is contained in:
Vladislav Khorev committed 2026-01-11 12:08:48 +03:00
1 parent 8089bcc0f3
commit a08ee412a6
54 files changed
+7146 -488

No files matched your search

+11 -4
View File
@@ -50,17 +50,17 @@ namespace ZL {
Matrix4f r;
// Ìàñøòàáèðîâàíèå
// ���������������
r.data()[0] = 2.f / width;
r.data()[5] = 2.f / height;
r.data()[10] = -1.f / depthRange;
// Îáíóëåíèå íåèñïîëüçóåìûõ êîìïîíåíòîâ
// ��������� �������������� �����������
r.data()[1] = r.data()[2] = r.data()[3] = 0;
r.data()[4] = r.data()[6] = r.data()[7] = 0;
r.data()[8] = r.data()[9] = r.data()[11] = 0;
// Òðàíñëÿöèÿ (ñìåùåíèå)
// ���������� (��������)
r.data()[12] = -(xmax + xmin) / width;
r.data()[13] = -(ymax + ymin) / height;
r.data()[14] = zNear / depthRange;
@@ -120,20 +120,23 @@ namespace ZL {
VAOHolder::VAOHolder()
{
#ifndef EMSCRIPTEN
#ifndef ANDROID
glGenVertexArrays(1, &vao);
#endif
#endif
}
VAOHolder::~VAOHolder()
{
#ifndef EMSCRIPTEN
#ifndef ANDROID
#ifdef __linux__
glDeleteVertexArrays(1, &vao);
#else
//Windows
glDeleteVertexArray(1, &vao);
#endif
#endif
#endif
}
@@ -365,12 +368,14 @@ namespace ZL {
//Check if main thread, check if data is not empty...
#ifndef EMSCRIPTEN
#ifndef __ANDROID__
if (!vao)
{
vao = std::make_shared<VAOHolder>();
}
glBindVertexArray(vao->getBuffer());
#endif
#endif
if (!positionVBO)
{
@@ -509,7 +514,9 @@ namespace ZL {
glActiveTexture(GL_TEXTURE0);
#ifndef EMSCRIPTEN
#ifndef __ANDROID__
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
#endif
#endif
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDepthFunc(GL_LEQUAL);