2 Copyright 2004-2005 Chris Tallon, 2006,2011-2012 Marten Richter
4 This file is part of VOMP.
6 VOMP is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 VOMP is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with VOMP. If not, see <https://www.gnu.org/licenses/>.
26 #include <GLES2/gl2.h>
28 #include <EGL/eglext.h>
36 #include "glosdshader.h"
55 class OsdOpenGL : public Osd, public Thread_TYPE
66 void screenShot(const char* fileName);
68 Surface * createNewSurface();
76 void getEGLObjs(EGLDisplay *i_egl_display,EGLSurface *i_egl_surface,EGLContext *i_egl_context, EGLConfig *i_egl_config){
77 *i_egl_display=egl_display;
78 *i_egl_surface=egl_surface;
79 *i_egl_context=egl_context;
80 *i_egl_config=egl_ourconfig;
83 EGLConfig getEGLConfig() {return egl_ourconfig;};
85 void AdviseAboutNewFrame() {threadSignal();};
92 //Maybe move the following stuff to a generic opengl object also for boosting DCT etc.
98 // This indicates, that currently a video is played, thus the osd updates are driven by the Videosystem
99 bool external_driving;
101 long long lastrendertime;
102 void InternalRendering();
103 void InitVertexBuffer(float scalex,float scaley);
104 OSDVERTEX osdvertices[4];
105 GLubyte osdindices[6];
107 GLOsdShader osd_shader;
111 uint32_t display_height;
112 uint32_t display_width;
113 DISPMANX_DISPLAY_HANDLE_T bcm_display;
114 DISPMANX_ELEMENT_HANDLE_T bcm_element;
118 EGLDisplay egl_display;
119 EGLSurface egl_surface;
120 EGLContext egl_context;
121 EGLConfig egl_ourconfig;
123 long long last_benchmark_time;
124 unsigned int num_benchmark_frames;