Files
MobileGL/MobileGL/Includes.h
T

137 lines
3.9 KiB
C++

#pragma once
#ifdef __ANDROID__
#define __ANDROID_API__ 26 // force Android API level to 26 for compatibility
#endif
#ifdef _WIN32
#define MOBILEGL_EXPORT extern "C" __declspec(dllexport)
#else
#define MOBILEGL_EXPORT extern "C" __attribute__((visibility("default")))
#endif
#define MOBILEGL_API MOBILEGL_EXPORT
#define MOBILEGL_GLX_API MOBILEGL_API
#define MOBILEGL_GL_API MOBILEGL_API
#define MOBILEGL_EGL_API MOBILEGL_API
#define NOMINMAX // prevent Windows.h from defining min and max macros
#include <cstring>
#include <iostream>
#include <cstdio>
#include <ctime>
#include <chrono>
#include <thread>
#include <string>
#include <string_view>
#include <map>
#include <vector>
#include <cctype>
#include <stdexcept>
#include <atomic>
#include <regex>
#include <algorithm>
#include <array>
#include <random>
#include <optional>
#include <unordered_map>
#include <queue>
#include <format>
#include <memory>
#include <bit>
#include <cstdarg>
#include <functional>
#include <expected>
#include <glslang/Public/ShaderLang.h>
#include <glslang/Include/Types.h>
#include <glslang/Public/ShaderLang.h>
#include <spirv_cross/spirv_cross_c.h>
#include <glslang/SPIRV/GlslangToSpv.h>
#include <glslang/Include/intermediate.h>
#include <glslang/MachineIndependent/localintermediate.h>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/glm.hpp>
#include <ankerl/unordered_dense.h>
#include <GLES3/gl32.h>
#include <EGL/egl.h>
#include <GL/gl.h>
#include <GL/glext.h>
#ifdef __ANDROID__
#include <android/log.h>
#include <pthread.h>
#include <vulkan/vulkan.h>
#include <vulkan/vulkan_android.h>
#include <android/native_window.h>
#include <dlfcn.h>
#include <unistd.h>
#elif defined(_WIN32)
#include <windows.h>
#include <processthreadsapi.h>
#else
#include <pthread.h>
#endif
#ifndef __ANDROID__
// Define a stub for __android_log_print if not on Android
#define ANDROID_LOG_UNKNOWN 0
#define ANDROID_LOG_DEFAULT 1
#define ANDROID_LOG_VERBOSE 2
#define ANDROID_LOG_DEBUG 3
#define ANDROID_LOG_INFO 4
#define ANDROID_LOG_WARN 5
#define ANDROID_LOG_ERROR 6
#define ANDROID_LOG_FATAL 7
#define ANDROID_LOG_SILENT 8
typedef int android_LogPriority;
inline int __android_log_print(int prio, const char* tag, const char* fmt, ...) { return 0; }
#endif
#include "MG_Util/GLExtensions.h"
#include "MG_Util/Types.h"
#include "MG_Util/Miscellany/IndexGenerator.h"
#include "MG_Util/Debug/Log.h"
#include "MG_State/GLState/ErrorState/ErrorCode.h"
#include "MG_State/GLState/ErrorState/ErrorInfo.h"
#include "MG_State/GLState/ErrorState/Error.h"
#include "MG_Backend/Backends.h"
#include "Config.h"
#include "MG_Impl/GLXImpl/LookUp/LookUp.h"
#include "MG_Impl/EGLImpl/Temporary/TemporaryEGLImpl.h"
#include "MG_State/GLState/BufferState/BufferObject.h"
#include "MG_State/GLState/BufferState/BufferState.h"
#include "MG_State/GLState/VertexArrayState/VertexArrayObject.h"
#include "MG_State/GLState/VertexArrayState/VertexArrayState.h"
/* @INSERTION_POINT:HEADER_FILE_GLIMPL@ */
#include "MG_Impl/GLImpl/VertexArray/Validators.h"
#include "MG_Impl/GLImpl/VertexArray/GL_VertexArray.h"
#include "MG_Impl/GLImpl/Getter/GL_Getter.h"
#include "MG_Impl/GLImpl/Buffer/GL_Buffer.h"
#include "MG_Impl/GLImpl/Buffer/Validators.h"
#include "MG_State/GLState/Core.h"
#include "MG_Util/Converters/MGToGL/BufferEnumConverter.h"
#include "MG_Util/Converters/MGToGL/ErrorCodeConverter.h"
#include "MG_Util/Converters/MGToGL/DataTypeConverter.h"
#include "MG_Util/Converters/MGToStr/DataTypeConverter.h"
#include "MG_Util/Converters/MGToStr/BufferEnumConverter.h"
#include "MG_Util/Converters/MGToStr/GLExtensionConverter.h"
#include "MG_Util/Converters/GLToMG/BufferEnumConverter.h"
#include "MG_Util/Converters/GLToMG/DataTypeConverter.h"
#include "MG_Util/Converters/GLToStr/GLEnumConverter.h"
#include "MG_Util/Converters/GLToGlslang/GLShaderLangConverter.h"
#include "MG_Util/ShaderTranspiler/SpvcSession.h"
#include "MG_Util/ShaderTranspiler/ShaderCompiler.h"