本文整理汇总了C++中TTime::Start方法的典型用法代码示例。如果您正苦于以下问题:C++ TTime::Start方法的具体用法?C++ TTime::Start怎么用?C++ TTime::Start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TTime
的用法示例。
在下文中一共展示了TTime::Start方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char** argv)
{
int width, height;
GLFWwindow* window;
if (!glfwInit())
{
fprintf(stderr, "Failed to initialize GLFW\n");
exit(EXIT_FAILURE);
}
width = 640;
height = 480;
viewport_width = width;
viewport_height = height;
window = glfwCreateWindow(width, height, "Particle Engine", NULL, NULL);
if (!window)
{
fprintf(stderr, "Failed to create GLFW window\n");
glfwTerminate();
exit(EXIT_FAILURE);
}
glfwMakeContextCurrent(window);
glfwSwapInterval(1);
glfwSetFramebufferSizeCallback(window, resize_callback);
glfwSetKeyCallback(window, key_callback);
glfwSetCursorPosCallback(window, cursor_position_callback);
glfwSetMouseButtonCallback(window, mouse_button_callback);
glfwSetScrollCallback(window, scroll_callback);
// Set initial aspect ratio
glfwGetFramebufferSize(window, &width, &height);
resize_callback(window, width, height);
render = new TBaluRender(TVec2i(width, height));
Init();
balu_time.Start();
glfwSetTime(0.0);
while (!glfwWindowShouldClose(window))
{
draw_scene(window, glfwGetTime());
glfwSwapBuffers(window);
glfwPollEvents();
}
delete render;
glfwDestroyWindow(window);
glfwTerminate();
exit(EXIT_SUCCESS);
}