[comp.sys.amiga.programmer] depth changing

janjaap@gem.stack.urc.tue.nl (Janjaap van Velthooven) (02/06/91)

I receved a request from a certain friend, who can only read but not
post news, to post a certain message. the message follows:

Begin message ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

I am working on a fast fractal program which is programmed following the
guidelines issued by Commodore-Amiga. For greater speed, I'd want to decrease
the number of bitplanes displayed during calculation.
 I tried it by changing the Depth field of the BitMap structure in the Screen
structure to 4 (or 2 in HiRes mode), then call MakeScreen and RethinkDisplay.
This works all fine, except that the program draws in 4 (or 2) bitplanes,
so the picture contains just 16 (or 4) colors.

I couldn't find it in the ROM Kernel Reference Manuals (I think C-A doesn't
like these tricks), so could anyone help me with this ?

Please don't flame me if I posted this wrong or done anything else to offend
you, it's my very first posting.

                                  Thanx !

,--, 
|  |     |                  \     s90406225@hsepm1.hse.nl
+--',--, +-  ,--, +---------->    peter@amice1.stack.urc.tue.nl } won't be for
|   +--' |   +--' |         /     peter@amice2.stack.urc.tue.nl } very long.
`   `--' `-' `--' `

End message ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

I refuse to accept any responsibility for the contents and the effect of
the included message.

---------------------------------------------------------------------------
|   |\  /|\  |   |\  |\    janjaap@stack.urc.tue.nl
|\  | |  |   |\  |\| |/    +-----------------------------------------------
|\\ | |  |   |\\ | | |     | PAGEFAULT: Wait for wisdom some time.....
---------------------------------------------------------------------------

markv@kuhub.cc.ukans.edu (02/06/91)

>  I tried it by changing the Depth field of the BitMap structure in the Screen
> structure to 4 (or 2 in HiRes mode), then call MakeScreen and RethinkDisplay.
> This works all fine, except that the program draws in 4 (or 2) bitplanes,
> so the picture contains just 16 (or 4) colors.

Try creating a duplicate BitMap (and RastPort if needed) for the
BitPlanes, then call MakeScreen() etc.  Use the Duplicate Bitmap and
Rastport with the real number of bitplanes for rendering,  when done,
swap things back.

If you really want to free up cycles, call OFF_DISPLAY/ON_DISPLAY and
shut off screen DMA completly.  You can let the user know time if
passing by playing with the pointer image (DISPLAY doesn't effect
sprites which have their own DMA).

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mark Gooderum			Only...		\    Good Cheer !!!
Academic Computing Services	       ///	  \___________________________
University of Kansas		     ///  /|         __    _
Bix:	  mgooderum	      \\\  ///  /__| |\/| | | _   /_\  makes it
Bitnet:   MARKV@UKANVAX		\/\/  /    | |  | | |__| /   \ possible...
Internet: markv@kuhub.cc.ukans.edu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

dac@prolix.ccadfa.oz.au (Andrew Clayton) (02/06/91)

In article <146@gem.stack.urc.tue.nl>, Janjaap van Velthooven writes:

> I receved a request from a certain friend, who can only read but not
> post news, to post a certain message. the message follows:
> 
> Begin message ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 
> guidelines issued by Commodore-Amiga. For greater speed, I'd want to decrease
> the number of bitplanes displayed during calculation.

Open up a new 'screen' in front of the 'many bit plane one', that is, in
itself, only 1 bit plane deep. (Or activate a screen blanker, like POPCLI,
which will do that for ya! :-)

> |   |\  /|\  |   |\  |\    janjaap@stack.urc.tue.nl

Dac
--
 _l _  _   // Andrew Clayton. Canberra, Australia.         I Post  .
(_](_l(_ \X/  ccadfa.cc.adfa.oz.au!prolix!dac@munnari.OZ.AU       . .  I am.
--------------Phone +61 6 285 2537 (+10GMT) // I cannot currently send email.