X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Ffinalize.cpp;h=27c352098e0c0b0206616336f431e2c84de1942d;hb=241cf36a6d7735706804bb3c517529bbe078f1ee;hp=e444974ae9fbe26cc4e0168e063cd4b8177f8416;hpb=e6077f9f25b794c174e1017c2c0763e77a6fddda;p=libs%2Fgl.git diff --git a/source/glsl/finalize.cpp b/source/glsl/finalize.cpp index e444974a..27c35209 100644 --- a/source/glsl/finalize.cpp +++ b/source/glsl/finalize.cpp @@ -12,10 +12,6 @@ namespace Msp { namespace GL { namespace SL { -StructOrganizer::StructOrganizer(): - offset(-1) -{ } - void StructOrganizer::visit(StructDeclaration &strct) { SetForScope set_offset(offset, 0); @@ -238,10 +234,6 @@ void LocationAllocator::visit(InterfaceBlock &iface) } -PrecisionConverter::PrecisionConverter(): - stage(0) -{ } - void PrecisionConverter::apply(Stage &s) { stage = &s; @@ -308,10 +300,6 @@ void PrecisionConverter::visit(VariableDeclaration &var) } -LegacyConverter::LegacyConverter(): - frag_out(0) -{ } - void LegacyConverter::apply(Stage &s, const Features &feat) { stage = &s; @@ -586,6 +574,10 @@ void LegacyConverter::visit(VariableDeclaration &var) } } + if(var.name=="gl_ClipDistance") + if(const Literal *literal_size = dynamic_cast(var.array_size.get())) + stage->n_clip_distances = literal_size->value.value(); + TraversingVisitor::visit(var); }