RetroArch
shaders_common.h
Go to the documentation of this file.
1 #ifndef _SHADERS_COMMON
2 #define _SHADERS_COMMON
3 
4 #if defined(HAVE_OPENGLES)
5 #define CG(src) "" #src
6 #define GLSL(src) "#extension GL_OES_standard_derivatives : enable\n" \
7  "#ifdef GL_ES\n" \
8  " #ifdef GL_FRAGMENT_PRECISION_HIGH\n" \
9  " precision highp float;\n" \
10  " #else\n" \
11  " precision mediump float;\n" \
12  " #endif\n" \
13  "#else\n" \
14  " precision mediump float;\n" \
15  "#endif\n" #src
16 #define GLSL_330(src) "#version 330 es\n" \
17  "#ifdef GL_ES\n" \
18  " #ifdef GL_FRAGMENT_PRECISION_HIGH\n" \
19  " precision highp float;\n" \
20  " #else\n" \
21  " precision mediump float;\n" \
22  " #endif\n" \
23  "#else\n" \
24  " precision mediump float;\n" \
25  "#endif\n" #src
26 #else
27 #define CG(src) "" #src
28 #define GLSL(src) "" #src
29 #define GLSL_300(src) "#version 300 es\n" #src
30 #define GLSL_330(src) "#version 330 core\n" #src
31 #endif
32 
33 #endif