[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/test animation.cpp,1.2.2.4,1.2.2.5 dblbuffer.
From: |
Teunis Peters <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/test animation.cpp,1.2.2.4,1.2.2.5 dblbuffer.cpp,1.4.2.5,1.4.2.6 gltest.cpp,1.1.2.5,1.1.2.6 windowresize.cpp,1.1.2.2,1.1.2.3 |
Date: |
Wed, 30 Oct 2002 04:16:32 -0500 |
Update of /cvsroot/paragui/paragui/test
In directory subversions:/tmp/cvs-serv26981/test
Modified Files:
Tag: devel-opengl
animation.cpp dblbuffer.cpp gltest.cpp windowresize.cpp
Log Message:
Updating function names to be more consistent with ParaGUI
There's a persistant memory bug - somewhere - which is attempting to delete
information already deleted. Not all demos exhibit this, but paratest is
amongst those that do.
Significant rewrite of most of OpenGL driver. There's still more to be done
and the driver as yet does not work correctly. Any help would be quite
appreciated but as I haven't received anything more than a couple comments yet
I'm not holding my breath - T.
Index: animation.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/test/animation.cpp,v
retrieving revision 1.2.2.4
retrieving revision 1.2.2.5
diff -C2 -r1.2.2.4 -r1.2.2.5
*** animation.cpp 12 Sep 2002 06:38:50 -0000 1.2.2.4
--- animation.cpp 30 Oct 2002 09:16:29 -0000 1.2.2.5
***************
*** 206,210 ****
temp_color.b = (my_color.b * tickstate)/40;
! temp_int = SDL_MapRGB(my_srfScreen->getScreen()->format, temp_color.r,
temp_color.g, temp_color.b);
my_srfScreen->FillRect(temp_rect, temp_int);
}
--- 206,210 ----
temp_color.b = (my_color.b * tickstate)/40;
! temp_int = my_srfScreen->MapRGB(temp_color.r, temp_color.g,
temp_color.b);
my_srfScreen->FillRect(temp_rect, temp_int);
}
Index: dblbuffer.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/test/dblbuffer.cpp,v
retrieving revision 1.4.2.5
retrieving revision 1.4.2.6
diff -C2 -r1.4.2.5 -r1.4.2.6
*** dblbuffer.cpp 12 Sep 2002 06:38:50 -0000 1.4.2.5
--- dblbuffer.cpp 30 Oct 2002 09:16:29 -0000 1.4.2.6
***************
*** 46,52 ****
/* Set transparent pixel as the pixel at (0,0) */
! if ( sprite->getScreen()->format->palette ) {
sprite->SetColorKey((SDL_SRCCOLORKEY|SDL_RLEACCEL),
! *(Uint8 *)sprite->getScreen()->pixels);
}
--- 46,52 ----
/* Set transparent pixel as the pixel at (0,0) */
! if ( sprite->GetFormat()->palette ) {
sprite->SetColorKey((SDL_SRCCOLORKEY|SDL_RLEACCEL),
! *(Uint8 *)sprite->GetPixels());
}
***************
*** 81,90 ****
velocity = &velocities[i];
position->x += velocity->x;
! if ( (position->x < 0) || (position->x >=
screen->getScreen()->w) ) {
velocity->x = -velocity->x;
position->x += velocity->x;
}
position->y += velocity->y;
! if ( (position->y < 0) || (position->y >=
screen->getScreen()->h) ) {
velocity->y = -velocity->y;
position->y += velocity->y;
--- 81,90 ----
velocity = &velocities[i];
position->x += velocity->x;
! if ( (position->x < 0) || (position->x >= screen->GetWidth()) )
{
velocity->x = -velocity->x;
position->x += velocity->x;
}
position->y += velocity->y;
! if ( (position->y < 0) || (position->y >= screen->GetHeight())
) {
velocity->y = -velocity->y;
position->y += velocity->y;
***************
*** 252,259 ****
srand(time(NULL));
for ( i=0; i<numsprites; ++i ) {
! positions[i].x = rand()%screen->getScreen()->w;
! positions[i].y = rand()%screen->getScreen()->h;
! positions[i].w = sprite->getScreen()->w;
! positions[i].h = sprite->getScreen()->h;
velocities[i].x = 0;
velocities[i].y = 0;
--- 252,259 ----
srand(time(NULL));
for ( i=0; i<numsprites; ++i ) {
! positions[i].x = rand()%screen->GetWidth();
! positions[i].y = rand()%screen->GetHeight();
! positions[i].w = sprite->GetWidth();
! positions[i].h = sprite->GetHeight();
velocities[i].x = 0;
velocities[i].y = 0;
***************
*** 263,279 ****
}
}
! background = SDL_MapRGB(screen->getScreen()->format, 0x00, 0x00, 0x00);
/* Print out information about our surfaces */
! PG_LogMSG("Screen is at %d bits per
pixel",screen->getScreen()->format->BitsPerPixel);
! if ( (screen->getScreen()->flags & SDL_HWSURFACE) == SDL_HWSURFACE ) {
PG_LogMSG("Screen is in video memory");
} else {
PG_LogMSG("Screen is in system memory");
}
! if ( (screen->getScreen()->flags & SDL_DOUBLEBUF) == SDL_DOUBLEBUF ) {
PG_LogMSG("Screen has double-buffering enabled");
}
! if ( (sprite->getScreen()->flags & SDL_HWSURFACE) == SDL_HWSURFACE ) {
PG_LogMSG("Sprite is in video memory");
} else {
--- 263,279 ----
}
}
! background = screen->MapRGB(0x00, 0x00, 0x00);
/* Print out information about our surfaces */
! PG_LogMSG("Screen is at %d bits per
pixel",screen->GetFormat()->BitsPerPixel);
! if ( (screen->GetSDLFlags() & SDL_HWSURFACE) == SDL_HWSURFACE ) {
PG_LogMSG("Screen is in video memory");
} else {
PG_LogMSG("Screen is in system memory");
}
! if ( (screen->GetSDLFlags() & SDL_DOUBLEBUF) == SDL_DOUBLEBUF ) {
PG_LogMSG("Screen has double-buffering enabled");
}
! if ( (sprite->GetSDLFlags() & SDL_HWSURFACE) == SDL_HWSURFACE ) {
PG_LogMSG("Sprite is in video memory");
} else {
***************
*** 281,292 ****
}
/* Run a sample blit to trigger blit acceleration */
! { PG_Rect dst =
PG_Rect(0,0,sprite->getScreen()->w,sprite->getScreen()->h);
screen->BlitSurface(sprite, PG_Rect(), dst);
screen->FillRect(dst, background);
}
! if ( (sprite->getScreen()->flags & SDL_HWACCEL) == SDL_HWACCEL ) {
PG_LogMSG("Sprite blit uses hardware acceleration");
}
! if ( (sprite->getScreen()->flags & SDL_RLEACCEL) == SDL_RLEACCEL ) {
PG_LogMSG("Sprite blit uses RLE acceleration");
}
--- 281,292 ----
}
/* Run a sample blit to trigger blit acceleration */
! { PG_Rect dst = PG_Rect(0,0,sprite->GetWidth(),sprite->GetHeight());
screen->BlitSurface(sprite, PG_Rect(), dst);
screen->FillRect(dst, background);
}
! if ( (sprite->GetSDLFlags() & SDL_HWACCEL) == SDL_HWACCEL ) {
PG_LogMSG("Sprite blit uses hardware acceleration");
}
! if ( (sprite->GetSDLFlags() & SDL_RLEACCEL) == SDL_RLEACCEL ) {
PG_LogMSG("Sprite blit uses RLE acceleration");
}
***************
*** 345,349 ****
#else
/* Update the screen! */
! if ( (screen->getScreen()->flags & SDL_DOUBLEBUF) ==
SDL_DOUBLEBUF ) {
PG_Application::GetDrawingEnvironment()->Flip();
} else {
--- 345,349 ----
#else
/* Update the screen! */
! if ( (screen->GetSDLFlags() & SDL_DOUBLEBUF) == SDL_DOUBLEBUF )
{
PG_Application::GetDrawingEnvironment()->Flip();
} else {
Index: gltest.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/test/Attic/gltest.cpp,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -r1.1.2.5 -r1.1.2.6
*** gltest.cpp 24 Oct 2002 16:08:13 -0000 1.1.2.5
--- gltest.cpp 30 Oct 2002 09:16:29 -0000 1.1.2.6
***************
*** 112,116 ****
my_srfScreen->SetClipRect(dst);
! // glViewport(0,0,my_srfScreen->getWidth(),my_srfScreen->getHeight());
glMatrixMode(GL_PROJECTION);
glPushMatrix();
--- 112,116 ----
my_srfScreen->SetClipRect(dst);
! // glViewport(0,0,my_srfScreen->GetWidth(),my_srfScreen->GetHeight());
glMatrixMode(GL_PROJECTION);
glPushMatrix();
***************
*** 235,239 ****
// glMatrixMode(GL_PROJECTION);
// glPopMatrix();
! // glViewport(0,0,my_srfScreen->getWidth(),my_srfScreen->getHeight());
my_srfScreen->SetClipRect(PG_Rect());
}
--- 235,239 ----
// glMatrixMode(GL_PROJECTION);
// glPopMatrix();
! // glViewport(0,0,my_srfScreen->GetWidth(),my_srfScreen->GetHeight());
my_srfScreen->SetClipRect(PG_Rect());
}
***************
*** 252,256 ****
temp_color.b = (my_color.b * tickstate)/40;
! temp_int = SDL_MapRGB(my_srfScreen->getScreen()->format, temp_color.r,
temp_color.g, temp_color.b);
my_srfScreen->FillRect(temp_rect, temp_int);
}
--- 252,256 ----
temp_color.b = (my_color.b * tickstate)/40;
! temp_int = my_srfScreen->MapRGB(temp_color.r, temp_color.g,
temp_color.b);
my_srfScreen->FillRect(temp_rect, temp_int);
}
Index: windowresize.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/test/windowresize.cpp,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** windowresize.cpp 26 Jun 2002 03:25:04 -0000 1.1.2.2
--- windowresize.cpp 30 Oct 2002 09:16:29 -0000 1.1.2.3
***************
*** 17,27 ****
/* Print out information about our surfaces */
screen = app.GetScreen();
! PG_LogMSG("Screen is at %d bits per
pixel",screen->getScreen()->format->BitsPerPixel);
! if ( (screen->getScreen()->flags & SDL_HWSURFACE) == SDL_HWSURFACE ) {
PG_LogMSG("Screen is in video memory");
} else {
PG_LogMSG("Screen is in system memory");
}
! if ( (screen->getScreen()->flags & SDL_DOUBLEBUF) == SDL_DOUBLEBUF ) {
PG_LogMSG("Screen has double-buffering enabled");
}
--- 17,27 ----
/* Print out information about our surfaces */
screen = app.GetScreen();
! PG_LogMSG("Screen is at %d bits per pixel",screen->GetDepth());
! if ( (screen->GetSDLFlags() & SDL_HWSURFACE) == SDL_HWSURFACE ) {
PG_LogMSG("Screen is in video memory");
} else {
PG_LogMSG("Screen is in system memory");
}
! if ( (screen->GetSDLFlags() & SDL_DOUBLEBUF) == SDL_DOUBLEBUF ) {
PG_LogMSG("Screen has double-buffering enabled");
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/test animation.cpp,1.2.2.4,1.2.2.5 dblbuffer.cpp,1.4.2.5,1.4.2.6 gltest.cpp,1.1.2.5,1.1.2.6 windowresize.cpp,1.1.2.2,1.1.2.3,
Teunis Peters <address@hidden> <=
- Prev by Date:
[paragui-cvs] CVS: paragui/src/physfs aclocal.m4,1.1.2.3,1.1.2.4 config.h.in,1.1.2.1,1.1.2.2
- Next by Date:
[paragui-cvs] CVS: paragui/src/font pgfont.cpp,1.3.2.4,1.3.2.5
- Previous by thread:
[paragui-cvs] CVS: paragui/src/physfs aclocal.m4,1.1.2.3,1.1.2.4 config.h.in,1.1.2.1,1.1.2.2
- Next by thread:
[paragui-cvs] CVS: paragui/src/font pgfont.cpp,1.3.2.4,1.3.2.5
- Index(es):