mirror of
https://github.com/libretro/RetroArch
synced 2025-04-03 10:21:31 +00:00
Cleanup shaders_common.h
This commit is contained in:
parent
747bf136f2
commit
c1de2e5697
@ -1,33 +1,27 @@
|
|||||||
#ifndef _SHADERS_COMMON
|
#ifndef _SHADERS_COMMON
|
||||||
#define _SHADERS_COMMON
|
#define _SHADERS_COMMON
|
||||||
|
|
||||||
|
#define GLSL_DERIV_PREAMBLE() "#extension GL_OES_standard_derivatives : enable\n"
|
||||||
|
#define GLSL_PREAMBLE() \
|
||||||
|
"#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"
|
||||||
|
|
||||||
#if defined(HAVE_OPENGLES)
|
#if defined(HAVE_OPENGLES)
|
||||||
#define CG(src) "" #src
|
#define CG(src) "" #src
|
||||||
#define GLSL(src) "#extension GL_OES_standard_derivatives : enable\n" \
|
#define GLSL(src) GLSL_DERIV_PREAMBLE() GLSL_PREAMBLE() #src
|
||||||
"#ifdef GL_ES\n" \
|
#define GLSL_330(src) "#version 330 es\n" GLSL_PREAMBLE() #src
|
||||||
" #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
|
|
||||||
#else
|
#else
|
||||||
#define CG(src) "" #src
|
#define CG(src) "" #src
|
||||||
#define GLSL(src) "" #src
|
#define GLSL(src) "" GLSL_PREAMBLE() #src
|
||||||
#define GLSL_300(src) "#version 300 es\n" #src
|
#define GLSL_300(src) "#version 300 es\n" GLSL_PREAMBLE() #src
|
||||||
#define GLSL_330(src) "#version 330 core\n" #src
|
#define GLSL_330(src) "#version 330 core\n" GLSL_PREAMBLE() #src
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user