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, unsigned int c);
\r
42 void drawPixel(int x, int y, Colour& c, bool fastdraw=false);
\r
43 void drawPixel(int x, int y, unsigned int c, bool fastdraw=false);
\r
44 void drawHorzLine(int x1, int x2, int y, unsigned int c);
\r
45 void drawVertLine(int x, int y1, int y2, unsigned int c);
\r
46 void drawBitmap(int x, int y, const Bitmap& bm);
\r
47 int updateToScreen(int sx, int sy, int w, int h, int dx, int dy);
\r
48 void readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b);
\r
49 void screenShot(const char* fileName);
\r
50 void ReleaseSurface();
\r
51 int blt(int fd, unsigned long shandle, int sx, int sy, int width, int height, unsigned long dhandle, int dx, int dy);
\r
52 void drawJpeg(const char *fileName,int x, int y,int *width, int *height);
\r
53 /* void drawJpeg(char *buffer,ULONG buflength,DWORD x, DWORD y,DWORD *width, DWORD *height);*/
\r
55 GLuint getTexture() {return gltexture;};
\r
61 UINT sheight,swidth;
\r