2 Copyright 2006, 2011-2012 Marten Richter
\r
4 This file is part of VOMP.
\r
6 VOMP is free software; you can redistribute it and/or modify
\r
7 it under the terms of the GNU General Public License as published by
\r
8 the Free Software Foundation; either version 2 of the License, or
\r
9 (at your option) any later version.
\r
11 VOMP is distributed in the hope that it will be useful,
\r
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
14 GNU General Public License for more details.
\r
16 You should have received a copy of the GNU General Public License
\r
17 along with VOMP; if not, write to the Free Software
\r
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
\r
21 #ifndef SURFACEOPENGL_H
\r
22 #define SURFACEOPENGL_H
\r
24 #include "defines.h"
\r
25 #include "surface.h"
\r
27 #include <GLES2/gl2.h>
\r
29 class SurfaceOpenGL : public Surface
\r
32 SurfaceOpenGL(int id = 0);
\r
33 virtual ~SurfaceOpenGL();
\r
35 int create(UINT width, UINT height);
\r
38 void startFastDraw();
\r
41 int fillblt(int x, int y, int width, int height, const DrawStyle& c);
\r
43 void drawHorzLine(int x1, int x2, int y, const DrawStyle& c);
\r
44 void drawVertLine(int x, int y1, int y2, const DrawStyle& c);
\r
45 void drawBitmap(int x, int y, const Bitmap& bm,const DisplayRegion & region);
\r
46 int updateToScreen(int sx, int sy, int w, int h, int dx, int dy);
\r
47 void readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b);
\r
48 void screenShot(const char* fileName);
\r
49 void ReleaseSurface();
\r
50 int blt(int fd, unsigned long shandle, int sx, int sy, int width, int height, unsigned long dhandle, int dx, int dy);
\r
51 void drawJpeg(const char *fileName,int x, int y,int *width, int *height);
\r
52 /* void drawJpeg(char *buffer,ULONG buflength,DWORD x, DWORD y,DWORD *width, DWORD *height);*/
\r
54 GLuint getTexture() {return gltexture;};
\r
60 UINT sheight,swidth;
\r
67 void drawPixel(int x, int y, Colour& c, bool fastdraw=false);
\r
68 void drawPixel(int x, int y, unsigned int c, bool fastdraw=false);
\r