Panda3D

Loading...
Searching...
No Matches
eglGraphicsWindow.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 eglGraphicsWindow.h
10 * @author rdb
11 * @date 2009-05-21
12 */
13
14#ifndef EGLGRAPHICSWINDOW_H
15#define EGLGRAPHICSWINDOW_H
16
17#include "pandabase.h"
18
19#ifdef USE_X11
20
21#include "eglGraphicsPipe.h"
22#include "x11GraphicsWindow.h"
23
24/**
25 * An interface to the egl system for managing GLES windows under X.
26 */
27 class eglGraphicsWindow : public x11GraphicsWindow {
28 public:
29 eglGraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe,
30 const std::string &name,
31 const FrameBufferProperties &fb_prop,
32 const WindowProperties &win_prop,
33 int flags,
34 GraphicsStateGuardian *gsg,
35 GraphicsOutput *host);
36 virtual ~eglGraphicsWindow();
37
38 virtual bool begin_frame(FrameMode mode, Thread *current_thread);
39 virtual void end_frame(FrameMode mode, Thread *current_thread);
40 virtual void end_flip();
41
42 protected:
43 virtual void close_window();
44 virtual bool open_window();
45
46 private:
47 EGLDisplay _egl_display;
48 EGLSurface _egl_surface;
49
50 public:
51 static TypeHandle get_class_type() {
52 return _type_handle;
53 }
54 static void init_type() {
55 x11GraphicsWindow::init_type();
56 register_type(_type_handle, "eglGraphicsWindow",
57 x11GraphicsWindow::get_class_type());
58 }
59 virtual TypeHandle get_type() const {
60 return get_class_type();
61 }
62 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
63
64 private:
65 static TypeHandle _type_handle;
66};
67
68#include "eglGraphicsWindow.I"
69
70#endif // USE_X11
71
72#endif
GraphicsOutput::end_flip
virtual void end_flip()
This function will be called within the draw thread after begin_flip() has been called on all windows...
Definition graphicsOutput.cxx:1306
x11GraphicsWindow
Interfaces to the X11 window system.
Definition x11GraphicsWindow.h:26
x11GraphicsWindow::begin_frame
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.
Definition x11GraphicsWindow.cxx:229
x11GraphicsWindow::end_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.
Definition x11GraphicsWindow.cxx:262
eglGraphicsPipe.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
eglGraphicsWindow.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.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
x11GraphicsWindow.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.