glutCreateWindow

glutCreateWindow

glutCreateWindow creates a top-level window.
glutCreateWindow创建一个顶级窗口


Usage

用法

int glutCreateWindow(char *name);

name

    ASCII character string for use as window name.
    ASCII的字符串作为窗口名

Description

描述

glutCreateWindow creates a top-level window.

glutCreateWindow创建一个顶级窗口。

The name will be provided to the window system as the window's name.

这个名字会被窗口系统作为窗口名。

 The intent is that the window system will label the window with the name.

这个意图就是窗口系统会给这个窗口标记这个名字。

Implicitly, the current window is set to the newly created window.

毫无疑问,当前窗口被设定为新创建的那个窗口。


Each created window has a unique associated OpenGL context. State changes to a window's associated OpenGL context can be done immediately after the window is created.

每一个创建了的窗口都有一个唯一相关的OpenGL环境。窗口创建之后,窗口的OpenGL环境状态改变可以很快的完成。
The display state of a window is initially for the window to be shown.

窗口的显示状态最初是要显示的窗口。

But the window's display state is not actually acted upon until glutMainLoop is entered.

事实上当glutMainLoop执行后窗口的显示状态才执行。

This means until glutMainLoop is called, rendering to a created window is ineffective because the window can not yet be displayed.

这是在说,除非调用glutMainLoop,呈现显示的窗口时无效的,因为窗口还没有被显示。

The value returned is a unique small integer identifier for the window.

返回值是窗口唯一的短整型标识符。

The range of allocated identifiers starts at one.

分配的标识符的范围从1开始。

This window identifier can be used when calling glutSetWindow.

当你调用glutSetWindow的时候可以使用这个窗口的标识符。

你可能感兴趣的:(window)