X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fglsl%2Ffinalize.cpp;h=e444974ae9fbe26cc4e0168e063cd4b8177f8416;hp=eee8a5198efa8b2037848bcc7a34bd8cd0d333ff;hb=e6077f9f25b794c174e1017c2c0763e77a6fddda;hpb=8e553af57b712051f47293c971671f4f6a939be2 diff --git a/source/glsl/finalize.cpp b/source/glsl/finalize.cpp index eee8a519..e444974a 100644 --- a/source/glsl/finalize.cpp +++ b/source/glsl/finalize.cpp @@ -261,7 +261,7 @@ void PrecisionConverter::visit(Block &block) void PrecisionConverter::visit(Precision &prec) { - if(stage->required_features.gl_api==OPENGL_ES2) + if(stage->required_features.target_api==OPENGL_ES) have_default.insert(prec.type); else nodes_to_remove.insert(&prec); @@ -269,7 +269,7 @@ void PrecisionConverter::visit(Precision &prec) void PrecisionConverter::visit(VariableDeclaration &var) { - if(stage->required_features.gl_api!=OPENGL_ES2) + if(stage->required_features.target_api!=OPENGL_ES) { var.precision.clear(); return; @@ -322,7 +322,7 @@ void LegacyConverter::apply(Stage &s, const Features &feat) NodeRemover().apply(s, nodes_to_remove); if(!stage->required_features.glsl_version) - stage->required_features.glsl_version = Version(1, (stage->required_features.gl_api==OPENGL_ES2 ? 0 : 10)); + stage->required_features.glsl_version = Version(1, (stage->required_features.target_api==OPENGL_ES ? 0 : 10)); } else unsupported(format("Stage %s is not supported", Stage::get_stage_name(s.type))); @@ -372,7 +372,7 @@ bool LegacyConverter::supports_stage(Stage::Type st) const { if(st==Stage::GEOMETRY) { - if(features.gl_api==OPENGL_ES2) + if(features.target_api==OPENGL_ES) return check_version(Version(3, 20)); else return check_version(Version(1, 50)); @@ -383,7 +383,7 @@ bool LegacyConverter::supports_stage(Stage::Type st) const bool LegacyConverter::supports_unified_interface_syntax() const { - if(features.gl_api==OPENGL_ES2) + if(features.target_api==OPENGL_ES) return check_version(Version(3, 0)); else return check_version(Version(1, 30)); @@ -407,7 +407,7 @@ void LegacyConverter::visit(Assignment &assign) bool LegacyConverter::supports_unified_sampling_functions() const { - if(features.gl_api==OPENGL_ES2) + if(features.target_api==OPENGL_ES) return check_version(Version(3, 0)); else return check_version(Version(1, 30)); @@ -452,7 +452,7 @@ void LegacyConverter::visit(FunctionCall &call) bool LegacyConverter::supports_interface_layouts() const { - if(features.gl_api==OPENGL_ES2) + if(features.target_api==OPENGL_ES) return check_version(Version(3, 0)); else if(check_version(Version(3, 30))) return true; @@ -464,7 +464,7 @@ bool LegacyConverter::supports_interface_layouts() const bool LegacyConverter::supports_stage_interface_layouts() const { - if(features.gl_api==OPENGL_ES2) + if(features.target_api==OPENGL_ES) return check_version(Version(3, 10)); else if(check_version(Version(4, 10))) return true; @@ -474,7 +474,7 @@ bool LegacyConverter::supports_stage_interface_layouts() const bool LegacyConverter::supports_centroid_sampling() const { - if(features.gl_api==OPENGL_ES2) + if(features.target_api==OPENGL_ES) return check_version(Version(3, 0)); else if(check_version(Version(1, 20))) return true; @@ -484,7 +484,7 @@ bool LegacyConverter::supports_centroid_sampling() const bool LegacyConverter::supports_sample_sampling() const { - if(features.gl_api==OPENGL_ES2) + if(features.target_api==OPENGL_ES) return check_version(Version(3, 20)); else if(check_version(Version(4, 0))) return true; @@ -494,7 +494,7 @@ bool LegacyConverter::supports_sample_sampling() const bool LegacyConverter::supports_uniform_location() const { - if(features.gl_api==OPENGL_ES2) + if(features.target_api==OPENGL_ES) return check_version(Version(3, 10)); else if(check_version(Version(4, 30))) return true; @@ -504,7 +504,7 @@ bool LegacyConverter::supports_uniform_location() const bool LegacyConverter::supports_binding() const { - if(features.gl_api==OPENGL_ES2) + if(features.target_api==OPENGL_ES) return check_version(Version(3, 10)); else return check_version(Version(4, 20)); @@ -591,7 +591,7 @@ void LegacyConverter::visit(VariableDeclaration &var) bool LegacyConverter::supports_interface_blocks(const string &iface) const { - if(features.gl_api==OPENGL_ES2) + if(features.target_api==OPENGL_ES) { if(iface=="uniform") return check_version(Version(3, 0)); @@ -608,7 +608,7 @@ bool LegacyConverter::supports_interface_blocks(const string &iface) const bool LegacyConverter::supports_interface_block_location() const { - if(features.gl_api==OPENGL_ES2) + if(features.target_api==OPENGL_ES) return check_version(Version(3, 20)); else if(check_version(Version(4, 40))) return true;