ROLAND  0.70
Amstrad Emulator based on Caprice Source rewritten in C++.
videogl.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) by Fred Klaus *
3  * development@fkweb.de *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 #ifndef SDLTK_VIDEOGL_H
21 #define SDLTK_VIDEOGL_H
22 
23 #include "def.h"
24 #include "video.h"
25 #include "canvasgl.h"
26 #include "cpc.h"
27 #include "SDL.h"
28 #include "glfuncs.h"
29 
30 namespace sdltk
31 {
32 
34  class VideoGL : public Video
35  {
36 
37  public:
39  virtual ~VideoGL();
40 
41  virtual int init();
42  virtual int init(uint width, uint height, uint depth, bool fullscreen, unsigned char scale);
43 
44  virtual Canvas * getCanvas() {return &mCanvas;}
45 
46  virtual void setup();
47  virtual void update() {SDL_GL_SwapBuffers();}
48 
49  virtual void quit();
50  virtual void lock() {}
51  virtual void unlock() {}
52 
53  private:
54  GLuint mTexWidth;
55  GLuint mTexHeight;
56  GLuint mTexnum;
57 
60 
61  static volatile bool mIsLoaded;
62 
64  };
65 
66 } // sdltk
67 
68 #endif // SDLTK_VIDEOGL_H
GLuint mTexWidth
Definition: videogl.h:54
virtual void lock()
Locks the screen-surface.
Definition: videogl.h:50
virtual Canvas * getCanvas()
Definition: videogl.h:44
VideoGL(cpcx::Cpc *cpc)
Definition: videogl.cpp:29
uint depth()
Returns the bytes per pixel inbetween (1 to 4)
Definition: video.h:66
virtual void unlock()
Unlocks the screen-surface.
Definition: videogl.h:51
GLuint mTexHeight
Definition: videogl.h:55
Definition: canvasgl.h:30
static volatile bool mIsLoaded
Definition: videogl.h:61
CanvasGL mCanvas
Definition: videogl.h:63
Definition: canvas.h:40
virtual ~VideoGL()
Definition: videogl.cpp:42
uint * calcScreenStart()
Definition: videogl.cpp:285
GLuint mTexnum
Definition: videogl.h:56
unsigned int uint
Definition: types.h:121
GLuint GLfloat GLenum cap GLsizei GLuint *textures GLenum GLint *params void GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble zFar GLenum GLint GLint GLsizei GLsizei height
Definition: glfunclist.h:21
virtual void quit()
Free all resources.
Definition: videogl.cpp:47
Definition: cpc.h:61
uint * calcScreenEnd()
Definition: videogl.cpp:297
virtual void setup()
Things that needs to be done before update.
Definition: videogl.cpp:251
Baseclass for all SDL Video drivers.
Definition: video.h:35
virtual int init()
Definition: videogl.cpp:73
sdltk::Audio audio & cpc
Definition: roland.cpp:76
GLuint GLfloat GLenum cap GLsizei GLuint *textures GLenum GLint *params void GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble zFar GLenum GLint GLint GLsizei width
Definition: glfunclist.h:21
the SDL based Stuff
Definition: audio.cpp:22
virtual void update()
Updates the Screen (flip or something)
Definition: videogl.h:47
Definition: videogl.h:34