Main Page
Namespaces
Classes
Files
File List
File Members
include
Graphics
GL4
GLX
GteGLXEngine.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
// Forward declarations to avoid name conflicts caused by #include-ing
13
// X11/Xlib.h and GL/glx.h.
14
struct
_XDisplay;
15
struct
__GLXcontextRec;
16
17
namespace
gte
18
{
19
20
class
GTE_IMPEXP
GLXEngine
:
public
GL4Engine
21
{
22
public
:
23
// Construction and destruction. The first constructor is for windowed
24
// graphics applications. The second constructor is for windowless
25
// compute-program applications.
26
//
27
// TODO: Currently, OpenGL 4.3 is required for compute shaders. See
28
// the comment in GteGL4Engine.h for 'MeetsRequirements()'.
29
virtual
~
GLXEngine
();
30
GLXEngine
(_XDisplay* display,
unsigned
long
window, __GLXcontextRec* context,
31
int
xSize,
int
ySize,
bool
saveDriverInfo,
int
requiredMajor = 4,
int
requiredMinor = 3);
32
GLXEngine
(
bool
saveDriverInfo,
int
requiredMajor = 4,
int
requiredMinor = 3);
33
34
// Member access.
35
inline
_XDisplay*
GetDisplay
()
const
{
return
mDisplay; }
36
inline
unsigned
long
GetWindow
()
const
{
return
mWindow; }
37
inline
__GLXcontextRec*
GetImmediate
()
const
{
return
mImmediate; }
38
39
// Allow the user to switch between OpenGL contexts when there are
40
// multiple instances of GL4Engine in an application.
41
virtual
bool
IsActive()
const override
;
42
virtual
void
MakeActive()
override
;
43
44
// Support for clearing the color, depth, and stencil back buffers.
45
virtual
void
DisplayColorBuffer(
unsigned
int
syncInterval)
override
;
46
47
private
:
48
// Helpers for construction and destruction.
49
virtual
bool
Initialize(
int
requiredMajor,
int
requiredMinor,
bool
saveDriverInfo)
override
;
50
void
Terminate();
51
52
_XDisplay*
mDisplay
;
53
unsigned
long
mWindow
;
54
__GLXcontextRec*
mImmediate
;
55
bool
mIsComputeWindow
;
56
};
57
58
}
gte::GLXEngine::GetWindow
unsigned long GetWindow() const
Definition:
GteGLXEngine.h:36
gte::GLXEngine::mWindow
unsigned long mWindow
Definition:
GteGLXEngine.h:53
gte::GLXEngine::mDisplay
_XDisplay * mDisplay
Definition:
GteGLXEngine.h:52
gte::GLXEngine::mIsComputeWindow
bool mIsComputeWindow
Definition:
GteGLXEngine.h:55
gte::GLXEngine
Definition:
GteGLXEngine.h:20
gte
Definition:
GLX/GteWICFileIO.h:16
gte::GL4Engine
Definition:
GteGL4Engine.h:19
gte::GLXEngine::GetDisplay
_XDisplay * GetDisplay() const
Definition:
GteGLXEngine.h:35
gte::GLXEngine::GetImmediate
__GLXcontextRec * GetImmediate() const
Definition:
GteGLXEngine.h:37
GteGL4Engine.h
gte::GLXEngine::mImmediate
__GLXcontextRec * mImmediate
Definition:
GteGLXEngine.h:54
GTE_IMPEXP
#define GTE_IMPEXP
Definition:
GTEngineDEF.h:63
geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:00:00