amiga.org
     
iconAll times are GMT -6. The time now is 02:31 AM. | Welcome to Forum, please register to access all of our features.

» Amiga.org » Operating System Specific Discussions » Amiga OS » Amiga OS -- Development » BitMap blues...

Amiga OS -- Development This particular forum deals with issues regarding development for all versions of AmigaOS.

Reply
 
Thread Tools Display Modes
Old 07-24-2003, 07:08 AM   #1
Karlos
Sockologist
Points: 48,752, Level: 100 Points: 48,752, Level: 100 Points: 48,752, Level: 100
Activity: 8% Activity: 8% Activity: 8%
 
Karlos's Avatar
 
Join Date: Nov 2002
Location: I solve practical problems...
Posts: 16,606
Blog Entries: 18
Default BitMap blues...

Hi all,

I have been doing some gfx coding lately and bumped into an old problem I originally thought was my own fault at the time but now I'm not sure...

I need to allocate chunky BitMaps, in video ram using a pixel format of my choice.

According to the docs, this is easy. And indeed it is - except for the fact that the pixel data ends up in fast ram which is pointless for hw rendering (eg using Warp3D).

I have found that, irrespective of the BMF_DISPLAYABLE flag or other AllocBitMap() parameters, the only way I can ensure that the bitmap data is created in VRam is to make the BitMap a friend of an existing one that is already there, eg a screen, for example.

That, however, also forces my BitMap to have the same pixel representation as the screen (a requirement for hw blitting between the two).

What I want is to just create a BitMap in the 15/16/24/32 bit depth of my choice, render to it (using warp3d) and then copy the pixel data back to system memory for saving.

It only works if I open a screen in the desired format and go from there. I don't particularly want to open a screen for this code since its just for a small CLI tool to manipulate images quickly based on some CLI parameters.

Specifically it is for fast, filtered resizing, dithered colour depth conversion, chromatic effects etc., all of which W3D excells at.

Any ideas?
__________________
OCA
This isn't SCSI... This is SATA!!!
I have CDO. It's like OCD except all the letters are in ascending order. The way they should be.
Core2 Quad Q9450 2.66GHz / X48T / 4GB DDR3 / nVidia GTX275 / Linux x64, AROS, Win64
A1XE 800MHz / 512MB / Radeon 9200 / OS4.1
A1200T BPPC 240MHz / 256MB / Permedia 2 / OS 3.1 - OS3.9, OS4
A1200T Apollo 1240 28MHz / 32MB / Mediator1200 / Voodoo 3000 / OS3.9
A1200D Apollo 1240 25MHz (ejector seat ROM edition) / 32MB
Karlos is offline   Reply With Quote
Old 07-24-2003, 04:17 PM   #2
Karlos
Sockologist
Points: 48,752, Level: 100 Points: 48,752, Level: 100 Points: 48,752, Level: 100
Activity: 8% Activity: 8% Activity: 8%
 
Karlos's Avatar
 
Join Date: Nov 2002
Location: I solve practical problems...
Posts: 16,606
Blog Entries: 18
Default Re: BitMap blues...

*bump*

;-)
__________________
OCA
This isn't SCSI... This is SATA!!!
I have CDO. It's like OCD except all the letters are in ascending order. The way they should be.
Core2 Quad Q9450 2.66GHz / X48T / 4GB DDR3 / nVidia GTX275 / Linux x64, AROS, Win64
A1XE 800MHz / 512MB / Radeon 9200 / OS4.1
A1200T BPPC 240MHz / 256MB / Permedia 2 / OS 3.1 - OS3.9, OS4
A1200T Apollo 1240 28MHz / 32MB / Mediator1200 / Voodoo 3000 / OS3.9
A1200D Apollo 1240 25MHz (ejector seat ROM edition) / 32MB
Karlos is offline   Reply With Quote
Old 07-25-2003, 05:20 AM   #3
Thomas
Kindred of Babble-on
Points: 13,942, Level: 76 Points: 13,942, Level: 76 Points: 13,942, Level: 76
Activity: 13% Activity: 13% Activity: 13%
 
Thomas's Avatar
 
Join Date: Jun 2002
Posts: 2,925
Default Re: BitMap blues...


Well, if Warp3D depends on special bitmap attributes, aren't there funcitons to allocate/deallocate such bitmaps in Warp3D ?

Bye,
Thomas
__________________
Email: thomas-rapp@web.de
Home: thomas-rapp.homepage.t-online.de/
Thomas is offline   Reply With Quote
Old 07-25-2003, 05:23 AM   #4
bloodline
Master Sock Abuser
Points: 37,161, Level: 100 Points: 37,161, Level: 100 Points: 37,161, Level: 100
Activity: 8% Activity: 8% Activity: 8%
 
bloodline's Avatar
 
