本文整理汇总了C++中ITask::Initialize方法的典型用法代码示例。如果您正苦于以下问题:C++ ITask::Initialize方法的具体用法?C++ ITask::Initialize怎么用?C++ ITask::Initialize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITask
的用法示例。
在下文中一共展示了ITask::Initialize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
//Called after the window and OpenGL are initialized. Called exactly once, before the main loop.
void init()
{
tasks.push_back(new TaskOne());
tasks.push_back(new TaskTwo());
tasks.push_back(new TaskThree());
tasks.push_back(new TaskFour());
tasks.push_back(new BonusTask());
// initialize all our new tasks
for (TaskVector::iterator it = tasks.begin(); it != tasks.end(); it++)
{
ITask* task = (*it);
task->InitializeProgram();
task->Initialize();
}
currentTaskNumber = 0;
ITask* currentTask = tasks[currentTaskNumber];
if (currentTask != NULL)
{
currentTask->InitializeProgram();
}
glCullFace(GL_BACK); // only back faces will be culled, if enabled
glClearColor(0.3f, 0.3f, 0.3f, 1.0f); // color for cleaning the screen
}