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 
19 #ifdef USE_X11
20 #include "x11GraphicsPipe.h"
22 #else
23 #include "graphicsPipe.h"
25 #undef EGL_NO_X11
26 #define EGL_NO_X11 1
27 #endif
28 
29 #ifdef OPENGLES_2
30  #include "gles2gsg.h"
31  #include "pre_x11_include.h"
32  #include <EGL/egl.h>
33  #include "post_x11_include.h"
34  #define NativeDisplayType EGLNativeDisplayType
35  #define NativePixmapType EGLNativePixmapType
36  #define NativeWindowType EGLNativeWindowType
37 #elif defined(OPENGLES_1)
38  #include "glesgsg.h"
39  #include "pre_x11_include.h"
40  #include <GLES/egl.h>
41  #include "post_x11_include.h"
42 #else
43  #include "glgsg.h"
44  #include "pre_x11_include.h"
45  #include <EGL/egl.h>
46  #include "post_x11_include.h"
47 #endif
48 
50 
51 class eglGraphicsBuffer;
52 class eglGraphicsPixmap;
53 class eglGraphicsWindow;
54 
55 /**
56  * This graphics pipe represents the interface for creating OpenGL ES graphics
57  * windows on an X-based (e.g. Unix) client.
58  */
60 public:
62  virtual ~eglGraphicsPipe();
63 
64  virtual std::string get_interface_name() const;
65  static PT(GraphicsPipe) pipe_constructor();
66 
67  INLINE EGLDisplay get_egl_display() const;
68 
69 protected:
70  virtual PT(GraphicsOutput) make_output(const std::string &name,
71  const FrameBufferProperties &fb_prop,
72  const WindowProperties &win_prop,
73  int flags,
74  GraphicsEngine *engine,
76  GraphicsOutput *host,
77  int retry,
78  bool &precertify);
79 
80 private:
81  EGLDisplay _egl_display = 0;
82 
83 public:
84  static TypeHandle get_class_type() {
85  return _type_handle;
86  }
87  static void init_type() {
88  BaseGraphicsPipe::init_type();
89  register_type(_type_handle, "eglGraphicsPipe",
90  BaseGraphicsPipe::get_class_type());
91  }
92  virtual TypeHandle get_type() const {
93  return get_class_type();
94  }
95  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
96 
97 private:
98  static TypeHandle _type_handle;
99 };
100 
101 #include "eglGraphicsPipe.I"
102 
103 #endif
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before...
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.
Definition: graphicsPipe.h:52
Encapsulates all the communication with a particular instance of a given rendering backend.
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 EGL environment.
This graphics pipe represents the interface for creating OpenGL ES graphics windows on an X-based (e....
virtual std::string get_interface_name() const
Returns the name of the rendering interface associated with this GraphicsPipe.
This graphics pipe represents the interface for creating graphics windows on an X-based client.
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.
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(),...
Definition: register_type.I:22
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.