[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-users] re: 1024 widgets
From: |
Keith Swyer |
Subject: |
[paragui-users] re: 1024 widgets |
Date: |
Wed, 14 Aug 2002 08:29:30 -0300 |
here's what i did to test it out.
int main(int argc, char* argv[]) {
char theme[20];
strcpy(theme, "simple");
// initial flags for screensurface
Uint32 flags = SDL_HWSURFACE;
int bpp = 0;
int resx = RESX, resy = RESY;
// construct the application object
PG_Application app;
if(!app.LoadTheme(theme)) {
printf("Unable to load theme \"%s\"", theme);
return -1;
}
if(!app.InitScreen(resx, resy, bpp, flags)){
printf("Resolution %dx%d not supported\n", resx, resy);
exit(-1);
}
int t = SDL_GetTicks();
PG_Widget parent(NULL, PG_Rect(20, 30, 30, 30));
PG_Widget *wlist[1024];
for (int i=0; i < 1024; i++)
wlist[i] = new PG_Widget(&parent, PG_Rect(0,0,10,10));
parent.Show();
PG_LogDBG("%d", SDL_GetTicks()-t);
app.SetEmergencyQuit(true);
app.Run();
return EXIT_SUCCESS;
}