From: Mikko Rasa Date: Mon, 25 May 2020 18:43:29 +0000 (+0300) Subject: Mark ProgramBuilder as deprecated X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=dcd73821aeab4f659465c9e2eaac5a5e535a7b3f;p=libs%2Fgl.git Mark ProgramBuilder as deprecated --- diff --git a/source/program.cpp b/source/program.cpp index 37d72e94..116e16e7 100644 --- a/source/program.cpp +++ b/source/program.cpp @@ -32,8 +32,11 @@ Program::Program(const ProgramBuilder::StandardFeatures &features) { init(); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" ProgramBuilder builder(features); builder.add_shaders(*this); +#pragma GCC diagnostic pop link(); } @@ -425,10 +428,13 @@ void Program::Loader::geometry_shader(const string &src) void Program::Loader::standard() { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" ProgramBuilder::StandardFeatures feat; load_sub(feat); ProgramBuilder builder(feat); builder.add_shaders(obj); +#pragma GCC diagnostic pop } void Program::Loader::vertex_shader(const string &src) diff --git a/source/program.h b/source/program.h index 8c1356c2..2906fc11 100644 --- a/source/program.h +++ b/source/program.h @@ -87,7 +87,7 @@ public: Program(); /// Constructs a Program with standard features. - Program(const ProgramBuilder::StandardFeatures &); + DEPRECATED Program(const ProgramBuilder::StandardFeatures &); /// Constructs a Program from unified source code using ProgramCompiler. Program(const std::string &); diff --git a/source/programbuilder.h b/source/programbuilder.h index 053eb567..91851d13 100644 --- a/source/programbuilder.h +++ b/source/programbuilder.h @@ -51,7 +51,7 @@ The custom variables should always include at least one override for a built-in variable; otherwise they will be ignored as no built-in expression references them. */ -class ProgramBuilder +class DEPRECATED ProgramBuilder { public: /**