CSEngine
Loading...
Searching...
No Matches
OGLDef.h
1
#pragma once
2
#ifdef _WIN32
3
//windows include
4
5
#include <gl/glew.h>
6
#include <iostream>
7
8
9
#elif __ANDROID__
10
//android include
11
12
#include <jni.h>
13
#include <android/log.h>
14
15
16
#include <GLES3/gl3.h>
17
#include <EGL/egl.h>
18
19
#elif __linux__
20
21
#include <GL/glew.h>
22
//#include <GLES2/gl2.h>
23
//#include <GLES3/gl3.h>
24
#include <iostream>
25
26
#elif __EMSCRIPTEN__
27
#include <GLES3/gl3.h>
28
#include <GLFW/glfw3.h>
29
#include <iostream>
30
31
#elif IOS
32
33
#include <OpenGLES/ES3/gl.h>
34
35
#elif __APPLE_CC__
36
37
#include <glad/glad.h>
38
#include <iostream>
39
40
#endif
41
42
#include "Util/SafeLog.h"
43
#include <string>
44
45
static
void
checkGlError(
const
char
*op) {
46
int
error = glGetError();
47
if
(error != GL_NO_ERROR) {
48
#ifdef __ANDROID__
49
50
#elif IOS
51
52
#else
53
SafeLog::Log((std::string(op) +
": glError "
+ std::to_string(error)).c_str());
54
std::cout << op <<
": glError "
<< error <<
'\n'
;
55
#endif
56
}
57
}
OGLDef.h
Generated on Tue Apr 1 2025 01:19:28 for CSEngine by
1.12.0