[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/include pgdriver.h,NONE,1.1.2.1 pgdriverdta.h
From: |
Teunis Peters <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/include pgdriver.h,NONE,1.1.2.1 pgdriverdta.h,NONE,1.1.2.1 pgdraw.h,1.4.2.3,1.4.2.4 pgfont.h,1.4.2.2,1.4.2.3 pggldraw.h,1.1.2.2,1.1.2.3 |
Date: |
Mon, 07 Oct 2002 18:23:28 -0400 |
Update of /cvsroot/paragui/paragui/include
In directory subversions:/tmp/cvs-serv21228/include
Modified Files:
Tag: devel-opengl
pgdraw.h pgfont.h pggldraw.h
Added Files:
Tag: devel-opengl
pgdriver.h pgdriverdta.h
Log Message:
Add driver support
expand debugging code (but mostly disabled)
Some more clarification.... hope I got everything - T
***** Error reading new file: [Errno 2] No such file or directory: 'pgdriver.h'
***** Error reading new file: [Errno 2] No such file or directory:
'pgdriverdta.h'
Index: pgdraw.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgdraw.h,v
retrieving revision 1.4.2.3
retrieving revision 1.4.2.4
diff -C2 -r1.4.2.3 -r1.4.2.4
*** pgdraw.h 26 Jun 2002 08:47:51 -0000 1.4.2.3
--- pgdraw.h 7 Oct 2002 22:23:26 -0000 1.4.2.4
***************
*** 34,39 ****
--- 34,43 ----
#define PG_DRAW_H
+ #include <math.h> /* FIXME - should be in common header? */
#include "pgrect.h"
+ #include <ft2build.h>
+ #include FT_FREETYPE_H
+
#ifndef M_PI
/**
***************
*** 50,53 ****
--- 54,65 ----
*/
+ #ifndef __FTIMAGE_H__
+ extern "C" {
+ struct FT_Bitmap;
+ };
+ #endif
+
+ class PG_Font;
+
namespace PG_Draw {
***************
*** 220,223 ****
--- 232,237 ----
virtual void DrawTile(const PG_Rect& ref, const PG_Rect& drawrect,
PG_DrawableSurface* tilemap);
+ virtual bool BlitFTBitmap(FT_Bitmap *Bitmap, int PosX, int PosY,
PG_Font* Param, PG_Rect *ClipRect);
+
protected:
SDL_Surface* ref;
***************
*** 230,233 ****
--- 244,260 ----
PG_Draw();
virtual ~PG_Draw();
+
+ /**
+ pre-initialization configurations
+ */
+ virtual void preinit() {};
+ /**
+ pre-removal (before removal from driver system)
+ */
+ virtual void prerm() {};
+ /**
+ post-removal (after removal from driver system)
+ */
+ virtual void postrm() {};
/**
Index: pgfont.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgfont.h,v
retrieving revision 1.4.2.2
retrieving revision 1.4.2.3
diff -C2 -r1.4.2.2 -r1.4.2.3
*** pgfont.h 31 Aug 2002 04:01:22 -0000 1.4.2.2
--- pgfont.h 7 Oct 2002 22:23:26 -0000 1.4.2.3
***************
*** 156,161 ****
private:
-
PG_FontFaceCacheItem* GetFaceCache(int index=0);
PG_FontDataInternal* my_internaldata;
--- 156,161 ----
private:
PG_FontFaceCacheItem* GetFaceCache(int index=0);
+
PG_FontDataInternal* my_internaldata;
Index: pggldraw.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/Attic/pggldraw.h,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** pggldraw.h 26 Jun 2002 16:24:57 -0000 1.1.2.2
--- pggldraw.h 7 Oct 2002 22:23:26 -0000 1.1.2.3
***************
*** 37,41 ****
--- 37,43 ----
#define PG_GLDRAW_H
+ #ifndef PG_DRAW_H
#include "pgdraw.h"
+ #endif
#ifdef HAVE_OPENGL
***************
*** 85,88 ****
--- 87,91 ----
SDL_Rect invalid_area;
} glSDL_TexInfo;
+ typedef struct glSDL_TexInfo *pglSDL_TexInfo;
***************
*** 96,99 ****
--- 99,104 ----
class PG_GLDrawableSurface : public PG_DrawableSurface {
friend class PG_GLDraw;
+ private:
+ bool glactive;
protected:
PG_GLDrawableSurface();
***************
*** 101,105 ****
public:
PG_GLDrawableSurface(PG_GLDraw*, SDL_Surface*);
! ~PG_GLDrawableSurface();
int Lock();
--- 106,110 ----
public:
PG_GLDrawableSurface(PG_GLDraw*, SDL_Surface*);
! virtual ~PG_GLDrawableSurface();
int Lock();
***************
*** 110,113 ****
--- 115,138 ----
void BlitSurface(const SDL_Surface* srf_src, const PG_Rect& rect_src,
const PG_Rect& rect_dst);
int FillRect(const PG_Rect& dstrect, Uint32 color);
+ void DrawLine(Uint32 x0, Uint32 y0, Uint32 x1, Uint32 y1, const SDL_Color&
color, Uint8 width = 1);
+ void SetPixel(int x, int y, const SDL_Color& color);
+
+ void DrawTile(const PG_Rect& ref, const PG_Rect& drawrect,
PG_DrawableSurface* tilemap);
+
+ SDL_Surface* getScreen();
+ void GetClipRect(PG_Rect& rect);
+ void BlitScale(PG_DrawableSurface* src, bool smooth = true);
+ /* from SDL_SetColors(..) (don't US know how to spell? It's 'colour'! */
+ int SetColors(SDL_Color *colors, int firstcolor, int ncolors);
+ int SetPalette(int flags, SDL_Color *colors, int firstcolor, int ncolors);
+ int SetAlpha(Uint32 flag, Uint8 alpha);
+ PG_DrawableSurface* RotoScaleSurface(double angle, double zoom,
+ bool smooth = true);
+ PG_DrawableSurface* ScaleSurface(double zoomx, double zoomy,
+ bool smooth = true);
+ void DrawGradient(const PG_Rect& r, PG_Gradient& gradient);
+ void DrawGradient(const PG_Rect& rect, const SDL_Color & ul, const
SDL_Color & ur, const SDL_Color & dl, const SDL_Color & dr);
+ void DrawThemedSurface(const PG_Rect& r, PG_Gradient* gradient,
PG_DrawableSurface* background, int bkmode, Uint8 blend);
+ bool BlitFTBitmap(FT_Bitmap *Bitmap, int PosX, int PosY, PG_Font* Param,
PG_Rect *ClipRect);
/* new methods */
***************
*** 116,145 ****
glSDL_TexInfo *GetTexInfo();
! bool is_GL() { return (GetTexInfo() != NULL); };
!
protected:
PG_GLDraw* host;
int scale;
-
- #if 0
- public:
- SDL_Surface* getScreen();
- void GetClipRect(PG_Rect& rect);
- void BlitScale(PG_DrawableSurface* src, bool smooth = true);
- /* from SDL_SetColors(..) (don't US know how to spell? It's 'colour'! */
- int SetColors(SDL_Color *colors, int firstcolor, int ncolors);
- int SetPalette(int flags, SDL_Color *colors, int firstcolor, int
ncolors);
- int SetAlpha(Uint32 flag, Uint8 alpha);
- void DrawLine(Uint32 x0, Uint32 y0, Uint32 x1, Uint32 y1, const
SDL_Color& color, Uint8 width = 1);
- void SetPixel(int x, int y, const SDL_Color& color);
- PG_DrawableSurface* RotoScaleSurface(double angle, double zoom,
- bool smooth = true);
- PG_DrawableSurface* ScaleSurface(double zoomx, double zoomy,
- bool smooth = true);
- void DrawGradient(const PG_Rect& r, PG_Gradient& gradient);
- void DrawGradient(const PG_Rect& rect, const SDL_Color & ul, const
SDL_Color & ur, const SDL_Color & dl, const SDL_Color & dr);
- void DrawThemedSurface(const PG_Rect& r, PG_Gradient* gradient,
PG_DrawableSurface* background, int bkmode, Uint8 blend);
- void DrawTile(const PG_Rect& ref, const PG_Rect& drawrect,
PG_DrawableSurface* tilemap);
- #endif
};
--- 141,149 ----
glSDL_TexInfo *GetTexInfo();
! bool is_GL() { return glactive; };
!
protected:
PG_GLDraw* host;
int scale;
};
***************
*** 148,152 ****
public:
PG_GLDraw();
! ~PG_GLDraw();
void init(Uint32 flags);
void quit();
--- 152,156 ----
public:
PG_GLDraw();
! virtual ~PG_GLDraw();
void init(Uint32 flags);
void quit();
***************
*** 208,218 ****
void _UnloadTexture(glSDL_TexInfo *txi);
- glSDL_TexInfo **texinfotab;
GLint maxtexsize;
- SDL_PixelFormat _RGBfmt, _RGBAfmt;
int update_screen;
SDL_Surface *fake_screen;
PG_GLDrawableSurface* realscreen;
struct
--- 212,223 ----
void _UnloadTexture(glSDL_TexInfo *txi);
GLint maxtexsize;
int update_screen;
+ SDL_PixelFormat _RGBfmt, _RGBAfmt;
+ pglSDL_TexInfo* texinfotab;
SDL_Surface *fake_screen;
PG_GLDrawableSurface* realscreen;
+ PG_DrawableSurface* my_charSurface;
struct
***************
*** 225,228 ****
--- 230,237 ----
#if 0
+ virtual void preinit() {};
+ virtual void prerm() {};
+ virtual void postrm() {};
+
const SDL_VideoInfo* GetVideoInfo() const;
int VerifyMode(int width, int height, int depth, Uint32 flags);
***************
*** 239,244 ****
#endif
};
-
- inline bool PG_GLDraw::is_GL() { return (GetTexInfo(screen->getScreen()) !=
NULL); };
}; /* namespace PG_Draw */
--- 248,251 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/include pgdriver.h,NONE,1.1.2.1 pgdriverdta.h,NONE,1.1.2.1 pgdraw.h,1.4.2.3,1.4.2.4 pgfont.h,1.4.2.2,1.4.2.3 pggldraw.h,1.1.2.2,1.1.2.3,
Teunis Peters <address@hidden> <=
- Prev by Date:
[paragui-cvs] CVS: paragui/src/font pgfont.cpp,1.3.2.3,1.3.2.4
- Next by Date:
[paragui-cvs] CVS: paragui/test gltest.cpp,1.1.2.3,1.1.2.4 paratest.cpp,1.9.2.5,1.9.2.6
- Previous by thread:
[paragui-cvs] CVS: paragui/src/font pgfont.cpp,1.3.2.3,1.3.2.4
- Next by thread:
[paragui-cvs] CVS: paragui/test gltest.cpp,1.1.2.3,1.1.2.4 paratest.cpp,1.9.2.5,1.9.2.6
- Index(es):