[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/src/draw draw.cpp,1.1.2.5,1.1.2.6 drawable.cp
From: |
Teunis Peters <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/src/draw draw.cpp,1.1.2.5,1.1.2.6 drawable.cpp,1.1.2.3,1.1.2.4 pgglcore.cpp,1.1.2.2,1.1.2.3 |
Date: |
Thu, 12 Sep 2002 02:38:52 -0400 |
Update of /cvsroot/paragui/paragui/src/draw
In directory subversions:/tmp/cvs-serv1777/src/draw
Modified Files:
Tag: devel-opengl
draw.cpp drawable.cpp pgglcore.cpp
Log Message:
first operational opengl version - tag "gotta start somewhere"
also removed -most- of debug code - or at least commented it out.
Index: draw.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/Attic/draw.cpp,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -r1.1.2.5 -r1.1.2.6
*** draw.cpp 31 Aug 2002 04:01:23 -0000 1.1.2.5
--- draw.cpp 12 Sep 2002 06:38:50 -0000 1.1.2.6
***************
*** 80,84 ****
exit(-1);
}
! atexit(SDL_Quit);
};
--- 80,84 ----
exit(-1);
}
! // atexit(SDL_Quit);
};
***************
*** 217,224 ****
t = SDL_CreateRGBSurface(flags,width,height,depth,Rmask,Gmask,Bmask,Amask);
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
! fprintf(stderr, "%s:%s:%i %i,%i\n", __FILE__, __FUNCTION__, __LINE__,
width, height);
return surf;
};
--- 217,224 ----
t = SDL_CreateRGBSurface(flags,width,height,depth,Rmask,Gmask,Bmask,Amask);
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
! // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
! // fprintf(stderr, "%s:%s:%i %i,%i\n", __FILE__, __FUNCTION__, __LINE__,
width, height);
return surf;
};
***************
*** 234,241 ****
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
SDL_FreeSurface(q);
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
! fprintf(stderr, "%s:%s:%i %i,%i %p:%p\n", __FILE__, __FUNCTION__, __LINE__,
width, height, surf, q);
return surf;
#else
--- 234,241 ----
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
SDL_FreeSurface(q);
! // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
! // fprintf(stderr, "%s:%s:%i %i,%i %p:%p\n", __FILE__, __FUNCTION__,
__LINE__, width, height, surf, q);
return surf;
#else
***************
*** 277,284 ****
t =
SDL_CreateRGBSurfaceFrom(pixels,width,height,depth,pitch,Rmask,Gmask,Bmask,Amask);
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
! fprintf(stderr, "%s:%s:%i %i,%i\n", __FILE__, __FUNCTION__, __LINE__,
width, height);
return surf;
};
--- 277,284 ----
t =
SDL_CreateRGBSurfaceFrom(pixels,width,height,depth,pitch,Rmask,Gmask,Bmask,Amask);
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
! // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
! // fprintf(stderr, "%s:%s:%i %i,%i\n", __FILE__, __FUNCTION__, __LINE__,
width, height);
return surf;
};
Index: drawable.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/Attic/drawable.cpp,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -r1.1.2.3 -r1.1.2.4
*** drawable.cpp 31 Aug 2002 04:01:23 -0000 1.1.2.3
--- drawable.cpp 12 Sep 2002 06:38:50 -0000 1.1.2.4
***************
*** 78,82 ****
};
ref = s; // memcpy(this, s, sizeof(SDL_Surface));
! fprintf(stderr, "%s:%s:%i %p:%p\n", __FILE__, __FUNCTION__, __LINE__, this,
ref);
};
--- 78,82 ----
};
ref = s; // memcpy(this, s, sizeof(SDL_Surface));
! // fprintf(stderr, "%s:%s:%i %p:%p\n", __FILE__, __FUNCTION__, __LINE__,
this, ref);
};
Index: pgglcore.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/Attic/pgglcore.cpp,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** pgglcore.cpp 31 Aug 2002 04:01:23 -0000 1.1.2.2
--- pgglcore.cpp 12 Sep 2002 06:38:50 -0000 1.1.2.3
***************
*** 419,423 ****
if (!s) return;
_RGBfmt = *(s->format);
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
_FreeSurface(s);
--- 419,422 ----
***************
*** 425,429 ****
if (!s) return;
_RGBAfmt = *(s->format);
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
_FreeSurface(s);
}
--- 424,427 ----
***************
*** 505,513 ****
GLSDL_FIX_SURFACE(s);
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
! dumpflags(s->flags);
screen = new PG_GLDrawableSurface(this,s);
! // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
! if (screen == NULL) { PG_LogERR("failed to create window"); exit(-1); }
return screen;
}
--- 503,509 ----
GLSDL_FIX_SURFACE(s);
! dumpflags(s->flags);
screen = new PG_GLDrawableSurface(this,s);
! // if (screen == NULL) { PG_LogERR("failed to create window");
exit(-1); }
return screen;
}
***************
*** 548,562 ****
while ((width*scale < 640) && (height*scale < 480)) ++scale;
DBG(printf("real = %d x %d\n", width*scale, height*scale);)
! // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
!
s = SDL_SetVideoMode(width*scale, height*scale, depth, flags);
if (!s) {
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
! return NULL;
}
GLSDL_FIX_SURFACE(s);
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
! dumpflags(s->flags);
#ifdef FAKE_MAXTEXSIZE
--- 544,555 ----
while ((width*scale < 640) && (height*scale < 480)) ++scale;
DBG(printf("real = %d x %d\n", width*scale, height*scale);)
! //
s = SDL_SetVideoMode(width*scale, height*scale, depth, flags);
if (!s) {
! return NULL;
}
GLSDL_FIX_SURFACE(s);
! dumpflags(s->flags);
#ifdef FAKE_MAXTEXSIZE
***************
*** 592,597 ****
};
! // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
! return screen;
};
--- 585,589 ----
};
! // return screen;
};
***************
*** 656,660 ****
SDL_Surface *s, *tmp;
if (is_GL()) {
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
/* should I retain alpha if hasalpha is false??? */
int use_rgba = (src->flags & SDL_SRCCOLORKEY) ||
--- 648,651 ----
***************
*** 691,701 ****
}
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_GLDrawableSurface(this,s);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf->BlitSurface(tmp, PG_Rect(), PG_Rect());
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
_FreeSurface(tmp);
--- 682,689 ----
***************
*** 730,735 ****
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
GLSDL_FIX_SURFACE(t);
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
! surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
return surf;
--- 718,722 ----
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
GLSDL_FIX_SURFACE(t);
! surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
return surf;
***************
*** 744,749 ****
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
GLSDL_FIX_SURFACE(t);
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
! surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
return surf;
--- 731,735 ----
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
GLSDL_FIX_SURFACE(t);
! surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
return surf;
***************
*** 762,767 ****
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
GLSDL_FIX_SURFACE(t);
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
! surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
return surf;
--- 748,752 ----
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
GLSDL_FIX_SURFACE(t);
! surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
return surf;
***************
*** 988,992 ****
}
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
/* Make sure we have a source with a valid texture */
DownloadSurface(src);
--- 973,976 ----
***************
*** 1200,1204 ****
return -3;
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
if (tmp != NULL) delete tmp;
// if (datasurf != surface) _FreeSurface(datasurf);
--- 1184,1187 ----
***************
*** 1231,1236 ****
if ((ref != NULL) && (host != NULL)) {
/* host->FreeTexInfo(ref); */
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
if (ref != SDL_GetVideoSurface()) host->_FreeSurface(ref);
};
};
--- 1214,1219 ----
if ((ref != NULL) && (host != NULL)) {
/* host->FreeTexInfo(ref); */
if (ref != SDL_GetVideoSurface()) host->_FreeSurface(ref);
+ ref = NULL;
};
};
***************
*** 1248,1252 ****
if (!SDL_MUSTLOCK(ref) && !is_GL()) return;
if (!ref) return;
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
SDL_UnlockSurface(ref);
if (is_GL()) {
--- 1231,1234 ----
***************
*** 1345,1349 ****
if (!srf_src || !ref) return;
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
/*
--- 1327,1330 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/src/draw draw.cpp,1.1.2.5,1.1.2.6 drawable.cpp,1.1.2.3,1.1.2.4 pgglcore.cpp,1.1.2.2,1.1.2.3,
Teunis Peters <address@hidden> <=
- Prev by Date:
[paragui-cvs] CVS: paragui/src/widgets pgbutton.cpp,1.8.2.2,1.8.2.3 pglineedit.cpp,1.6.2.2,1.6.2.3 pglistboxitem.cpp,1.6.2.2,1.6.2.3 pgpopupmenu.cpp,1.7.2.2,1.7.2.3 pgprogressbar.cpp,1.4.2.3,1.4.2.4 pgthemewidget.cpp,1.6.2.2,1.6.2.3 pgwidgetlist.cpp,1.11.2.2,1.11.2.3
- Next by Date:
[paragui-cvs] CVS: paragui/src/core pgapplication.cpp,1.10.2.4,1.10.2.5 pgfilearchive.cpp,1.4.2.2,1.4.2.3 pgsurfacecache.cpp,1.2.2.4,1.2.2.5 physfsrwops.cpp,1.2.2.1,1.2.2.2
- Previous by thread:
[paragui-cvs] CVS: paragui/src/widgets pgbutton.cpp,1.8.2.2,1.8.2.3 pglineedit.cpp,1.6.2.2,1.6.2.3 pglistboxitem.cpp,1.6.2.2,1.6.2.3 pgpopupmenu.cpp,1.7.2.2,1.7.2.3 pgprogressbar.cpp,1.4.2.3,1.4.2.4 pgthemewidget.cpp,1.6.2.2,1.6.2.3 pgwidgetlist.cpp,1.11.2.2,1.11.2.3
- Next by thread:
[paragui-cvs] CVS: paragui/src/core pgapplication.cpp,1.10.2.4,1.10.2.5 pgfilearchive.cpp,1.4.2.2,1.4.2.3 pgsurfacecache.cpp,1.2.2.4,1.2.2.5 physfsrwops.cpp,1.2.2.1,1.2.2.2
- Index(es):