-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathIncludes.h
More file actions
75 lines (63 loc) · 1.34 KB
/
Includes.h
File metadata and controls
75 lines (63 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef _INCLUDES_H_
#define _INCLUDES_H_
#include "Configuration.h"
#ifdef _WIN32
#define NOMINMAX
#if __has_include(<Windows.h>)
#include <Windows.h>
#else
#include <windows.h>
#endif
#define GLEW_STATIC
#else
#define GL_GLEXT_PROTOTYPES
#endif
#if __has_include(<GL/gl.h>)
#include <GL/gl.h>
#elif __has_include(<GLES3/gl3.h>)
#include <GLES3/gl3.h>
#include <GLES3/gl3ext.h>
#else
#error OpenGL Headers not found
#endif
#ifdef _WIN32
#include <glext.h>
#include <wglext.h>
#endif
#ifdef GL_TEXTURE_RECTANGLE
#define USE_GL_TEXTURE_RECTANGLE
#endif
#ifdef USE_GL_TEXTURE_RECTANGLE
#define TARGET_TEXTRUE GL_TEXTURE_RECTANGLE
#else
#define TARGET_TEXTRUE GL_TEXTURE_2D
#endif
#define unused [[maybe_unused]]
#include <thread>
#include <stddef.h>
#include <stdint.h>
#include <chrono>
#include <iostream>
#include <glm/glm.hpp>
#include "PlatformDependent.h"
#include "Types.h"
#include "Global.h"
#include "Computation.h"
#include "FractalContext.h"
#include "Evaluator.h"
#include "HInfLAEvaluator.h"
#include "JitEvaluator.h"
#include "MainWindow.h"
#include "Render.h"
inline uint32_t CountLeadingZeros(uint32_t n) {
#if __has_builtin(__builtin_subcll)
return __builtin_clz(n);
#elif defined(_WIN32)
return _lzcnt_u32(n);
#else
#error
#endif
}
#define if_likely(...) if (__VA_ARGS__) [[likely]]
#define if_unlikely(...) if (__VA_ARGS__) [[unlikely]]
#endif