paragui-cvs
[Top][All Lists]
Advanced

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

[paragui-cvs] CVS: paragui/src/draw/opengl glpriv.hh,NONE,1.1.2.1 pgglco


From: Teunis Peters <address@hidden>
Subject: [paragui-cvs] CVS: paragui/src/draw/opengl glpriv.hh,NONE,1.1.2.1 pgglcore.cpp,NONE,1.1.2.1 pgglmem.cpp,NONE,1.1.2.1 pggloper.cpp,NONE,1.1.2.1
Date: Wed, 30 Oct 2002 14:17:34 -0500

Update of /cvsroot/paragui/paragui/src/draw/opengl
In directory subversions:/tmp/cvs-serv7927/src/draw/opengl

Added Files:
      Tag: devel-opengl
        glpriv.hh pgglcore.cpp pgglmem.cpp pggloper.cpp 
Log Message:
Oops - more missing files...


--- NEW FILE ---
/* glpriv.hh
 * ---------
 * private internal data for OpenGL core
 */

#ifndef GLPRIV_HH
#define GLPRIV_HH

#ifndef PG_DRAW_H
#include "pgdraw.h"
#endif

#ifndef PG_GLDRAW_H
#include "pggldraw.h"
#endif

namespace PG_Draw {

/*
 * Note that this will result in whining about
 * TexInfo 0 being leaked, as the checking is
 * done before the screen is closed. Ignore. :-)
 */
#define LEAK_TRACKING

#define DBG(x)  x       /*error messages, warnings*/
#define DBG2(x) x       /*texture allocation*/
#define DBG3(x) x       /*chopping/tiling*/
#define DBG4(x) x       /*texture downloading*/
#define DBG5(x) x       /*rendering - note enabling this is not wise...*/
#define DBGLINE() PG_LogMSG("%s:%s:%i", __FILE__, __FUNCTION__, __LINE__)
#define DBGFUNC() \
PG_LogMSG("-----------------------------------------------------------------------------");
 \
PG_LogMSG("[%s] Start:%s:%i", __FUNCTION__, __FILE__, __LINE__)

#define DBGFUNCEND() \
PG_LogMSG("[%s] Finish:%s:%i", __FUNCTION__, __FILE__, __LINE__); \
PG_LogMSG("-----------------------------------------------------------------------------")

#if 1
static void dumpflags(Uint32 fl)
{
  char buf[255];
#if 0
  snprintf(buf, 255, "%s:%s:%i flags[%u] :", __FILE__, __FUNCTION__, __LINE__, 
fl);
#else
  snprintf(buf, 255, "[%s] flags[%u] :", __FUNCTION__, fl);
#endif
  if (fl & 0x00100000) strcat(buf, "glSDL;");

  if (fl & SDL_HWSURFACE)   strcat(buf, "hw surf;"); else strcat(buf, "sw 
surf;");
  if (fl & SDL_ASYNCBLIT)   strcat(buf, "async;");
  if (fl & SDL_ANYFORMAT)   strcat(buf, "any format;");
  if (fl & SDL_HWPALETTE)   strcat(buf, "hw pal;");
  if (fl & SDL_DOUBLEBUF)   strcat(buf, "dblbuf;");
  if (fl & SDL_FULLSCREEN)  strcat(buf, "fullscreen;");
  if (fl & SDL_OPENGL)      strcat(buf, "opengl;");
  if (fl & SDL_OPENGLBLIT)  strcat(buf, "openglblit;");
  if (fl & SDL_RESIZABLE)   strcat(buf, "resize;");
  if (fl & SDL_NOFRAME)     strcat(buf, "noframe;");
  if (fl & SDL_HWACCEL)     strcat(buf, "hw accel;");
  if (fl & SDL_SRCCOLORKEY) strcat(buf, "src colour key;");
  if (fl & SDL_RLEACCELOK)  strcat(buf, "rle ok;");
  if (fl & SDL_RLEACCEL)    strcat(buf, "rle;");
  if (fl & SDL_SRCALPHA)    strcat(buf, "src alpha;");
  if (fl & SDL_PREALLOC)    strcat(buf, "prealloc;");
  PG_LogMSG(buf);
};

static void dumpimg(SDL_Surface* s) {
  PG_LogMSG("dumping image:[%p]", s);
  PG_LogMSG("width %i height %i pitch %i pixels %p", s->w, s->h, s->pitch, 
s->pixels);
  dumpflags(s->flags);
  PG_LogMSG("bpp %i bytes/pixel %i", s->format->BitsPerPixel, 
s->format->BytesPerPixel);
  PG_LogMSG("loss %i:%i:%i:%i shift %i:%i:%i:%i mask %x:%x:%x:%x",
            s->format->Rloss, s->format->Gloss, s->format->Bloss, 
s->format->Aloss,
            
s->format->Rshift,s->format->Gshift,s->format->Bshift,s->format->Ashift,
            s->format->Rmask, s->format->Gmask, s->format->Bmask, 
s->format->Amask);
  PG_LogMSG("colour key %i alpha %i", s->format->colorkey, s->format->alpha);
  PG_LogMSG("clip rect (%i:%i - %i:%i)", s->clip_rect.x, s->clip_rect.y, 
s->clip_rect.w, s->clip_rect.h);
  PG_LogMSG("unused1 %i ref %i", s->unused1, s->refcount);
};

#endif

/*
#define FAKE_MAXTEXSIZE 64
*/

#define GLSDL_FIX_SURFACE(s)    (s)->unused1 = 0xffffffff;

#define IS_GLSDL_SURFACE(s)     ((s) && GetTexInfo(s))

#define LOGIC_W(s)      ( IS_GLSDL_SURFACE(s) ? TEXINFO(s)->lw : (s)->w )
#define LOGIC_H(s)      ( IS_GLSDL_SURFACE(s) ? TEXINFO(s)->lh : (s)->h )

  // #define    USING_GLSDL     (IS_GLSDL_SURFACE(SDL_GetVideoSurface()))
#define MAX_TEXINFOS    16384
#define GLSDL_NOTEX     0

DBG(void _print_glerror(int point));

}; /* namespace PG_Draw */
#endif /* GLPRIV_HH */

***** Error reading new file: [Errno 2] No such file or directory: 
'pgglcore.cpp'
***** Error reading new file: [Errno 2] No such file or directory: 'pgglmem.cpp'
***** Error reading new file: [Errno 2] No such file or directory: 
'pggloper.cpp'




reply via email to

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