paragui-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-cvs] CVS: paragui/include pgdraw.h,1.4.2.4,1.4.2.5 pggldraw.h,1


From: Teunis Peters <address@hidden>
Subject: [paragui-cvs] CVS: paragui/include pgdraw.h,1.4.2.4,1.4.2.5 pggldraw.h,1.1.2.3,1.1.2.4
Date: Thu, 24 Oct 2002 12:08:15 -0400

Update of /cvsroot/paragui/paragui/include
In directory subversions:/tmp/cvs-serv4924/include

Modified Files:
      Tag: devel-opengl
        pgdraw.h pggldraw.h 
Log Message:
A number of updates - please review.  Probably will remove some of these 
features.  Almost solved the OpenGL driver problems....


Index: pgdraw.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgdraw.h,v
retrieving revision 1.4.2.4
retrieving revision 1.4.2.5
diff -C2 -r1.4.2.4 -r1.4.2.5
*** pgdraw.h    7 Oct 2002 22:23:26 -0000       1.4.2.4
--- pgdraw.h    24 Oct 2002 16:08:12 -0000      1.4.2.5
***************
*** 35,38 ****
--- 35,39 ----
  
  #include <math.h> /* FIXME - should be in common header? */
+ #include <vector>
  #include "pgrect.h"
  
***************
*** 70,76 ****
        friend class PG_Draw;
      protected:
        PG_DrawableSurface();
-     public:
        PG_DrawableSurface(SDL_Surface*);
        virtual ~PG_DrawableSurface();
  
--- 71,78 ----
        friend class PG_Draw;
      protected:
+       PG_Draw* creator;
        PG_DrawableSurface();
        PG_DrawableSurface(SDL_Surface*);
+     public:
        virtual ~PG_DrawableSurface();
  
***************
*** 233,236 ****
--- 235,239 ----
  
        virtual bool BlitFTBitmap(FT_Bitmap *Bitmap, int PosX, int PosY, 
PG_Font* Param, PG_Rect *ClipRect);
+       virtual PG_Draw* getCreator() const { return creator; };
  
     protected:
***************
*** 244,247 ****
--- 247,251 ----
        PG_Draw();
        virtual ~PG_Draw();
+       virtual std::string getName() const { return "SDL"; };
  
        /**
***************
*** 263,272 ****
--- 267,299 ----
         */
        virtual void init(Uint32 flags);
+ 
        /**
         Quit the drawing system; default does SDL_Quit(flags);
         */
        virtual void quit();
+ 
+       /**
+        Attach a drawing surface to this engine (note: driver internal call)
+        returns: 0 on success; otherwise errno
+       */
+       virtual int attach(PG_DrawableSurface*);
+ 
+       /**
+        Detach a drawing surface from this engine (note: driver internal call)
+        returns: 0 on success; otherwise errno
+       */
+       virtual int detach(PG_DrawableSurface*);
+ 
+       /**
+        Convert a surface to be native to this drawing engine
+       */
+       virtual PG_DrawableSurface* MakeNative(PG_DrawableSurface*);
        
        /**
+        Convert all attached surfaces to be native to this drawing engine
+       */
+       virtual bool ConvertAllNative(PG_Draw*);
+ 
+       /**
         Collect information about the current video environment; default is 
SDL_GetVideoInfo()
         */
***************
*** 326,329 ****
--- 353,365 ----
  
        /**
+        Creates a reference (or copy possibly) to an existing SDL surface.
+        It's up to the drawing engine how this call is handled - the default
+        (SDL) driver just creates an object referring to this surface.
+        
+        Note that if a copy is made the SDL_Surface passed here will be 
deleted.
+        */
+       virtual PG_DrawableSurface* CreateSDLSurface(SDL_Surface*);
+ 
+       /**
         Creates a drawing surface; default is SDL_CreateRGBSurface
         note that the intent of this is to create hardware surface memory and
***************
*** 402,405 ****
--- 438,444 ----
        static PG_Draw* defaultdraw;
        PG_DrawableSurface* screen;
+       std::vector<PG_DrawableSurface*> surflist;
+ 
+       typedef std::vector<PG_DrawableSurface*>::iterator surfiter;
     };
  

Index: pggldraw.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/Attic/pggldraw.h,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -r1.1.2.3 -r1.1.2.4
*** pggldraw.h  7 Oct 2002 22:23:26 -0000       1.1.2.3
--- pggldraw.h  24 Oct 2002 16:08:12 -0000      1.1.2.4
***************
*** 103,106 ****
--- 103,107 ----
  protected:
     PG_GLDrawableSurface();
+    PG_GLDrawableSurface(SDL_Surface*);
  
  public:
***************
*** 155,158 ****
--- 156,162 ----
        void init(Uint32 flags);
        void quit();
+       virtual std::string getName() const { return "OpenGL"; };
+       int attach(PG_DrawableSurface*);
+       int detach(PG_DrawableSurface*);
  
        PG_DrawableSurface* SetMode(int width, int height, int depth, Uint32 
flags);
***************
*** 160,163 ****
--- 164,168 ----
        int Flip();
        PG_DrawableSurface* AccelDrawableSurface(SDL_Surface* src, bool 
hasalpha=false);
+       PG_DrawableSurface* CreateSDLSurface(SDL_Surface*);
        PG_DrawableSurface*
        CreateDrawableSurface(Uint32 flags,int width, int height, int depth=0,





reply via email to

[Prev in Thread] Current Thread [Next in Thread]