/[projectaxis]/projectaxis/projectAxis/src/visual/renderman.cpp
ViewVC logotype

Diff of /projectaxis/projectAxis/src/visual/renderman.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by vovansim, Sat Sep 20 03:34:06 2003 UTC revision 1.8 by vovansim, Sun Sep 21 02:58:24 2003 UTC
# Line 31  renderman.cpp Line 31  renderman.cpp
31  #include "../axis/axis.h"  #include "../axis/axis.h"
32    
33    
34  RenderMan::RenderMan(int x, int y, bool fullscreen) {  RenderMan::RenderMan(int x, int y, bool fullscreen, Uint8 colorDepth) {
35    
36          // include ourselves in the pointerhub for everyone else to use          // include ourselves in the pointerhub for everyone else to use
37          PointerHub::SetRenderMan(this);          PointerHub::SetRenderMan(this);
# Line 39  RenderMan::RenderMan(int x, int y, bool Line 39  RenderMan::RenderMan(int x, int y, bool
39          // set screen dims for future reference          // set screen dims for future reference
40          XRES = x;          XRES = x;
41          YRES = y;          YRES = y;
42            color_depth = colorDepth;
43          tile_size = 32; // default to 32          tile_size = 32; // default to 32
44    
45          // every ParaGUI application need an application-object          // every ParaGUI application need an application-object
# Line 65  RenderMan::RenderMan(int x, int y, bool Line 66  RenderMan::RenderMan(int x, int y, bool
66          // 0 - use screen bitdepth          // 0 - use screen bitdepth
67          // SDL_SWSURFACE - PG_ option to generate surface in system memory          // SDL_SWSURFACE - PG_ option to generate surface in system memory
68          if (fullscreen == 0) {          if (fullscreen == 0) {
69                  app->InitScreen(XRES, YRES, 16, SDL_SWSURFACE);                  app->InitScreen(XRES, YRES, color_depth, SDL_SWSURFACE);
70                  }                  }
71          else {          else {
72                  app->InitScreen(XRES, YRES, 16, SDL_SWSURFACE | SDL_FULLSCREEN);                  app->InitScreen(XRES, YRES, color_depth, SDL_SWSURFACE | SDL_FULLSCREEN);
73                  }                  }
74    
75            //If we wanted to detect color depth automatically, have to do so here:
76            if(color_depth == 0) {
77                    color_depth = app->GetScreen()->format->BitsPerPixel;
78            }
79    
80          // the master widget - every other widget is a child of this          // the master widget - every other widget is a child of this
81          master_widget = new PG_Widget(NULL, PG_Rect(0,0,XRES,YRES));          master_widget = new PG_Widget(NULL, PG_Rect(0,0,XRES,YRES));
82          master_widget->Show();          master_widget->Show();

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26