ClanLib
2.3.7
|
OpenGL specific display window description. More...
#include <opengl_window_description.h>
Public Member Functions | |
Construction | |
CL_OpenGLWindowDescription () | |
Constructs a window description with default values. More... | |
CL_OpenGLWindowDescription (const CL_DisplayWindowDescription &desc) | |
Constructs a OpenGLWindowDescription. More... | |
CL_OpenGLWindowDescription & | operator= (CL_DisplayWindowDescription &desc) |
virtual | ~CL_OpenGLWindowDescription () |
Attributes | |
bool | get_doublebuffer () const |
Returns true if only double-buffered visuals are considered. More... | |
bool | get_stereo () const |
Returns true if only stereo visuals are considered. More... | |
int | get_buffer_size () const |
Returns the desired color buffer size. More... | |
int | get_red_size () const |
Returns the minimum required red buffer. More... | |
int | get_green_size () const |
Returns the minimum required green buffer. More... | |
int | get_blue_size () const |
Returns the minimum required blue buffer. More... | |
int | get_alpha_size () const |
Returns the minimum required alpha buffer. More... | |
int | get_multisampling () const |
Returns the number of samples per pixel. More... | |
int | get_version_major () const |
Returns selected major version number. More... | |
int | get_version_minor () const |
Returns selected minor version number. More... | |
bool | get_allow_lower_versions () const |
Returns true if allowed lower versions than the selected version. More... | |
bool | get_debug () const |
Returns true if the debug flag is set. More... | |
bool | get_forward_compatible () const |
Returns true if the forward compatible flag is set. More... | |
bool | get_core_profile () const |
Returns true if the core profile flag is set. More... | |
bool | get_compatibility_profile () const |
Returns true if the compatibility profile flag is set. More... | |
int | get_layer_plane () const |
Returns the layer plane value. More... | |
Operations | |
void | set_doublebuffer (bool value) |
Sets if only double-buffered visuals are considered. More... | |
void | set_stereo (bool value) |
Sets if only stereo visuals are to be considered. More... | |
void | set_buffer_size (int value) |
Sets the desired color buffer size. More... | |
void | set_red_size (int value) |
Sets the minimum required red buffer. More... | |
void | set_green_size (int value) |
Sets the minimum required green buffer. More... | |
void | set_blue_size (int value) |
Sets the minimum required blue buffer. More... | |
void | set_alpha_size (int value) |
Sets the minimum required alpha buffer. More... | |
void | set_multisampling (int value) |
Sets the number of samples per pixel. More... | |
void | set_version (int major, int minor, bool allow_lower_versions) |
Select the OpenGL version number. More... | |
void | set_debug (bool enable) |
Sets the debug flag. More... | |
void | set_forward_compatible (bool enable) |
Sets the forward compatible flag. More... | |
void | set_core_profile (bool enable) |
Sets the core profile flag. More... | |
void | set_compatibility_profile (bool enable) |
Sets the compatibility profile flag. More... | |
void | set_layer_plane (int value) |
Sets the layer plane value. More... | |
Attributes | |
const CL_String & | get_title () const |
Returns the window title stored in the description. More... | |
bool | get_decorations () const |
Returns true if the window shall be created with decorations. More... | |
CL_Size | get_size () const |
Returns the size of the window stored in description. More... | |
CL_Rect | get_position () const |
Returns the initial position of the window. More... | |
bool | get_position_client_area () const |
Returns if the client area is used for the initial position of the window. More... | |
bool | is_fullscreen () const |
Returns if window should be initially fullscreen. More... | |
int | get_flipping_buffers () const |
Returns the amount of flipping buffers to be created. More... | |
int | get_swap_interval () const |
Returns the swap interval to be used for the window. More... | |
bool | get_allow_resize () const |
Returns true if window should be resizeable. More... | |
int | get_bpp () const |
Returns the numbers of bytes per pixel in the window. More... | |
int | get_refresh_rate () const |
Returns the refresh rate of the displaymode. More... | |
bool | is_layered () const |
Returns true if window is layered (black is transparent) More... | |
bool | has_caption () const |
Returns true if a title bar is shown. More... | |
bool | has_sysmenu () const |
Returns true if the window has a window menu on its title bar. More... | |
bool | has_minimize_button () const |
Returns true if the window has a minimize button. More... | |
bool | has_maximize_button () const |
Returns true if the window has a maximize button. More... | |
bool | has_border () const |
Returns true if the window has a border. More... | |
bool | is_tool_window () const |
Returns true if the window is a tool window. More... | |
bool | is_dialog () const |
Returns true if the window is a dialog window. More... | |
bool | is_visible () const |
Returns true if the window is initially visible. More... | |
bool | is_topmost () const |
Returns true if the window should be placed above all non-topmost windows. More... | |
bool | get_using_gui_window_cache () const |
Returns true if window from the window cache should be used. (GUI Only) More... | |
bool | has_drop_shadow () const |
Returns true if the window is drawn with a drop shadow effect. More... | |
CL_DisplayWindow | get_owner () const |
Returns the window owning this one. More... | |
bool | get_tablet_context () const |
Returns true if a tablet context is to be created for the window. More... | |
CL_SharedPtr < CL_DisplayWindowDescriptionData > | get_data (const CL_String &data_name) const |
Returns the object stored in the given data name. More... | |
int | get_depth_size () const |
Returns the minimum required depth buffer. More... | |
int | get_stencil_size () const |
Returns the minimum required stencil buffer. More... | |
int | get_fullscreen_monitor () const |
Returns the index of the monitor to go fullscreen on. See CL_ScreenInfo. More... | |
Operations | |
void | show_caption (bool value=true) |
Controls if a title bar is shown or not. More... | |
void | show_sysmenu (bool value=true) |
Sets if the window has a window menu on its title bar. More... | |
void | show_minimize_button (bool value=true) |
Sets if the window has a minimize button. More... | |
void | show_maximize_button (bool value=true) |
Sets if the window has a maximize button. More... | |
void | show_border (bool value=true) |
Sets if the window has a border. DO NOT USE (This function is not implemented and is to be removed in ClanLib 2.4) More... | |
void | set_decorations (bool decorations) |
Sets if windows should have decorations. More... | |
void | set_visible (bool value=true) |
Toggles whether the window is created as initially visible. More... | |
void | set_topmost (bool value=true) |
Sets if the window should be placed above all non-topmost windows. More... | |
void | set_tool_window (bool value=true) |
Flags the window to be a tool window to the windowing system. More... | |
void | set_dialog_window (bool value=true) |
Flags the window to be a dialog window to the windowing system. More... | |
void | set_drop_shadow (bool value=true) |
Enables a drop shadow effect on the window. More... | |
void | set_owner_window (const CL_DisplayWindow &owner) |
Specifies another window which owns this one. More... | |
void | set_title (const CL_String &title) |
Sets the title of the window. More... | |
void | set_size (const CL_Size &size, bool client_area) |
Sets the size of the window (including window frame). More... | |
void | set_position (const CL_Rect &position, bool client_area) |
Sets the position of the window (including window frame). More... | |
void | set_fullscreen (bool fullscreen=true, int monitor=0) |
Makes the window initially fullscreen. More... | |
void | set_flipping_buffers (int num_buffers=2) |
Sets the amount of flipping buffers to be used. More... | |
void | set_swap_interval (int interval=-1) |
Sets the swap interval to be used for the window. More... | |
void | set_allow_resize (bool allow_resize) |
Sets if windows should be resizable. More... | |
void | set_bpp (int bpp) |
Sets the number of bytes per pixel. More... | |
void | set_refresh_rate (int refresh_rate) |
Set the refresh rate of the displaymode. More... | |
void | set_tablet_context (bool create) |
Sets to true if a tablet input context should be created for this window. More... | |
void | set_using_gui_window_cache (bool value) |
Uses a window from the window cache (GUI Only). More... | |
void | set_layered (bool layered) |
Creates a layered window (complex shaped window) More... | |
void | set_data (const CL_String &data_name, const CL_SharedPtr< CL_DisplayWindowDescriptionData > &ptr) |
Store object in description. More... | |
void | set_depth_size (int value) |
Sets the minimum required depth buffer. More... | |
void | set_stencil_size (int value) |
Sets the minimum required stencil buffer. More... | |
OpenGL specific display window description.
Use this class to setup OpenGL specific settings for a top level window:
CL_OpenGLWindowDescription desc; dest.set_title("OpenGL window with stereo visual"); desc.set_stereo(true); desc.set_stencil_size(4); CL_OpenGLWindow window(desc);
CL_OpenGLWindowDescription::CL_OpenGLWindowDescription | ( | ) |
Constructs a window description with default values.
CL_OpenGLWindowDescription::CL_OpenGLWindowDescription | ( | const CL_DisplayWindowDescription & | desc) |
Constructs a OpenGLWindowDescription.
desc | = Display Window Description |
|
virtual |
bool CL_OpenGLWindowDescription::get_allow_lower_versions | ( | ) | const |
Returns true if allowed lower versions than the selected version.
|
inherited |
Returns true if window should be resizeable.
int CL_OpenGLWindowDescription::get_alpha_size | ( | ) | const |
Returns the minimum required alpha buffer.
int CL_OpenGLWindowDescription::get_blue_size | ( | ) | const |
Returns the minimum required blue buffer.
|
inherited |
Returns the numbers of bytes per pixel in the window.
int CL_OpenGLWindowDescription::get_buffer_size | ( | ) | const |
Returns the desired color buffer size.
Ignored in GLX (X11)
In WGL (Windows) it specifies the size of the color buffer, excluding the alpha bitplanes.
bool CL_OpenGLWindowDescription::get_compatibility_profile | ( | ) | const |
Returns true if the compatibility profile flag is set.
bool CL_OpenGLWindowDescription::get_core_profile | ( | ) | const |
Returns true if the core profile flag is set.
|
inherited |
Returns the object stored in the given data name.
bool CL_OpenGLWindowDescription::get_debug | ( | ) | const |
Returns true if the debug flag is set.
|
inherited |
Returns true if the window shall be created with decorations.
|
inherited |
Returns the minimum required depth buffer.
bool CL_OpenGLWindowDescription::get_doublebuffer | ( | ) | const |
Returns true if only double-buffered visuals are considered.
If not enabled, only single-buffered visuals are considered.
|
inherited |
Returns the amount of flipping buffers to be created.
bool CL_OpenGLWindowDescription::get_forward_compatible | ( | ) | const |
Returns true if the forward compatible flag is set.
|
inherited |
Returns the index of the monitor to go fullscreen on. See CL_ScreenInfo.
int CL_OpenGLWindowDescription::get_green_size | ( | ) | const |
Returns the minimum required green buffer.
int CL_OpenGLWindowDescription::get_layer_plane | ( | ) | const |
Returns the layer plane value.
int CL_OpenGLWindowDescription::get_multisampling | ( | ) | const |
Returns the number of samples per pixel.
|
inherited |
Returns the window owning this one.
|
inherited |
Returns the initial position of the window.
|
inherited |
Returns if the client area is used for the initial position of the window.
int CL_OpenGLWindowDescription::get_red_size | ( | ) | const |
Returns the minimum required red buffer.
|
inherited |
Returns the refresh rate of the displaymode.
Specifies the frequency, in hertz (cycles per second). This value is also known as the vertical refresh rate.
|
inherited |
Returns the size of the window stored in description.
|
inherited |
Returns the minimum required stencil buffer.
bool CL_OpenGLWindowDescription::get_stereo | ( | ) | const |
Returns true if only stereo visuals are considered.
If not enabled, only monoscopic visuals are considered.
|
inherited |
Returns the swap interval to be used for the window.
|
inherited |
Returns true if a tablet context is to be created for the window.
|
inherited |
Returns the window title stored in the description.
|
inherited |
Returns true if window from the window cache should be used. (GUI Only)
This setting is ignored unless the GUI and CL_GUIWindowManagerSystem are used.
int CL_OpenGLWindowDescription::get_version_major | ( | ) | const |
Returns selected major version number.
int CL_OpenGLWindowDescription::get_version_minor | ( | ) | const |
Returns selected minor version number.
|
inherited |
Returns true if the window has a border.
|
inherited |
Returns true if a title bar is shown.
|
inherited |
Returns true if the window is drawn with a drop shadow effect.
|
inherited |
Returns true if the window has a maximize button.
|
inherited |
Returns true if the window has a minimize button.
|
inherited |
Returns true if the window has a window menu on its title bar.
|
inherited |
Returns true if the window is a dialog window.
|
inherited |
Returns if window should be initially fullscreen.
|
inherited |
Returns true if window is layered (black is transparent)
|
inherited |
Returns true if the window is a tool window.
|
inherited |
Returns true if the window should be placed above all non-topmost windows.
|
inherited |
Returns true if the window is initially visible.
CL_OpenGLWindowDescription& CL_OpenGLWindowDescription::operator= | ( | CL_DisplayWindowDescription & | desc) |
|
inherited |
Sets if windows should be resizable.
void CL_OpenGLWindowDescription::set_alpha_size | ( | int | value) |
Sets the minimum required alpha buffer.
If this value is zero, the smallest available alpha buffer is preferred. Otherwise, the largest available alpha buffer of at least the minimum size is preferred.
void CL_OpenGLWindowDescription::set_blue_size | ( | int | value) |
Sets the minimum required blue buffer.
If this value is zero, the smallest available blue buffer is preferred. Otherwise, the largest available blue buffer of at least the minimum size is preferred.
|
inherited |
Sets the number of bytes per pixel.
void CL_OpenGLWindowDescription::set_buffer_size | ( | int | value) |
Sets the desired color buffer size.
Ignored in GLX (X11)
In WGL (Windows) it specifies the size of the color buffer, excluding the alpha bitplanes.
void CL_OpenGLWindowDescription::set_compatibility_profile | ( | bool | enable) |
Sets the compatibility profile flag.
If than a context implementing the compatibility profile is returned.
enable | = true - Enable this option (Default is false) |
void CL_OpenGLWindowDescription::set_core_profile | ( | bool | enable) |
Sets the core profile flag.
If true, then a context implementing the core profile of OpenGL is returned
enable | = true - Enable this option (Default is true) |
|
inherited |
Store object in description.
void CL_OpenGLWindowDescription::set_debug | ( | bool | enable) |
Sets the debug flag.
Debug contexts are intended for use during application development, and provide additional runtime checking, validation, and logging functionality while possibly incurring performance penalties
enable | = true - Enable this option (Default is false) |
|
inherited |
Sets if windows should have decorations.
This is identical to show_caption()
|
inherited |
Sets the minimum required depth buffer.
If this value is zero, the smallest available depth buffer is preferred. Otherwise, the largest available depth buffer of at least the minimum size is preferred.
|
inherited |
Flags the window to be a dialog window to the windowing system.
void CL_OpenGLWindowDescription::set_doublebuffer | ( | bool | value) |
Sets if only double-buffered visuals are considered.
If not enabled, only single-buffered visuals are considered.
|
inherited |
Enables a drop shadow effect on the window.
|
inherited |
Sets the amount of flipping buffers to be used.
void CL_OpenGLWindowDescription::set_forward_compatible | ( | bool | enable) |
Sets the forward compatible flag.
Forward-compatible contexts must not support functionality marked as deprecated by that version of the API, while a non-forward-compatible context must support all functionality in that version, deprecated or not.
enable | = true - Enable this option (Default is false) |
|
inherited |
Makes the window initially fullscreen.
void CL_OpenGLWindowDescription::set_green_size | ( | int | value) |
Sets the minimum required green buffer.
If this value is zero, the smallest available green buffer is preferred. Otherwise, the largest available green buffer of at least the minimum size is preferred.
void CL_OpenGLWindowDescription::set_layer_plane | ( | int | value) |
Sets the layer plane value.
Specifies the layer plane that the rendering context is bound to
value | = The layer plane. (Default is 0 - the main plane) |
|
inherited |
Creates a layered window (complex shaped window)
void CL_OpenGLWindowDescription::set_multisampling | ( | int | value) |
Sets the number of samples per pixel.
|
inherited |
Specifies another window which owns this one.
|
inherited |
Sets the position of the window (including window frame).
The default position, is centred on the screen. If this is wanted, use set_size() instead
position | = Window position |
client_area | = false = include the window frame. true = exclude the window frame |
void CL_OpenGLWindowDescription::set_red_size | ( | int | value) |
Sets the minimum required red buffer.
If this value is zero, the smallest available red buffer is preferred. Otherwise, the largest available red buffer of at least the minimum size is preferred.
|
inherited |
Set the refresh rate of the displaymode.
Specifies the frequency, in hertz (cycles per second). This value is also known as the vertical refresh rate.
|
inherited |
Sets the size of the window (including window frame).
size | = Window size |
client_area | = false = include the window frame. true = exclude the window frame |
|
inherited |
Sets the minimum required stencil buffer.
If this value is zero, the smallest available stencil buffer is preferred. Otherwise, the largest available stencil buffer of at least the minimum size is preferred.
void CL_OpenGLWindowDescription::set_stereo | ( | bool | value) |
Sets if only stereo visuals are to be considered.
If not enabled, only monoscopic visuals are considered.
|
inherited |
Sets the swap interval to be used for the window.
|
inherited |
Sets to true if a tablet input context should be created for this window.
|
inherited |
Sets the title of the window.
|
inherited |
Flags the window to be a tool window to the windowing system.
|
inherited |
Sets if the window should be placed above all non-topmost windows.
|
inherited |
Uses a window from the window cache (GUI Only).
Creating a window in Windows XP is slow (about 100 ms). Use cached windows for menus and dialogs to avoid sluggish operation in XP. This setting is ignored unless the GUI and CL_GUIWindowManagerSystem are used.
void CL_OpenGLWindowDescription::set_version | ( | int | major, |
int | minor, | ||
bool | allow_lower_versions | ||
) |
Select the OpenGL version number.
Defaults to OpenGL 3.0, with allow lower versions
major | = OpenGL major number (e.g. 4) |
minor | = OpenGL minor number (e.g. 1) |
allow_lower_versions | = Allow lower versions of the specified opengl |
|
inherited |
Toggles whether the window is created as initially visible.
|
inherited |
Sets if the window has a border. DO NOT USE (This function is not implemented and is to be removed in ClanLib 2.4)
|
inherited |
Controls if a title bar is shown or not.
|
inherited |
Sets if the window has a maximize button.
|
inherited |
Sets if the window has a minimize button.
|
inherited |
Sets if the window has a window menu on its title bar.