8 const char builtins_src[] =
9 "#pragma MSP stage(vertex)\n"
10 "out gl_PerVertex {\n"
11 " vec4 gl_Position;\n"
12 " float gl_ClipDistance[];\n"
14 "#pragma MSP stage(geometry)\n"
16 " vec4 gl_Position;\n"
17 " float gl_ClipDistance[];\n"
19 "out gl_PerVertex {\n"
20 " vec4 gl_Position;\n"
21 " float gl_ClipDistance[];\n"
30 Module *get_builtins_module()
32 static RefPtr<Module> builtins_module;
33 static bool initialized = false;
39 Module *module = new Module(parser.parse(builtins_src, "<builtin>", BUILTIN_SOURCE));
41 builtins_module = module;
43 return builtins_module.get();
46 Stage *get_builtins(Stage::Type type)
48 Module *module = get_builtins_module();
52 for(list<Stage>::iterator i=module->stages.begin(); i!=module->stages.end(); ++i)