Main Page
Namespaces
Classes
Files
File List
File Members
include
Graphics
GL4
WGL
GteWGLEngine.h
Go to the documentation of this file.
1
// David Eberly, Geometric Tools, Redmond WA 98052
2
// Copyright (c) 1998-2017
3
// Distributed under the Boost Software License, Version 1.0.
4
// http://www.boost.org/LICENSE_1_0.txt
5
// http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
6
// File Version: 3.0.1 (2016/06/30)
7
8
#pragma once
9
10
#include <
Graphics/GL4/GteGL4Engine.h
>
11
12
namespace
gte
13
{
14
15
class
GTE_IMPEXP
WGLEngine
:
public
GL4Engine
16
{
17
public
:
18
// Construction and destruction. The first constructor is for windowed
19
// graphics applications. The second constructor is for windowless
20
// compute-program applications.
21
//
22
// TODO: Currently, OpenGL 4.3 is required for compute shaders. See
23
// the comment in GteGL4Engine.h for 'MeetsRequirements()'.
24
virtual
~
WGLEngine
();
25
WGLEngine
(HWND handle,
bool
saveDriverInfo,
int
requiredMajor = 4,
int
requiredMinor = 3);
26
WGLEngine
(
bool
saveDriverInfo,
int
requiredMajor = 4,
int
requiredMinor = 3);
27
28
// Access to members that correspond to constructor inputs.
29
inline
HDC
GetDevice()
const
;
30
inline
HGLRC
GetImmediate()
const
;
31
32
// Allow the user to switch between OpenGL contexts when there are
33
// multiple instances of GL4Engine in an application.
34
virtual
bool
IsActive()
const override
;
35
virtual
void
MakeActive()
override
;
36
37
// Support for clearing the color, depth, and stencil back buffers.
38
virtual
void
DisplayColorBuffer(
unsigned
int
syncInterval)
override
;
39
40
private
:
41
// Helpers for construction and destruction.
42
virtual
bool
Initialize(
int
requiredMajor,
int
requiredMinor,
bool
saveDriverInfo)
override
;
43
void
Terminate();
44
45
// Inputs to the constructor.
46
HWND
mHandle
;
47
48
// Objects created by the constructors.
49
HDC
mDevice
;
50
HGLRC
mImmediate
;
51
std::wstring
mComputeWindowClass
;
52
ATOM
mComputeWindowAtom
;
53
};
54
55
inline
HDC
WGLEngine::GetDevice
()
const
56
{
57
return
mDevice;
58
}
59
60
inline
HGLRC
WGLEngine::GetImmediate
()
const
61
{
62
return
mImmediate;
63
}
64
65
}
gte::WGLEngine::mImmediate
HGLRC mImmediate
Definition:
GteWGLEngine.h:50
HGLRC
typedef HGLRC(WINAPI *PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC hDC
gte::WGLEngine::mComputeWindowClass
std::wstring mComputeWindowClass
Definition:
GteWGLEngine.h:51
gte::WGLEngine::GetImmediate
HGLRC GetImmediate() const
Definition:
GteWGLEngine.h:60
gte::WGLEngine::mComputeWindowAtom
ATOM mComputeWindowAtom
Definition:
GteWGLEngine.h:52
gte::WGLEngine::mHandle
HWND mHandle
Definition:
GteWGLEngine.h:46
gte::WGLEngine::mDevice
HDC mDevice
Definition:
GteWGLEngine.h:49
gte
Definition:
GLX/GteWICFileIO.h:16
gte::GL4Engine
Definition:
GteGL4Engine.h:19
HDC
typedef HDC(WINAPI *PFNWGLGETCURRENTREADDCARBPROC)(void)
gte::WGLEngine::GetDevice
HDC GetDevice() const
Definition:
GteWGLEngine.h:55
GteGL4Engine.h
GTE_IMPEXP
#define GTE_IMPEXP
Definition:
GTEngineDEF.h:63
gte::WGLEngine
Definition:
GteWGLEngine.h:15
geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:00:02