X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fbuiltin.cpp;fp=source%2Fglsl%2Fbuiltin.cpp;h=c9483151823f973088229cbbab9f2307c0a21816;hb=c2aa5271db88180d995d5c456dc3a6aa9dc24c24;hp=670cfc2d9f4878b1d55abca1cf453adf8c628816;hpb=fd44325059d59d32d47ef3feb6d41d846f7f36f0;p=libs%2Fgl.git diff --git a/source/glsl/builtin.cpp b/source/glsl/builtin.cpp index 670cfc2d..c9483151 100644 --- a/source/glsl/builtin.cpp +++ b/source/glsl/builtin.cpp @@ -26,32 +26,34 @@ Module *get_builtins_module() Module *module = new Module(parser.parse(*io, "", BUILTIN_SOURCE)); NodeList &shared_body = module->shared.content.body; + NodeList::iterator insert_point = shared_body.begin(); RefPtr type = new BasicTypeDeclaration; type->source = BUILTIN_SOURCE; type->name = "void"; type->kind = BasicTypeDeclaration::VOID; - shared_body.insert(shared_body.begin(), type); + shared_body.insert(insert_point, type); type = new BasicTypeDeclaration; type->source = BUILTIN_SOURCE; type->name = "bool"; + type->size = 1; type->kind = BasicTypeDeclaration::BOOL; - shared_body.insert(shared_body.begin(), type); + shared_body.insert(insert_point, type); type = new BasicTypeDeclaration; type->source = BUILTIN_SOURCE; type->name = "int"; type->size = 32; type->kind = BasicTypeDeclaration::INT; - shared_body.insert(shared_body.begin(), type); + shared_body.insert(insert_point, type); type = new BasicTypeDeclaration; type->source = BUILTIN_SOURCE; type->name = "float"; type->size = 32; type->kind = BasicTypeDeclaration::FLOAT; - shared_body.insert(shared_body.begin(), type); + shared_body.insert(insert_point, type); TypeResolver().apply(module->shared); for(list::iterator i=module->stages.begin(); i!=module->stages.end(); ++i)