How to determine screen depth?

Raab, Andreas Andreas.Raab at disney.com
Thu Mar 2 00:44:46 UTC 2000


Russel,

> Let me rephrase the minimum of what I am looking for:  a way to
> automatically change Squeak's <Display depth> to match the 
> depth of the display of the host OS.

What you're probably looking for is the equivalent of
DisplayScreen>>actualScreenSize (returning the size of the OS window) just
as DisplayScreen>>actualScreenDepth.

> >I'm nearly positive that you'd need to roll your own 
> >pluggable primitive to set the host screen's depth or size.
> >(Not only that, but doing this from an application is often 
> >frowned upon, even for applications with much
> >greater native OS access than Squeak.)

This certainly depends - I've never seen anyone frowning at games in this
respect. And for a 'player mode' this makes a lot of sense since you can
test out how things will look at certain display resolutions. In the end
it's always a question of what the application is doing and while it may not
be very well received for a 'programming environment' it's perfectly okay
for others.

> Most multimedia software that has an option to take over the 
> screen like Squeak either offers a "letterbox" mode, where eg 
> a 640 at 480 screen sits in the middle of a black expanse, or a 
> "fullscreen" mode where the host OS display is changed to match 
> the required 640 at 480.
> 
> Squeak can do the "letterbox" mode, but only by either (a) 
> shipping as an 8bit image (with resulting loss of display 
> quality) or (b) asking the user to switch to an 8bit depth 
> if necessary.  It can't do the "fullscreen" mode without getting 
> the user to switch their own host OS display settings before 
> running.

Right now this is true. I am, however, planning to put some effort in making
this work for playing with 3D hardware accelleration (in which case you may
have to switch to a lower resolution due to limited VRAM on the graphics
card). It's actually not very hard to do (at least on Win/Mac systems).

  Andreas





More information about the Squeak-dev mailing list