[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Bit-Depth and Graphics stuff....
On Wed, Jul 7, 2010 at 8:29 PM, Peter Persson <pep.fishmoose@gmail.com> wrote:
>
> 7 jul 2010 kl. 08.20 skrev Jo Even Skarstein:
>> You are both wrong and right. The VDI "pens" (palette) is global in colour-index mode (palette mode). In truecolour modes it's per application.
>
> Ah, I see. While digging in the TOS 4 VDI sources, I got the impression that they're global too (stored in the Line A table). It would make a lot more sense if they're not global though..
>
>> And it's OK to change the palette even in palette mode, as long as the first 16 colours are not touched.
>
> That's a matter of definition. It will look like crap if you're using 256 colour icons, 256 colour textures or a 256 colour background.
>
> -- PeP
>
>
You (as a programmer) need to respect the users palette settings,
unless you modify then restore.
The .pal that currently comes with Taskbar is the same as most "nvdi"
or "Jinnee" palettes. I have even checked the alternates, and they
where in fact the same. There was only one other common palette, and
that used the colorset as defined by Atari, which did not give enough
of "certain" colors, hence the use of the "nvdi" palette.
the VDI has "color-to-index" (or maybe thats in XaAES) and the use of
rgb(1000,1000,1000) allow color creation irrelavent of pixel support
(which is one of the main reasons its was done that way).
for pixel detect, check out the XaAES source. it is VERY simple, and
XaAES also provides conversion routines (I dont think anyone would
mind you using them)
The other alternative would be to start using Windom2, as it
impliments a "no need to know" set of functions that are quite
flexible, enough to run the same app on mono->32bit without any
specific app code (the library deals with it, and can be queried),
there is also an SDL implimentation for Windom too (this is used by
zView, and a couple of others, so it works).
One of Windoms bonus is being able to do (res independent) fullscreen as well..
Hope I have not repeated stuff already posted here (I'm only halfway
thru the thread)
I would quote the XaAES source, but its been a while. I do know it was
easy to find, and easy to follow. You might also try some other grafix
apps source which is available atm (open source now too)
Cheers
Paul