adjusted indentation with astyle; added Id keyword
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -9,35 +9,35 @@
|
||||
/**
|
||||
@class wxGLContext
|
||||
@wxheader{glcanvas.h}
|
||||
|
||||
|
||||
An instance of a wxGLContext represents the state of an OpenGL state machine
|
||||
and the connection between OpenGL and the system.
|
||||
|
||||
|
||||
The OpenGL state includes everything that can be set with the OpenGL API:
|
||||
colors, rendering variables, display lists, texture objects, etc.
|
||||
Although it is possible to have multiple rendering contexts share display lists
|
||||
in order to save resources,
|
||||
this method is hardly used today any more, because display lists are only a
|
||||
tiny fraction of the overall state.
|
||||
|
||||
|
||||
Therefore, one rendering context is usually used with or bound to multiple
|
||||
output windows in turn,
|
||||
so that the application has access to the complete and identical state while
|
||||
rendering into each window.
|
||||
|
||||
|
||||
Binding (making current) a rendering context with another instance of a
|
||||
wxGLCanvas however works only
|
||||
if the other wxGLCanvas was created with the same attributes as the wxGLCanvas
|
||||
from which the wxGLContext
|
||||
was initialized. (This applies to sharing display lists among contexts
|
||||
analogously.)
|
||||
|
||||
|
||||
Note that some wxGLContext features are extremely platform-specific - its best
|
||||
to check your native platform's glcanvas header (on windows include/wx/msw/glcanvas.h) to see what features your native platform provides.
|
||||
|
||||
|
||||
@library{wxgl}
|
||||
@category{gl}
|
||||
|
||||
|
||||
@seealso
|
||||
wxGLCanvas
|
||||
*/
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
/**
|
||||
Constructor.
|
||||
|
||||
@param win
|
||||
@param win
|
||||
The canvas that is used to initialize this context. This parameter is needed
|
||||
only temporarily,
|
||||
and the caller may do anything with it (e.g. destroy the window) after the
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
that has been created
|
||||
with equivalent attributes as win.
|
||||
|
||||
@param other
|
||||
@param other
|
||||
Context to share display lists with or @NULL (the default) for no sharing.
|
||||
*/
|
||||
wxGLContext(wxGLCanvas* win, const wxGLContext* other=@NULL);
|
||||
@@ -78,42 +78,42 @@ public:
|
||||
/**
|
||||
@class wxGLCanvas
|
||||
@wxheader{glcanvas.h}
|
||||
|
||||
|
||||
wxGLCanvas is a class for displaying OpenGL graphics. It is always used in
|
||||
conjunction with wxGLContext as the context can only be
|
||||
be made current (i.e. active for the OpenGL commands) when it is associated to
|
||||
a wxGLCanvas.
|
||||
|
||||
|
||||
More precisely, you first need to create a wxGLCanvas window and then create an
|
||||
instance of a wxGLContext that is initialized with this
|
||||
wxGLCanvas and then later use either wxGLCanvas::SetCurrent
|
||||
with the instance of the wxGLContext or
|
||||
wxGLCanvas and then later use either wxGLCanvas::SetCurrent
|
||||
with the instance of the wxGLContext or
|
||||
wxGLContext::SetCurrent with the instance of
|
||||
the wxGLCanvas (which might be not the same as was used
|
||||
for the creation of the context) to bind the OpenGL state that is represented
|
||||
by the rendering context to the canvas, and then finally call
|
||||
by the rendering context to the canvas, and then finally call
|
||||
wxGLCanvas::SwapBuffers to swap the buffers of
|
||||
the OpenGL canvas and thus show your current output.
|
||||
|
||||
|
||||
Notice that previous versions of wxWidgets used to implicitly create a
|
||||
wxGLContext inside wxGLCanvas itself. This is still supported in the current
|
||||
version but is deprecated now and will be removed in the future, please update
|
||||
your code to create the rendering contexts explicitly.
|
||||
|
||||
|
||||
To set up the attributes for the canvas (number of bits for the depth buffer,
|
||||
number of bits for the stencil buffer and so on) you should set up the correct
|
||||
values of
|
||||
the @e attribList parameter. The values that should be set up and their
|
||||
meanings will be described below.
|
||||
|
||||
|
||||
Notice that OpenGL is not enabled by default. To switch it on, you need to edit
|
||||
setup.h under Windows and set @c wxUSE_GLCANVAS to 1 (you may also need
|
||||
to have to add @c opengl32.lib and @c glu32.lib to the list of libraries
|
||||
your program is linked with). On Unix, pass @c --with-opengl to configure.
|
||||
|
||||
|
||||
@library{wxgl}
|
||||
@category{gl}
|
||||
|
||||
|
||||
@seealso
|
||||
wxGLContext
|
||||
*/
|
||||
@@ -124,32 +124,32 @@ public:
|
||||
Creates a window with the given parameters. Notice that you need to create and
|
||||
use a wxGLContext to output to this window.
|
||||
|
||||
If
|
||||
If
|
||||
|
||||
@param attribList is not specified, double buffered RGBA mode is used.
|
||||
|
||||
parent
|
||||
parent
|
||||
Pointer to a parent window.
|
||||
|
||||
@param id
|
||||
@param id
|
||||
Window identifier. If -1, will automatically create an identifier.
|
||||
|
||||
@param pos
|
||||
@param pos
|
||||
Window position. wxDefaultPosition is (-1, -1) which indicates that wxWidgets
|
||||
should generate a default position for the window.
|
||||
|
||||
@param size
|
||||
@param size
|
||||
Window size. wxDefaultSize is (-1, -1) which indicates that wxWidgets should
|
||||
generate a default size for the window. If no suitable size can be found, the
|
||||
window will be sized to 20x20 pixels so that the window is visible but obviously not correctly sized.
|
||||
|
||||
@param style
|
||||
@param style
|
||||
Window style.
|
||||
|
||||
@param name
|
||||
@param name
|
||||
Window name.
|
||||
|
||||
@param attribList
|
||||
@param attribList
|
||||
Array of integers. With this parameter you can set the device context
|
||||
attributes associated to this window.
|
||||
This array is zero-terminated: it should be set up with constants described in
|
||||
@@ -159,7 +159,7 @@ public:
|
||||
indicates the number of
|
||||
bits for the depth buffer, so:
|
||||
|
||||
@param palette
|
||||
@param palette
|
||||
Palette for indexed colour (i.e. non WX_GL_RGBA) mode.
|
||||
Ignored under most platforms.
|
||||
*/
|
||||
@@ -176,7 +176,7 @@ public:
|
||||
|
||||
Returns @true if attributes are supported.
|
||||
|
||||
@param attribList
|
||||
@param attribList
|
||||
See attribList for wxGLCanvas().
|
||||
*/
|
||||
static bool IsDisplaySupported(const int * attribList = @NULL);
|
||||
@@ -191,7 +191,7 @@ public:
|
||||
Makes the OpenGL state that is represented by the OpenGL rendering context
|
||||
@e context current, i.e. it will be used by all subsequent OpenGL calls.
|
||||
|
||||
This is equivalent to wxGLContext::SetCurrent
|
||||
This is equivalent to wxGLContext::SetCurrent
|
||||
called with this window as parameter.
|
||||
|
||||
Note that this function may only be called when the window is shown on screen,
|
||||
|
Reference in New Issue
Block a user