Panda3D
panda
src
glxdisplay
glxGraphicsPipe.h
Go to the documentation of this file.
1
/**
2
* PANDA 3D SOFTWARE
3
* Copyright (c) Carnegie Mellon University. All rights reserved.
4
*
5
* All use of this software is subject to the terms of the revised BSD
6
* license. You should have received a copy of this license along
7
* with this source code in a file named "LICENSE."
8
*
9
* @file glxGraphicsPipe.h
10
* @author mike
11
* @date 1997-01-09
12
*/
13
14
#ifndef GLXGRAPHICSPIPE_H
15
#define GLXGRAPHICSPIPE_H
16
17
#include "
pandabase.h
"
18
#include "
graphicsWindow.h
"
19
#include "
graphicsPipe.h
"
20
#include "
glgsg.h
"
21
#include "
lightMutex.h
"
22
#include "
lightReMutex.h
"
23
#include "
x11GraphicsPipe.h
"
24
25
class
FrameBufferProperties
;
26
27
#ifndef CPPPARSER
28
29
// Don't pick up the system glxext.h; use our own, which is better.
30
#define __glxext_h_
31
32
#include "
pre_x11_include.h
"
33
#include <GL/glx.h>
34
#include "
post_x11_include.h
"
35
36
// This must be included after we have included glgsg.h (which includes gl.h),
37
// and after we have checked GLX_VERSION_1_3. But we must also include it
38
// before we redefine the GLXFBConfig types, below.
39
#include "panda_glxext.h"
40
41
// drose: the version of GLglx.h that ships with Fedora Core 2 seems to define
42
// GLX_VERSION_1_4, but for some reason does not define GLX_SAMPLE_BUFFERS or
43
// GLX_SAMPLES. We work around that here.
44
45
#ifndef GLX_SAMPLE_BUFFERS
46
#define GLX_SAMPLE_BUFFERS 100000
47
#endif
48
#ifndef GLX_SAMPLES
49
#define GLX_SAMPLES 100001
50
#endif
51
52
53
/*
54
#if !defined(HAVE_GLXFBCONFIG) && defined(GLX_SGIX_fbconfig) && defined(GLX_SGIX_pbuffer)
55
// If the system glx version isn't 1.3, but these were defined as
56
// extensions, we can work with that.
57
#define GLXFBConfig GLXFBConfigSGIX
58
#define GLXPbuffer GLXPbufferSGIX
59
#define glXChooseFBConfig glXChooseFBConfigSGIX
60
#define glXCreateNewContext glXCreateContextWithConfigSGIX
61
#define glXGetVisualFromFBConfig glXGetVisualFromFBConfigSGIX
62
#define glXGetFBConfigAttrib glXGetFBConfigAttribSGIX
63
#define glXDestroyPbuffer glXDestroyGLXPbufferSGIX
64
65
#define HAVE_GLXFBCONFIG
66
#define HAVE_SGI_GLXFBCONFIG
67
#endif
68
*/
69
70
#endif // CPPPARSER
71
72
/**
73
* This graphics pipe represents the interface for creating OpenGL graphics
74
* windows on an X-based (e.g. Unix) client.
75
*/
76
class
glxGraphicsPipe
:
public
x11GraphicsPipe
{
77
public
:
78
glxGraphicsPipe
(
const
std::string &display = std::string());
79
virtual
~
glxGraphicsPipe
() {};
80
81
virtual
std::string
get_interface_name
()
const
;
82
static
PT(
GraphicsPipe
) pipe_constructor();
83
84
protected
:
85
virtual
PT(
GraphicsOutput
) make_output(
const
std::string &name,
86
const
FrameBufferProperties
&fb_prop,
87
const
WindowProperties
&win_prop,
88
int
flags,
89
GraphicsEngine
*engine,
90
GraphicsStateGuardian
*gsg,
91
GraphicsOutput
*host,
92
int
retry,
93
bool
&precertify);
94
virtual
PT(
GraphicsStateGuardian
) make_callback_gsg(
GraphicsEngine
*engine);
95
96
public
:
97
static
TypeHandle
get_class_type() {
98
return
_type_handle;
99
}
100
static
void
init_type() {
101
x11GraphicsPipe::init_type();
102
register_type
(_type_handle,
"glxGraphicsPipe"
,
103
x11GraphicsPipe::get_class_type());
104
}
105
virtual
TypeHandle
get_type()
const
{
106
return
get_class_type();
107
}
108
virtual
TypeHandle
force_init_type() {init_type();
return
get_class_type();}
109
110
private
:
111
static
TypeHandle
_type_handle;
112
};
113
114
#include "
glxGraphicsPipe.I
"
115
116
#endif
FrameBufferProperties
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before...
Definition:
frameBufferProperties.h:26
glgsg.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
post_x11_include.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pre_x11_include.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
register_type
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition:
register_type.I:22
glxGraphicsPipe
This graphics pipe represents the interface for creating OpenGL graphics windows on an X-based (e....
Definition:
glxGraphicsPipe.h:76
glxGraphicsPipe.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
lightMutex.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
WindowProperties
A container for the various kinds of properties we might ask to have on a graphics window before we o...
Definition:
windowProperties.h:29
graphicsPipe.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
GraphicsEngine
This class is the main interface to controlling the render process.
Definition:
graphicsEngine.h:53
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition:
typeHandle.h:81
GraphicsOutput
This is a base class for the various different classes that represent the result of a frame of render...
Definition:
graphicsOutput.h:63
glxGraphicsPipe::get_interface_name
virtual std::string get_interface_name() const
Returns the name of the rendering interface associated with this GraphicsPipe.
Definition:
glxGraphicsPipe.cxx:55
GraphicsPipe
An object to create GraphicsOutputs that share a particular 3-D API.
Definition:
graphicsPipe.h:52
graphicsWindow.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
GraphicsStateGuardian
Encapsulates all the communication with a particular instance of a given rendering backend.
Definition:
graphicsStateGuardian.h:65
x11GraphicsPipe
This graphics pipe represents the interface for creating graphics windows on an X-based client.
Definition:
x11GraphicsPipe.h:96
x11GraphicsPipe.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
lightReMutex.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Generated on Mon Sep 14 2020 15:06:53 for Panda3D by
1.8.20