diff --git a/gfx/drivers/gl_shaders/opaque.cg.h b/gfx/drivers/gl_shaders/cg/opaque.cg.h similarity index 100% rename from gfx/drivers/gl_shaders/opaque.cg.h rename to gfx/drivers/gl_shaders/cg/opaque.cg.h diff --git a/gfx/drivers/gl_shaders/pipeline_nuklear.cg.h b/gfx/drivers/gl_shaders/cg/pipeline_nuklear.cg.h similarity index 100% rename from gfx/drivers/gl_shaders/pipeline_nuklear.cg.h rename to gfx/drivers/gl_shaders/cg/pipeline_nuklear.cg.h diff --git a/gfx/drivers/gl_shaders/pipeline_snow.cg.h b/gfx/drivers/gl_shaders/cg/pipeline_snow.cg.h similarity index 100% rename from gfx/drivers/gl_shaders/pipeline_snow.cg.h rename to gfx/drivers/gl_shaders/cg/pipeline_snow.cg.h diff --git a/gfx/drivers/gl_shaders/pipeline_xmb_ribbon_simple.cg.h b/gfx/drivers/gl_shaders/cg/pipeline_xmb_ribbon_simple.cg.h similarity index 100% rename from gfx/drivers/gl_shaders/pipeline_xmb_ribbon_simple.cg.h rename to gfx/drivers/gl_shaders/cg/pipeline_xmb_ribbon_simple.cg.h diff --git a/gfx/drivers/gl_shaders/cg/shaders_common.h b/gfx/drivers/gl_shaders/cg/shaders_common.h new file mode 100644 index 0000000000..e9494fe841 --- /dev/null +++ b/gfx/drivers/gl_shaders/cg/shaders_common.h @@ -0,0 +1,6 @@ +#ifndef _SHADERS_COMMON +#define _SHADERS_COMMON + +#define CG(src) "" #src + +#endif diff --git a/gfx/drivers/gl_shaders/core_alpha_blend.glsl.frag.h b/gfx/drivers/gl_shaders/glsl/frag/core_alpha_blend.glsl.frag.h similarity index 100% rename from gfx/drivers/gl_shaders/core_alpha_blend.glsl.frag.h rename to gfx/drivers/gl_shaders/glsl/frag/core_alpha_blend.glsl.frag.h diff --git a/gfx/drivers/gl_shaders/core_opaque.glsl.frag.h b/gfx/drivers/gl_shaders/glsl/frag/core_opaque.glsl.frag.h similarity index 100% rename from gfx/drivers/gl_shaders/core_opaque.glsl.frag.h rename to gfx/drivers/gl_shaders/glsl/frag/core_opaque.glsl.frag.h diff --git a/gfx/drivers/gl_shaders/core_pipeline_bokeh.glsl.frag.h b/gfx/drivers/gl_shaders/glsl/frag/core_pipeline_bokeh.glsl.frag.h similarity index 100% rename from gfx/drivers/gl_shaders/core_pipeline_bokeh.glsl.frag.h rename to gfx/drivers/gl_shaders/glsl/frag/core_pipeline_bokeh.glsl.frag.h diff --git a/gfx/drivers/gl_shaders/core_pipeline_snow.glsl.frag.h b/gfx/drivers/gl_shaders/glsl/frag/core_pipeline_snow.glsl.frag.h similarity index 100% rename from gfx/drivers/gl_shaders/core_pipeline_snow.glsl.frag.h rename to gfx/drivers/gl_shaders/glsl/frag/core_pipeline_snow.glsl.frag.h diff --git a/gfx/drivers/gl_shaders/core_pipeline_snow_simple.glsl.frag.h b/gfx/drivers/gl_shaders/glsl/frag/core_pipeline_snow_simple.glsl.frag.h similarity index 100% rename from gfx/drivers/gl_shaders/core_pipeline_snow_simple.glsl.frag.h rename to gfx/drivers/gl_shaders/glsl/frag/core_pipeline_snow_simple.glsl.frag.h diff --git a/gfx/drivers/gl_shaders/core_pipeline_snowflake.glsl.frag.h b/gfx/drivers/gl_shaders/glsl/frag/core_pipeline_snowflake.glsl.frag.h similarity index 100% rename from gfx/drivers/gl_shaders/core_pipeline_snowflake.glsl.frag.h rename to gfx/drivers/gl_shaders/glsl/frag/core_pipeline_snowflake.glsl.frag.h diff --git a/gfx/drivers/gl_shaders/core_pipeline_xmb_ribbon.glsl.frag.h b/gfx/drivers/gl_shaders/glsl/frag/core_pipeline_xmb_ribbon.glsl.frag.h similarity index 100% rename from gfx/drivers/gl_shaders/core_pipeline_xmb_ribbon.glsl.frag.h rename to gfx/drivers/gl_shaders/glsl/frag/core_pipeline_xmb_ribbon.glsl.frag.h diff --git a/gfx/drivers/gl_shaders/core_pipeline_xmb_ribbon_simple.glsl.frag.h b/gfx/drivers/gl_shaders/glsl/frag/core_pipeline_xmb_ribbon_simple.glsl.frag.h similarity index 100% rename from gfx/drivers/gl_shaders/core_pipeline_xmb_ribbon_simple.glsl.frag.h rename to gfx/drivers/gl_shaders/glsl/frag/core_pipeline_xmb_ribbon_simple.glsl.frag.h diff --git a/gfx/drivers/gl_shaders/legacy_opaque.glsl.frag.h b/gfx/drivers/gl_shaders/glsl/frag/legacy_opaque.glsl.frag.h similarity index 100% rename from gfx/drivers/gl_shaders/legacy_opaque.glsl.frag.h rename to gfx/drivers/gl_shaders/glsl/frag/legacy_opaque.glsl.frag.h diff --git a/gfx/drivers/gl_shaders/modern_alpha_blend.glsl.frag.h b/gfx/drivers/gl_shaders/glsl/frag/modern_alpha_blend.glsl.frag.h similarity index 100% rename from gfx/drivers/gl_shaders/modern_alpha_blend.glsl.frag.h rename to gfx/drivers/gl_shaders/glsl/frag/modern_alpha_blend.glsl.frag.h diff --git a/gfx/drivers/gl_shaders/modern_opaque.glsl.frag.h b/gfx/drivers/gl_shaders/glsl/frag/modern_opaque.glsl.frag.h similarity index 100% rename from gfx/drivers/gl_shaders/modern_opaque.glsl.frag.h rename to gfx/drivers/gl_shaders/glsl/frag/modern_opaque.glsl.frag.h diff --git a/gfx/drivers/gl_shaders/pipeline_bokeh.glsl.frag.h b/gfx/drivers/gl_shaders/glsl/frag/pipeline_bokeh.glsl.frag.h similarity index 100% rename from gfx/drivers/gl_shaders/pipeline_bokeh.glsl.frag.h rename to gfx/drivers/gl_shaders/glsl/frag/pipeline_bokeh.glsl.frag.h diff --git a/gfx/drivers/gl_shaders/pipeline_nuklear.glsl.frag.h b/gfx/drivers/gl_shaders/glsl/frag/pipeline_nuklear.glsl.frag.h similarity index 100% rename from gfx/drivers/gl_shaders/pipeline_nuklear.glsl.frag.h rename to gfx/drivers/gl_shaders/glsl/frag/pipeline_nuklear.glsl.frag.h diff --git a/gfx/drivers/gl_shaders/pipeline_snow.glsl.frag.h b/gfx/drivers/gl_shaders/glsl/frag/pipeline_snow.glsl.frag.h similarity index 100% rename from gfx/drivers/gl_shaders/pipeline_snow.glsl.frag.h rename to gfx/drivers/gl_shaders/glsl/frag/pipeline_snow.glsl.frag.h diff --git a/gfx/drivers/gl_shaders/pipeline_snow_simple.glsl.frag.h b/gfx/drivers/gl_shaders/glsl/frag/pipeline_snow_simple.glsl.frag.h similarity index 100% rename from gfx/drivers/gl_shaders/pipeline_snow_simple.glsl.frag.h rename to gfx/drivers/gl_shaders/glsl/frag/pipeline_snow_simple.glsl.frag.h diff --git a/gfx/drivers/gl_shaders/pipeline_snowflake.glsl.frag.h b/gfx/drivers/gl_shaders/glsl/frag/pipeline_snowflake.glsl.frag.h similarity index 100% rename from gfx/drivers/gl_shaders/pipeline_snowflake.glsl.frag.h rename to gfx/drivers/gl_shaders/glsl/frag/pipeline_snowflake.glsl.frag.h diff --git a/gfx/drivers/gl_shaders/pipeline_xmb_ribbon.glsl.frag.h b/gfx/drivers/gl_shaders/glsl/frag/pipeline_xmb_ribbon.glsl.frag.h similarity index 100% rename from gfx/drivers/gl_shaders/pipeline_xmb_ribbon.glsl.frag.h rename to gfx/drivers/gl_shaders/glsl/frag/pipeline_xmb_ribbon.glsl.frag.h diff --git a/gfx/drivers/gl_shaders/pipeline_xmb_ribbon_simple.glsl.frag.h b/gfx/drivers/gl_shaders/glsl/frag/pipeline_xmb_ribbon_simple.glsl.frag.h similarity index 100% rename from gfx/drivers/gl_shaders/pipeline_xmb_ribbon_simple.glsl.frag.h rename to gfx/drivers/gl_shaders/glsl/frag/pipeline_xmb_ribbon_simple.glsl.frag.h diff --git a/gfx/drivers/gl_shaders/glsl/frag/shaders_common.h b/gfx/drivers/gl_shaders/glsl/frag/shaders_common.h new file mode 100644 index 0000000000..655861381c --- /dev/null +++ b/gfx/drivers/gl_shaders/glsl/frag/shaders_common.h @@ -0,0 +1,6 @@ +#ifndef _SHADERS_COMMON +#define _SHADERS_COMMON + +#include "../glsl_common.h" + +#endif diff --git a/gfx/drivers/gl_shaders/shaders_common.h b/gfx/drivers/gl_shaders/glsl/glsl_common.h similarity index 92% rename from gfx/drivers/gl_shaders/shaders_common.h rename to gfx/drivers/gl_shaders/glsl/glsl_common.h index 8a97a09ba6..0c9640a08b 100644 --- a/gfx/drivers/gl_shaders/shaders_common.h +++ b/gfx/drivers/gl_shaders/glsl/glsl_common.h @@ -14,11 +14,9 @@ "#endif\n" #if defined(HAVE_OPENGLES) -#define CG(src) "" #src #define GLSL(src) GLSL_DERIV_PREAMBLE() GLSL_PREAMBLE() #src #define GLSL_330(src) "#version 330 es\n" GLSL_PREAMBLE() #src #else -#define CG(src) "" #src #define GLSL(src) "" GLSL_PREAMBLE() #src #define GLSL_300(src) "#version 300 es\n" GLSL_PREAMBLE() #src #define GLSL_330(src) "#version 330 core\n" GLSL_PREAMBLE() #src diff --git a/gfx/drivers/gl_shaders/core_alpha_blend.glsl.vert.h b/gfx/drivers/gl_shaders/glsl/vert/core_alpha_blend.glsl.vert.h similarity index 100% rename from gfx/drivers/gl_shaders/core_alpha_blend.glsl.vert.h rename to gfx/drivers/gl_shaders/glsl/vert/core_alpha_blend.glsl.vert.h diff --git a/gfx/drivers/gl_shaders/core_opaque.glsl.vert.h b/gfx/drivers/gl_shaders/glsl/vert/core_opaque.glsl.vert.h similarity index 100% rename from gfx/drivers/gl_shaders/core_opaque.glsl.vert.h rename to gfx/drivers/gl_shaders/glsl/vert/core_opaque.glsl.vert.h diff --git a/gfx/drivers/gl_shaders/legacy_opaque.glsl.vert.h b/gfx/drivers/gl_shaders/glsl/vert/legacy_opaque.glsl.vert.h similarity index 100% rename from gfx/drivers/gl_shaders/legacy_opaque.glsl.vert.h rename to gfx/drivers/gl_shaders/glsl/vert/legacy_opaque.glsl.vert.h diff --git a/gfx/drivers/gl_shaders/legacy_pipeline_snow.glsl.vert.h b/gfx/drivers/gl_shaders/glsl/vert/legacy_pipeline_snow.glsl.vert.h similarity index 100% rename from gfx/drivers/gl_shaders/legacy_pipeline_snow.glsl.vert.h rename to gfx/drivers/gl_shaders/glsl/vert/legacy_pipeline_snow.glsl.vert.h diff --git a/gfx/drivers/gl_shaders/legacy_pipeline_xmb_ribbon.glsl.vert.h b/gfx/drivers/gl_shaders/glsl/vert/legacy_pipeline_xmb_ribbon.glsl.vert.h similarity index 100% rename from gfx/drivers/gl_shaders/legacy_pipeline_xmb_ribbon.glsl.vert.h rename to gfx/drivers/gl_shaders/glsl/vert/legacy_pipeline_xmb_ribbon.glsl.vert.h diff --git a/gfx/drivers/gl_shaders/legacy_pipeline_xmb_ribbon_simple.glsl.vert.h b/gfx/drivers/gl_shaders/glsl/vert/legacy_pipeline_xmb_ribbon_simple.glsl.vert.h similarity index 100% rename from gfx/drivers/gl_shaders/legacy_pipeline_xmb_ribbon_simple.glsl.vert.h rename to gfx/drivers/gl_shaders/glsl/vert/legacy_pipeline_xmb_ribbon_simple.glsl.vert.h diff --git a/gfx/drivers/gl_shaders/modern_alpha_blend.glsl.vert.h b/gfx/drivers/gl_shaders/glsl/vert/modern_alpha_blend.glsl.vert.h similarity index 100% rename from gfx/drivers/gl_shaders/modern_alpha_blend.glsl.vert.h rename to gfx/drivers/gl_shaders/glsl/vert/modern_alpha_blend.glsl.vert.h diff --git a/gfx/drivers/gl_shaders/modern_opaque.glsl.vert.h b/gfx/drivers/gl_shaders/glsl/vert/modern_opaque.glsl.vert.h similarity index 100% rename from gfx/drivers/gl_shaders/modern_opaque.glsl.vert.h rename to gfx/drivers/gl_shaders/glsl/vert/modern_opaque.glsl.vert.h diff --git a/gfx/drivers/gl_shaders/modern_pipeline_xmb_ribbon.glsl.vert.h b/gfx/drivers/gl_shaders/glsl/vert/modern_pipeline_xmb_ribbon.glsl.vert.h similarity index 100% rename from gfx/drivers/gl_shaders/modern_pipeline_xmb_ribbon.glsl.vert.h rename to gfx/drivers/gl_shaders/glsl/vert/modern_pipeline_xmb_ribbon.glsl.vert.h diff --git a/gfx/drivers/gl_shaders/modern_pipeline_xmb_ribbon_simple.glsl.vert.h b/gfx/drivers/gl_shaders/glsl/vert/modern_pipeline_xmb_ribbon_simple.glsl.vert.h similarity index 100% rename from gfx/drivers/gl_shaders/modern_pipeline_xmb_ribbon_simple.glsl.vert.h rename to gfx/drivers/gl_shaders/glsl/vert/modern_pipeline_xmb_ribbon_simple.glsl.vert.h diff --git a/gfx/drivers/gl_shaders/pipeline_nuklear.glsl.vert.h b/gfx/drivers/gl_shaders/glsl/vert/pipeline_nuklear.glsl.vert.h similarity index 100% rename from gfx/drivers/gl_shaders/pipeline_nuklear.glsl.vert.h rename to gfx/drivers/gl_shaders/glsl/vert/pipeline_nuklear.glsl.vert.h diff --git a/gfx/drivers/gl_shaders/pipeline_snow.glsl.vert.h b/gfx/drivers/gl_shaders/glsl/vert/pipeline_snow.glsl.vert.h similarity index 100% rename from gfx/drivers/gl_shaders/pipeline_snow.glsl.vert.h rename to gfx/drivers/gl_shaders/glsl/vert/pipeline_snow.glsl.vert.h diff --git a/gfx/drivers/gl_shaders/pipeline_snow_core.glsl.vert.h b/gfx/drivers/gl_shaders/glsl/vert/pipeline_snow_core.glsl.vert.h similarity index 100% rename from gfx/drivers/gl_shaders/pipeline_snow_core.glsl.vert.h rename to gfx/drivers/gl_shaders/glsl/vert/pipeline_snow_core.glsl.vert.h diff --git a/gfx/drivers/gl_shaders/glsl/vert/shaders_common.h b/gfx/drivers/gl_shaders/glsl/vert/shaders_common.h new file mode 100644 index 0000000000..655861381c --- /dev/null +++ b/gfx/drivers/gl_shaders/glsl/vert/shaders_common.h @@ -0,0 +1,6 @@ +#ifndef _SHADERS_COMMON +#define _SHADERS_COMMON + +#include "../glsl_common.h" + +#endif diff --git a/gfx/drivers_shader/shader_gl_cg.c b/gfx/drivers_shader/shader_gl_cg.c index 4e89540b63..73619ee64f 100644 --- a/gfx/drivers_shader/shader_gl_cg.c +++ b/gfx/drivers_shader/shader_gl_cg.c @@ -39,8 +39,8 @@ #endif #ifdef HAVE_SHADERPIPELINE -#include "../drivers/gl_shaders/pipeline_xmb_ribbon_simple.cg.h" -#include "../drivers/gl_shaders/pipeline_snow.cg.h" +#include "../drivers/gl_shaders/cg/pipeline_xmb_ribbon_simple.cg.h" +#include "../drivers/gl_shaders/cg/pipeline_snow.cg.h" #endif #include "../include/Cg/cg.h" @@ -132,7 +132,7 @@ struct uniform_cg } -#include "../drivers/gl_shaders/opaque.cg.h" +#include "../drivers/gl_shaders/cg/opaque.cg.h" static void gl_cg_set_uniform_parameter( void *data, diff --git a/gfx/drivers_shader/shader_glsl.c b/gfx/drivers_shader/shader_glsl.c index f9bed812e8..8193b997f0 100644 --- a/gfx/drivers_shader/shader_glsl.c +++ b/gfx/drivers_shader/shader_glsl.c @@ -105,37 +105,39 @@ static const char *glsl_prefixes[] = { "ruby", }; -#include "../drivers/gl_shaders/modern_opaque.glsl.vert.h" -#include "../drivers/gl_shaders/modern_opaque.glsl.frag.h" -#include "../drivers/gl_shaders/core_opaque.glsl.vert.h" -#include "../drivers/gl_shaders/core_opaque.glsl.frag.h" -#include "../drivers/gl_shaders/legacy_opaque.glsl.vert.h" -#include "../drivers/gl_shaders/legacy_opaque.glsl.frag.h" -#include "../drivers/gl_shaders/modern_alpha_blend.glsl.vert.h" -#include "../drivers/gl_shaders/modern_alpha_blend.glsl.frag.h" -#include "../drivers/gl_shaders/core_alpha_blend.glsl.vert.h" -#include "../drivers/gl_shaders/core_alpha_blend.glsl.frag.h" +#include "../drivers/gl_shaders/glsl/vert/modern_opaque.glsl.vert.h" +#include "../drivers/gl_shaders/glsl/vert/core_opaque.glsl.vert.h" +#include "../drivers/gl_shaders/glsl/vert/legacy_opaque.glsl.vert.h" +#include "../drivers/gl_shaders/glsl/vert/modern_alpha_blend.glsl.vert.h" +#include "../drivers/gl_shaders/glsl/vert/core_alpha_blend.glsl.vert.h" + +#include "../drivers/gl_shaders/glsl/frag/modern_opaque.glsl.frag.h" +#include "../drivers/gl_shaders/glsl/frag/core_opaque.glsl.frag.h" +#include "../drivers/gl_shaders/glsl/frag/legacy_opaque.glsl.frag.h" +#include "../drivers/gl_shaders/glsl/frag/modern_alpha_blend.glsl.frag.h" +#include "../drivers/gl_shaders/glsl/frag/core_alpha_blend.glsl.frag.h" #ifdef HAVE_SHADERPIPELINE -#include "../drivers/gl_shaders/core_pipeline_snow.glsl.frag.h" -#include "../drivers/gl_shaders/core_pipeline_snow_simple.glsl.frag.h" -#include "../drivers/gl_shaders/core_pipeline_xmb_ribbon.glsl.frag.h" -#include "../drivers/gl_shaders/core_pipeline_xmb_ribbon_simple.glsl.frag.h" -#include "../drivers/gl_shaders/core_pipeline_bokeh.glsl.frag.h" -#include "../drivers/gl_shaders/core_pipeline_snowflake.glsl.frag.h" -#include "../drivers/gl_shaders/legacy_pipeline_xmb_ribbon_simple.glsl.vert.h" -#include "../drivers/gl_shaders/modern_pipeline_xmb_ribbon_simple.glsl.vert.h" -#include "../drivers/gl_shaders/pipeline_xmb_ribbon_simple.glsl.frag.h" -#include "../drivers/gl_shaders/pipeline_snow.glsl.frag.h" -#include "../drivers/gl_shaders/pipeline_snow.glsl.vert.h" -#include "../drivers/gl_shaders/pipeline_snow_core.glsl.vert.h" -#include "../drivers/gl_shaders/pipeline_snow_simple.glsl.frag.h" -#include "../drivers/gl_shaders/legacy_pipeline_snow.glsl.vert.h" -#include "../drivers/gl_shaders/legacy_pipeline_xmb_ribbon.glsl.vert.h" -#include "../drivers/gl_shaders/modern_pipeline_xmb_ribbon.glsl.vert.h" -#include "../drivers/gl_shaders/pipeline_xmb_ribbon.glsl.frag.h" -#include "../drivers/gl_shaders/pipeline_bokeh.glsl.frag.h" -#include "../drivers/gl_shaders/pipeline_snowflake.glsl.frag.h" +#include "../drivers/gl_shaders/glsl/vert/legacy_pipeline_xmb_ribbon_simple.glsl.vert.h" +#include "../drivers/gl_shaders/glsl/vert/modern_pipeline_xmb_ribbon_simple.glsl.vert.h" +#include "../drivers/gl_shaders/glsl/vert/pipeline_snow.glsl.vert.h" +#include "../drivers/gl_shaders/glsl/vert/pipeline_snow_core.glsl.vert.h" +#include "../drivers/gl_shaders/glsl/vert/legacy_pipeline_snow.glsl.vert.h" +#include "../drivers/gl_shaders/glsl/vert/legacy_pipeline_xmb_ribbon.glsl.vert.h" +#include "../drivers/gl_shaders/glsl/vert/modern_pipeline_xmb_ribbon.glsl.vert.h" + +#include "../drivers/gl_shaders/glsl/frag/core_pipeline_snow.glsl.frag.h" +#include "../drivers/gl_shaders/glsl/frag/core_pipeline_snow_simple.glsl.frag.h" +#include "../drivers/gl_shaders/glsl/frag/core_pipeline_xmb_ribbon.glsl.frag.h" +#include "../drivers/gl_shaders/glsl/frag/core_pipeline_xmb_ribbon_simple.glsl.frag.h" +#include "../drivers/gl_shaders/glsl/frag/core_pipeline_bokeh.glsl.frag.h" +#include "../drivers/gl_shaders/glsl/frag/core_pipeline_snowflake.glsl.frag.h" +#include "../drivers/gl_shaders/glsl/frag/pipeline_xmb_ribbon_simple.glsl.frag.h" +#include "../drivers/gl_shaders/glsl/frag/pipeline_snow.glsl.frag.h" +#include "../drivers/gl_shaders/glsl/frag/pipeline_snow_simple.glsl.frag.h" +#include "../drivers/gl_shaders/glsl/frag/pipeline_xmb_ribbon.glsl.frag.h" +#include "../drivers/gl_shaders/glsl/frag/pipeline_bokeh.glsl.frag.h" +#include "../drivers/gl_shaders/glsl/frag/pipeline_snowflake.glsl.frag.h" #endif typedef struct glsl_shader_data