mirror of https://github.com/fltk/fltk
Documentation: better descriptions of Fl_Gl_Window::mode() and Fl_Gl_Window::can_do().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10857 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
1e1f1c33bd
commit
d7094249f0
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// OpenGL header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
// Copyright 1998-2015 by Bill Spitzak and others.
|
||||
//
|
||||
// This library is free software. Distribution and use rights are outlined in
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
|
@ -124,12 +124,17 @@ public:
|
|||
*/
|
||||
void context_valid(char v) {if (v) valid_f_ |= 2; else valid_f_ &= 0xfd;}
|
||||
|
||||
/** Returns non-zero if the hardware supports the given or current OpenGL mode. */
|
||||
/** Returns non-zero if the hardware supports the given OpenGL mode. */
|
||||
static int can_do(int m) {return can_do(m,0);}
|
||||
/** Returns non-zero if the hardware supports the given or current OpenGL mode. */
|
||||
/** Returns non-zero if the hardware supports the given OpenGL mode.
|
||||
\see Fl_Gl_Window::mode(const int *a) */
|
||||
static int can_do(const int *m) {return can_do(0, m);}
|
||||
/** Returns non-zero if the hardware supports the given or current OpenGL mode. */
|
||||
/** Returns non-zero if the hardware supports the current OpenGL mode. */
|
||||
int can_do() {return can_do(mode_,alist);}
|
||||
/** Returns the current OpenGL capabilites of the window.
|
||||
Don't use this if capabilities were set through Fl_Gl_Window::mode(const int *a).
|
||||
*/
|
||||
Fl_Mode mode() const {return (Fl_Mode)mode_;}
|
||||
/**
|
||||
Set or change the OpenGL capabilites of the window. The value can be
|
||||
any of the following OR'd together:
|
||||
|
@ -163,10 +168,17 @@ public:
|
|||
mode() must not be called within draw() since it
|
||||
changes the current context.
|
||||
*/
|
||||
Fl_Mode mode() const {return (Fl_Mode)mode_;}
|
||||
/** See Fl_Mode mode() const */
|
||||
int mode(int a) {return mode(a,0);}
|
||||
/** See Fl_Mode mode() const */
|
||||
/** Set the OpenGL capabilites of the window using platform-specific data.
|
||||
\param a zero-ending array of platform-specific attributes and attribute values
|
||||
<p><b>Unix/Linux platform</b>: attributes are GLX attributes adequate for the 3rd argument of
|
||||
the <tt>glXChooseVisual()</tt> function (e.g., <tt>GLX_DOUBLEBUFFER</tt>).
|
||||
<p><b>MSWindows platform</b>: this member function is of no use.
|
||||
<p><b>Mac OS X platform</b>: attributes belong to the <tt>CGLPixelFormatAttribute</tt> enumeration
|
||||
(e.g., <tt>kCGLPFADoubleBuffer</tt>) and may be followed by adequate attribute values.
|
||||
The pair <tt>kCGLPFAOpenGLProfile, kCGLOGLPVersion_3_2_Core</tt> allows to create an OpenGL V3.2 profile
|
||||
under Mac OS X 10.7 and above.
|
||||
*/
|
||||
int mode(const int *a) {return mode(0, a);}
|
||||
/** Returns a pointer to the GLContext that this window is using.
|
||||
\see void context(void* v, int destroy_flag) */
|
||||
|
|
Loading…
Reference in New Issue