ModelWorld* CreateModelWorld() { ModelWorld* world = new ModelWorld; memset(world, 0, sizeof(ModelWorld)); InitReferenceCounter(&world->refCounter); REPEAT(MAX_MODELS, i) world->drawEntries[i].generatedVariableSet = CreateShaderVariableSet(); return world; }
LightWorld* CreateLightWorld( const char* lightCountUniformName, const char* lightPositionName ) { LightWorld* world = new LightWorld; memset(world, 0, sizeof(LightWorld)); InitReferenceCounter(&world->refCounter); CopyString(lightCountUniformName, world->lightCountUniformName, sizeof(world->lightCountUniformName)); CopyString(lightPositionName, world->lightPositionName, sizeof(world->lightPositionName)); world->shaderVariableSet = CreateShaderVariableSet(); return world; }
void InitShader() { GlobalShaderVariableSet = CreateShaderVariableSet(); }