|
Register or have you forgotten your password?
|
|
|
| Amiga OS -- Development This particular forum deals with issues regarding development for all versions of AmigaOS. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | ||||||||
|
Sockologist
![]()
|
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 |
||||||||
|
|
|
|
|
#2 | ||||||||
|
Sockologist
![]()
|
*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 |
||||||||
|
|
|
|
|
#3 | ||||||||
|
Kindred of Babble-on
![]()
Join Date: Jun 2002
Posts: 2,925
|
Well, if Warp3D depends on special bitmap attributes, aren't there funcitons to allocate/deallocate such bitmaps in Warp3D ? Bye, Thomas |
||||||||
|
|
|
|
|
#4 | ||||||||
|
Master Sock Abuser
|
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 |
||||||||
|
|
|
|
|
#5 | ||||||||
|
Sockologist
![]()
|
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 |
||||||||
|
|
|
|
|
#6 | ||||||||
|
Sockologist
![]()
|
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 |
||||||||
|
|
|
![]() |
| Bookmarks |
| Tags |
| bitmap , blues |
| Thread Tools | |
| Display Modes | |
|
|
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 |