The Win32Context class implements an OpenGLContext using the Win32 API.
More...
#include <Win32Context.hpp>
List of all members.
Public Member Functions |
| | Win32Context () |
| | Win32Context (int w, int h) |
| virtual HWND | hwnd () const =0 |
| HDC | hdc () const |
| HGLRC | hglrc () const |
| void | shareOpenGLResources (HGLRC hGLRC) |
| | Use this function when you want two OpenGL contexts to share their resources (display lists, textures, shader objects, buffer objects etc.) Equivalent to wglShareLists(this->hglrc(), hGLRC)
|
| void | makeCurrent () |
| void | update () |
| void | swapBuffers () |
| void | setWindowTitle (const vl::String &title) |
| void | show () |
| void | hide () |
| void | getFocus () |
| void | setMouseVisible (bool visible) |
| void | setMousePosition (int x, int y) |
| void | setPosition (int x, int y) |
| vl::ivec2 | position () const |
| void | setSize (int w, int h) |
| | The actual size of the OpenGL context, i.e.
|
| vl::ivec2 | size () const |
| | The actual size of the OpenGL context, i.e. the client area if this is a window.
|
| void | setWindowSize (int w, int h) |
| | Sets the size of the window. Note that if this Win32Window has window decorations the actual OpenGL context will be smaller than the given w and h parameters.
|
| vl::ivec2 | windowSize () const |
| | Returns the size of the window and not the client area.
|
| bool | setFullscreen (bool fullscreen_on) |
| void | quitApplication () |
| | Calls the PostQuitMessage(0) function (Win32 API).
|
| const std::vector< int > & | contextAttribs () const |
| | Context attributes used when creating an OpenGL 3.x / 4.x context.
|
| std::vector< int > & | contextAttribs () |
| | Context attributes used when creating an OpenGL 3.x / 4.x context.
|
| void | setContextAttribs (const int *attribs) |
| | Context attributes used when creating an OpenGL 3.x / 4.x context.
|
Protected Member Functions |
| bool | init (HGLRC share_context, const vl::String &title, const vl::OpenGLContextFormat &fmt, int x, int y, int width, int height) |
Protected Attributes |
| std::vector< int > | mContextAttribs |
| HDC | mHDC |
| HGLRC | mHGLRC |
| vl::ivec2 | mNormPosit |
| vl::ivec2 | mNormSize |
| unsigned int | mNormFlags |
Detailed Description
The Win32Context class implements an OpenGLContext using the Win32 API.
Constructor & Destructor Documentation
| vlWin32::Win32Context::Win32Context |
( |
) |
[inline] |
| vlWin32::Win32Context::Win32Context |
( |
int |
w, |
|
|
int |
h |
|
) |
| [inline] |
Member Function Documentation
| virtual HWND vlWin32::Win32Context::hwnd |
( |
) |
const [pure virtual] |
| HDC vlWin32::Win32Context::hdc |
( |
) |
const [inline] |
| HGLRC vlWin32::Win32Context::hglrc |
( |
) |
const [inline] |
| void Win32Context::shareOpenGLResources |
( |
HGLRC |
hGLRC ) |
|
Use this function when you want two OpenGL contexts to share their resources (display lists, textures, shader objects, buffer objects etc.) Equivalent to wglShareLists(this->hglrc(), hGLRC)
| void Win32Context::makeCurrent |
( |
) |
[virtual] |
| void Win32Context::update |
( |
) |
[virtual] |
| void Win32Context::swapBuffers |
( |
) |
[virtual] |
| void Win32Context::setWindowTitle |
( |
const vl::String & |
title ) |
[virtual] |
| void Win32Context::show |
( |
) |
[virtual] |
| void Win32Context::hide |
( |
) |
[virtual] |
| void Win32Context::getFocus |
( |
) |
[virtual] |
| void Win32Context::setMouseVisible |
( |
bool |
visible ) |
[virtual] |
| void Win32Context::setMousePosition |
( |
int |
x, |
|
|
int |
y |
|
) |
| [virtual] |
| void Win32Context::setPosition |
( |
int |
x, |
|
|
int |
y |
|
) |
| [virtual] |
| vl::ivec2 Win32Context::position |
( |
) |
const [virtual] |
| void Win32Context::setSize |
( |
int |
w, |
|
|
int |
h |
|
) |
| [virtual] |
The actual size of the OpenGL context, i.e.
the client area if this is a window. Note that if this Win32Window has window decorations the actual window size will be bigger than the given w and h parameters.
Reimplemented from vl::OpenGLContext.
| vl::ivec2 Win32Context::size |
( |
) |
const [virtual] |
The actual size of the OpenGL context, i.e. the client area if this is a window.
Reimplemented from vl::OpenGLContext.
| void Win32Context::setWindowSize |
( |
int |
w, |
|
|
int |
h |
|
) |
| |
Sets the size of the window. Note that if this Win32Window has window decorations the actual OpenGL context will be smaller than the given w and h parameters.
Returns the size of the window and not the client area.
Use the size() method if you need the size of the actual OpenGL rendering context.
- Note:
- windowSize() can be different from size() because of the space taken by the window caption and decorations.
| bool Win32Context::setFullscreen |
( |
bool |
fullscreen_on ) |
[virtual] |
| void Win32Context::quitApplication |
( |
) |
[virtual] |
Calls the PostQuitMessage(0) function (Win32 API).
Reimplemented from vl::OpenGLContext.
| const std::vector<int>& vlWin32::Win32Context::contextAttribs |
( |
) |
const [inline] |
| std::vector<int>& vlWin32::Win32Context::contextAttribs |
( |
) |
[inline] |
| void Win32Context::setContextAttribs |
( |
const int * |
attribs ) |
|
Member Data Documentation
The documentation for this class was generated from the following files:
- C:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlWin32/Win32Context.hpp
- C:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlWin32/Win32Context.cpp