Panda3D
Loading...
Searching...
No Matches
glxGraphicsBuffer.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 glxGraphicsBuffer.h
10 * @author drose
11 * @date 2004-02-09
12 */
13
14#ifndef GLXGRAPHICSBUFFER_H
15#define GLXGRAPHICSBUFFER_H
16
17#include "pandabase.h"
18
19#include "glxGraphicsPipe.h"
20#include "graphicsBuffer.h"
21
22/**
23 * An offscreen buffer in the GLX environment. This creates a GLXPbuffer.
24 */
26public:
28 const std::string &name,
29 const FrameBufferProperties &fb_prop,
30 const WindowProperties &win_prop,
31 int flags,
33 GraphicsOutput *host);
34 virtual ~glxGraphicsBuffer();
35
36 virtual bool begin_frame(FrameMode mode, Thread *current_thread);
37 virtual void end_frame(FrameMode mode, Thread *current_thread);
38
39protected:
40 virtual void close_buffer();
41 virtual bool open_buffer();
42
43private:
44 X11_Display *_display;
45 GLXPbuffer _pbuffer;
46
47public:
48 static TypeHandle get_class_type() {
49 return _type_handle;
50 }
51 static void init_type() {
52 GraphicsBuffer::init_type();
53 register_type(_type_handle, "glxGraphicsBuffer",
54 GraphicsBuffer::get_class_type());
55 }
56 virtual TypeHandle get_type() const {
57 return get_class_type();
58 }
59 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
60
61private:
62 static TypeHandle _type_handle;
63};
64
65#include "glxGraphicsBuffer.I"
66
67#endif
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before...
An offscreen buffer for rendering into.
This class is the main interface to controlling the render process.
This is a base class for the various different classes that represent the result of a frame of render...
An object to create GraphicsOutputs that share a particular 3-D API.
Encapsulates all the communication with a particular instance of a given rendering backend.
A thread; that is, a lightweight process.
Definition thread.h:46
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
A container for the various kinds of properties we might ask to have on a graphics window before we o...
An offscreen buffer in the GLX environment.
virtual bool begin_frame(FrameMode mode, Thread *current_thread)
This function will be called within the draw thread before beginning rendering for a given frame.
virtual void end_frame(FrameMode mode, Thread *current_thread)
This function will be called within the draw thread after rendering is completed for a given frame.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...