Join Date: Mar 2002
Location: London, UK
Posts: 11,657
Blog Entries: 3
Default Re: BitMap blues...

can you just allocate the memory you need (where you work out the requirements)? Are there no flags that allow you to choose the Ram type?
__________________
My iPhone Game: Puny Humans -
http://itunes.apple.com/gb/app/puny-...362230281?mt=8
bloodline is offline   Reply With Quote
Old 07-25-2003, 05:26 PM   #5
Karlos
Sockologist
Points: 48,752, Level: 100 Points: 48,752, Level: 100 Points: 48,752, Level: 100
Activity: 8% Activity: 8% Activity: 8%
 
Karlos's Avatar
 
Join Date: Nov 2002
Location: I solve practical problems...
Posts: 16,606
Blog Entries: 18
Default Re: BitMap blues...

Hi,

Thomas - well, the only requirements warp3d has with regard the BitMap is that it is of a format supported by the 3D chip and that it is in video ram.

Since most people want to render to a display, the latter requriement is not an issue - a display bitmap has to be in video ram. As I said, making the BitMap a friend of the display's BitMap is the way to enforce this but that forces it to have the same pixel format as the display. Since I don't even want to have a display in this instance I'm stuck :-)

Matt - There aren't any malloc() type functions that operate in video ram. Exec's own allocators allow you to select chip ram, but that's no use here :-)

The only way to allocate video ram (that I know of) is to use a BitMap. However, that BitMap data can be in fast ram - the rtg software handles putting it into video ram when it needs to be. Once again, to get your BitMap data in video ram, it seems that you have to make it a friend of one that already is and that means you need a display and your choice of pixel format is overriden.

The BMF_DISPLAYABLE flag used with AllocBitMap() is supposed to allocate the data in a form useable by the display hardware but I always get it in fast ram...

To reiterate, I just want to be able to create a BitMap, in video ram, in a (compatible) pixel format of my choosing, without it having to be a friend of one already there.

This goes beyond warp3d, I need it for the Surface class in my C++ portability layer. This class is supposed to encapsulate a displayable surface that you can render to, blit etc.

So far, no joy, unless I open a display in my desired pixel format and use that, but that somewhat defeats the objective.
__________________
OCA
This isn't SCSI... This is SATA!!!
I have CDO. It's like OCD except all the letters are in ascending order. The way they should be.
Core2 Quad Q9450 2.66GHz / X48T / 4GB DDR3 / nVidia GTX275 / Linux x64, AROS, Win64
A1XE 800MHz / 512MB / Radeon 9200 / OS4.1
A1200T BPPC 240MHz / 256MB / Permedia 2 / OS 3.1 - OS3.9, OS4
A1200T Apollo 1240 28MHz / 32MB / Mediator1200 / Voodoo 3000 / OS3.9
A1200D Apollo 1240 25MHz (ejector seat ROM edition) / 32MB
Karlos is offline   Reply With Quote
Old 07-26-2003, 11:31 AM   #6
Karlos
Sockologist
Points: 48,752, Level: 100 Points: 48,752, Level: 100 Points: 48,752, Level: 100
Activity: 8% Activity: 8% Activity: 8%
 
Karlos's Avatar
 
Join Date: Nov 2002
Location: I solve practical problems...
Posts: 16,606
Blog Entries: 18
Default Re: BitMap blues...

Hi all,

Sorry for bumping this but I need to try and get this solved soonest ;-)
__________________
OCA
This isn't SCSI... This is SATA!!!
I have CDO. It's like OCD except all the letters are in ascending order. The way they should be.
Core2 Quad Q9450 2.66GHz / X48T / 4GB DDR3 / nVidia GTX275 / Linux x64, AROS, Win64
A1XE 800MHz / 512MB / Radeon 9200 / OS4.1
A1200T BPPC 240MHz / 256MB / Permedia 2 / OS 3.1 - OS3.9, OS4
A1200T Apollo 1240 28MHz / 32MB / Mediator1200 / Voodoo 3000 / OS3.9
A1200D Apollo 1240 25MHz (ejector seat ROM edition) / 32MB
Karlos is offline   Reply With Quote
Reply

Bookmarks

Tags
bitmap , blues

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any way to tell HEX value of a colour in a bitmap? ral-clan Amiga Software Issues and Discussion 6 03-21-2007 08:15 AM
Vector graphics vs. bitmap on the Ami Amiduffer General chat about Amiga topics 12 12-18-2006 11:51 PM
Converting Amiga Bitmap fonts xyth Amiga Software Issues and Discussion 0 02-02-2004 04:10 AM
Bitmap fonts Animagic Amiga Software Issues and Discussion 3 11-22-2003 09:01 AM
Bitmap Brothers MikeB Amiga Gaming 15 03-11-2003 07:30 AM