Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
OpenGLHeaders.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
14#pragma once
15
16// =============================================================================
17// OpenGL Headers
18// =============================================================================
19
20// Web/wasm targets OpenGL ES 3.0 (WebGL 2.0). The GL backend (GLDevice.cpp) is
21// emscripten-only; a native build has no GLES headers, so this stays a no-op there
22// and only the constant fallbacks below are provided.
23#ifdef __EMSCRIPTEN__
24#include <GLES3/gl3.h>
25#endif
26
27// GL blend equation constants not guaranteed across all GLES3/WebGL2 headers
28#ifndef GL_FUNC_ADD
29 #define GL_FUNC_ADD 0x8006
30#endif
31#ifndef GL_MIN
32 #define GL_MIN 0x8007
33#endif
34#ifndef GL_MAX
35 #define GL_MAX 0x8008
36#endif
37#ifndef GL_BLEND_EQUATION
38 #define GL_BLEND_EQUATION 0x8009
39#endif
40
41// GL constants not guaranteed across all GLES3/WebGL2 headers
42#ifndef GL_CONTEXT_LOST
43 #define GL_CONTEXT_LOST 0x0507
44#endif
45#ifndef GL_CONTEXT_LOST_WEBGL
46 #define GL_CONTEXT_LOST_WEBGL 0x9242
47#endif
48#ifndef GL_INCR
49 #define GL_INCR 0x1E02
50#endif
51#ifndef GL_DECR
52 #define GL_DECR 0x1E03
53#endif
54#ifndef GL_INVERT
55 #define GL_INVERT 0x150A
56#endif
57#ifndef GL_INCR_WRAP
58 #define GL_INCR_WRAP 0x8507
59#endif
60#ifndef GL_DECR_WRAP
61 #define GL_DECR_WRAP 0x8508
62#endif