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
64 bool screenShot(const char* fileName);
66 Surface * createNewSurface();
74 void getEGLObjs(EGLDisplay *i_egl_display,EGLSurface *i_egl_surface,EGLContext *i_egl_context, EGLConfig *i_egl_config){
75 *i_egl_display=egl_display;
76 *i_egl_surface=egl_surface;
77 *i_egl_context=egl_context;
78 *i_egl_config=egl_ourconfig;
81 EGLConfig getEGLConfig() {return egl_ourconfig;};
83 void AdviseAboutNewFrame() {threadSignal();};
90 //Maybe move the following stuff to a generic opengl object also for boosting DCT etc.
96 // This indicates, that currently a video is played, thus the osd updates are driven by the Videosystem
97 bool external_driving;
99 long long lastrendertime;
100 void InternalRendering();
101 void InitVertexBuffer(float scalex,float scaley);
102 OSDVERTEX osdvertices[4];
103 GLubyte osdindices[6];
105 GLOsdShader osd_shader;
109 uint32_t display_height;
110 uint32_t display_width;
111 DISPMANX_DISPLAY_HANDLE_T bcm_display;
112 DISPMANX_ELEMENT_HANDLE_T bcm_element;
116 EGLDisplay egl_display;
117 EGLSurface egl_surface;
118 EGLContext egl_context;
119 EGLConfig egl_ourconfig;
121 long long last_benchmark_time;
122 unsigned int num_benchmark_frames;