2016-05-28 18:18:23 +02:00
|
|
|
#ifndef _SHADERS_COMMON
|
|
|
|
#define _SHADERS_COMMON
|
|
|
|
|
2016-05-28 20:56:02 +02:00
|
|
|
#if defined(HAVE_OPENGLES)
|
2016-06-08 05:26:33 +02:00
|
|
|
#define CG(src) "" #src
|
2016-12-06 19:45:49 -05:00
|
|
|
#define GLSL(src) "#extension GL_OES_standard_derivatives : enable\n" \
|
|
|
|
"#ifdef GL_ES\n" \
|
2016-12-06 14:42:20 -05:00
|
|
|
" #ifdef GL_FRAGMENT_PRECISION_HIGH\n" \
|
|
|
|
" precision highp float;\n" \
|
|
|
|
" #else\n" \
|
|
|
|
" precision mediump float;\n" \
|
|
|
|
" #endif\n" \
|
|
|
|
"#else\n" \
|
|
|
|
" precision mediump float;\n" \
|
|
|
|
"#endif\n" #src
|
|
|
|
#define GLSL_330(src) "#version 330 es\n" \
|
|
|
|
"#ifdef GL_ES\n" \
|
|
|
|
" #ifdef GL_FRAGMENT_PRECISION_HIGH\n" \
|
|
|
|
" precision highp float;\n" \
|
|
|
|
" #else\n" \
|
|
|
|
" precision mediump float;\n" \
|
|
|
|
" #endif\n" \
|
|
|
|
"#else\n" \
|
|
|
|
" precision mediump float;\n" \
|
|
|
|
"#endif\n" #src
|
2016-05-28 20:56:02 +02:00
|
|
|
#else
|
2016-06-08 05:26:33 +02:00
|
|
|
#define CG(src) "" #src
|
2016-05-28 18:18:23 +02:00
|
|
|
#define GLSL(src) "" #src
|
2016-06-07 19:40:11 -05:00
|
|
|
#define GLSL_300(src) "#version 300 es\n" #src
|
2016-05-28 20:58:49 +02:00
|
|
|
#define GLSL_330(src) "#version 330 core\n" #src
|
2016-05-28 18:18:23 +02:00
|
|
|
#endif
|
2016-05-28 20:56:02 +02:00
|
|
|
|
2016-05-28 20:58:49 +02:00
|
|
|
#endif
|