From f79cc70d446bc554ac5976fe20beaea4de7fdb99 Mon Sep 17 00:00:00 2001 From: Emmanuel Benoit Date: Mon, 2 Oct 2017 09:31:50 +0200 Subject: [PATCH] Moved shaders to subdir --- programs.cc | 7 +++---- bloom-highpass.glsl => shaders/bloom-highpass.glsl | 0 blur-pass.glsl => shaders/blur-pass.glsl | 0 combine.glsl => shaders/combine.glsl | 0 copy.glsl => shaders/copy.glsl | 0 dof-common.glsl => shaders/dof-common.glsl | 0 dof-pass1.glsl => shaders/dof-pass1.glsl | 0 dof-pass2.glsl => shaders/dof-pass2.glsl | 0 downsample.glsl => shaders/downsample.glsl | 0 fsquad.glsl => shaders/fsquad.glsl | 0 map.glsl => shaders/map.glsl | 0 raymarch-header.glsl => shaders/raymarch-header.glsl | 0 raymarcher.glsl => shaders/raymarcher.glsl | 0 13 files changed, 3 insertions(+), 4 deletions(-) rename bloom-highpass.glsl => shaders/bloom-highpass.glsl (100%) rename blur-pass.glsl => shaders/blur-pass.glsl (100%) rename combine.glsl => shaders/combine.glsl (100%) rename copy.glsl => shaders/copy.glsl (100%) rename dof-common.glsl => shaders/dof-common.glsl (100%) rename dof-pass1.glsl => shaders/dof-pass1.glsl (100%) rename dof-pass2.glsl => shaders/dof-pass2.glsl (100%) rename downsample.glsl => shaders/downsample.glsl (100%) rename fsquad.glsl => shaders/fsquad.glsl (100%) rename map.glsl => shaders/map.glsl (100%) rename raymarch-header.glsl => shaders/raymarch-header.glsl (100%) rename raymarcher.glsl => shaders/raymarcher.glsl (100%) diff --git a/programs.cc b/programs.cc index 48f3b14..16ea83e 100644 --- a/programs.cc +++ b/programs.cc @@ -67,11 +67,10 @@ bool T_ShaderCode::loadPart( { assert( code[ index ] == nullptr ); - FILE * f = fopen( source.c_str( ) , "r" ); + const std::string sPath( "shaders/" + source ); + FILE * f = fopen( sPath.c_str( ) , "r" ); if ( !f ) { - std::string error( "File not found: " ); - error += source; - errors.push_back( error ); + errors.push_back( std::string( "File not found: " + sPath ) ); return false; } diff --git a/bloom-highpass.glsl b/shaders/bloom-highpass.glsl similarity index 100% rename from bloom-highpass.glsl rename to shaders/bloom-highpass.glsl diff --git a/blur-pass.glsl b/shaders/blur-pass.glsl similarity index 100% rename from blur-pass.glsl rename to shaders/blur-pass.glsl diff --git a/combine.glsl b/shaders/combine.glsl similarity index 100% rename from combine.glsl rename to shaders/combine.glsl diff --git a/copy.glsl b/shaders/copy.glsl similarity index 100% rename from copy.glsl rename to shaders/copy.glsl diff --git a/dof-common.glsl b/shaders/dof-common.glsl similarity index 100% rename from dof-common.glsl rename to shaders/dof-common.glsl diff --git a/dof-pass1.glsl b/shaders/dof-pass1.glsl similarity index 100% rename from dof-pass1.glsl rename to shaders/dof-pass1.glsl diff --git a/dof-pass2.glsl b/shaders/dof-pass2.glsl similarity index 100% rename from dof-pass2.glsl rename to shaders/dof-pass2.glsl diff --git a/downsample.glsl b/shaders/downsample.glsl similarity index 100% rename from downsample.glsl rename to shaders/downsample.glsl diff --git a/fsquad.glsl b/shaders/fsquad.glsl similarity index 100% rename from fsquad.glsl rename to shaders/fsquad.glsl diff --git a/map.glsl b/shaders/map.glsl similarity index 100% rename from map.glsl rename to shaders/map.glsl diff --git a/raymarch-header.glsl b/shaders/raymarch-header.glsl similarity index 100% rename from raymarch-header.glsl rename to shaders/raymarch-header.glsl diff --git a/raymarcher.glsl b/shaders/raymarcher.glsl similarity index 100% rename from raymarcher.glsl rename to shaders/raymarcher.glsl