Panda3D
eglGraphicsPipe.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 eglGraphicsPipe.h
10  * @author rdb
11  * @date 2009-05-21
12  */
13 
14 #ifndef EGLGRAPHICSPIPE_H
15 #define EGLGRAPHICSPIPE_H
16 
17 #include "pandabase.h"
18 #include "x11GraphicsPipe.h"
19 
20 #ifdef OPENGLES_2
21  #include "gles2gsg.h"
22  #include "pre_x11_include.h"
23  #include <EGL/egl.h>
24  #include "post_x11_include.h"
25  #define NativeDisplayType EGLNativeDisplayType
26  #define NativePixmapType EGLNativePixmapType
27  #define NativeWindowType EGLNativeWindowType
28 #else
29  #include "glesgsg.h"
30  #include "pre_x11_include.h"
31  #include <GLES/egl.h>
32  #include "post_x11_include.h"
33 #endif
34 
36 
37 class eglGraphicsBuffer;
38 class eglGraphicsPixmap;
39 class eglGraphicsWindow;
40 
41 /**
42  * This graphics pipe represents the interface for creating OpenGL ES graphics
43  * windows on an X-based (e.g. Unix) client.
44  */
46 public:
47  eglGraphicsPipe(const std::string &display = std::string());
48  virtual ~eglGraphicsPipe();
49 
50  virtual std::string get_interface_name() const;
51  static PT(GraphicsPipe) pipe_constructor();
52 
53 protected:
54  virtual PT(GraphicsOutput) make_output(const std::string &name,
55  const FrameBufferProperties &fb_prop,
56  const WindowProperties &win_prop,
57  int flags,
58  GraphicsEngine *engine,
60  GraphicsOutput *host,
61  int retry,
62  bool &precertify);
63 
64 private:
65  EGLDisplay _egl_display;
66 
67 public:
68  static TypeHandle get_class_type() {
69  return _type_handle;
70  }
71  static void init_type() {
72  x11GraphicsPipe::init_type();
73  register_type(_type_handle, "eglGraphicsPipe",
74  x11GraphicsPipe::get_class_type());
75  }
76  virtual TypeHandle get_type() const {
77  return get_class_type();
78  }
79  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
80 
81 private:
82  static TypeHandle _type_handle;
83 
84  friend class eglGraphicsBuffer;
85  friend class eglGraphicsPixmap;
86  friend class eglGraphicsWindow;
87 };
88 
89 #include "eglGraphicsPipe.I"
90 
91 #endif
FrameBufferProperties
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before...
Definition: frameBufferProperties.h:26
post_x11_include.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
eglGraphicsWindow
An interface to the egl system for managing GLES windows under X.
Definition: eglGraphicsWindow.h:25
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pre_x11_include.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
eglGraphicsBuffer
An offscreen buffer in the EGL environment.
Definition: eglGraphicsBuffer.h:25
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
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
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
eglGraphicsPipe::get_interface_name
virtual std::string get_interface_name() const
Returns the name of the rendering interface associated with this GraphicsPipe.
Definition: eglGraphicsPipe.cxx:63
eglGraphicsPipe
This graphics pipe represents the interface for creating OpenGL ES graphics windows on an X-based (e....
Definition: eglGraphicsPipe.h:45
gles2gsg.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
GraphicsPipe
An object to create GraphicsOutputs that share a particular 3-D API.
Definition: graphicsPipe.h:52
eglGraphicsPixmap
Another offscreen buffer in the EGL environment.
Definition: eglGraphicsPixmap.h:27
eglGraphicsPipe.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
glesgsg.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.