Amiga.org

Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: Sidewinder on April 18, 2004, 07:46:12 AM

Title: RTG Programming
Post by: Sidewinder on April 18, 2004, 07:46:12 AM
I'm attempting to create a graphics program that will work with both AGA graphics modes and RTG systems like P96 and CGFX.  As it stands right now the program opens a window on the workbench screen (which is in a true color mode using P96).  It then uses WritePixel() to plot pixels with the color recieved by ObtainBestPenA().  Well, this doesn't really work that well.  In fact, all I get is black plotted on the screen.  

Does anyone have any examples or tips on how to code graphics so that they will work on both AGA and RTG systems?

Thanks.
Title: Re: RTG Programming
Post by: Thomas on April 18, 2004, 10:41:58 AM

Your method is correct, there must be something wrong in your program. You should run it on an AGA screen first or at least on a 8bit P96 screen. If it runs there, it will run on a truecolor screen either.

Here is a small example how to use many colors on a truecolor screen without wasting pens:
http://home.t-online.de/home/thomas-rapp/download/truecolors.lha

You could also use WriteRGBPixel() but this will only work on RTG screens.
Note that if you need RTG functions, you should always use CGX because CGX programs run on P96, too, while there is no P96 emulation for CGX, at least not an official one.

Bye,
Thomas