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, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28 #include <GLES2/gl2.h>
30 #include <EGL/eglext.h>
39 #include "glosdshader.h"
68 class OsdOpenGL : public Osd, public Thread_TYPE
74 int init(void* device);
79 void screenShot(const char* fileName);
81 Surface * createNewSurface();
89 void getEGLObjs(EGLDisplay *i_egl_display,EGLSurface *i_egl_surface,EGLContext *i_egl_context, EGLConfig *i_egl_config){
90 *i_egl_display=egl_display;
91 *i_egl_surface=egl_surface;
92 *i_egl_context=egl_context;
93 *i_egl_config=egl_ourconfig;
96 EGLConfig getEGLConfig() {return egl_ourconfig;};
98 void AdviseAboutNewFrame() {threadSignal();};
105 //Maybe move the following stuff to a generic opengl object also for boosting DCT etc.
110 void threadPostStopCleanup();
112 // This indicates, that currently a video is played, thus the osd updates are driven by the Videosystem
113 bool external_driving;
115 long long lastrendertime;
116 void InternalRendering();
117 void InitVertexBuffer(float scalex,float scaley);
118 OSDVERTEX osdvertices[4];
119 GLubyte osdindices[6];
121 GLOsdShader osd_shader;
128 uint32_t display_height;
129 uint32_t display_width;
130 DISPMANX_DISPLAY_HANDLE_T bcm_display;
131 DISPMANX_ELEMENT_HANDLE_T bcm_element;
136 EGLDisplay egl_display;
137 EGLSurface egl_surface;
138 EGLContext egl_context;
139 EGLConfig egl_ourconfig;
141 long long last_benchmark_time;
142 unsigned int num_benchmark_frames;