Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / A quickie image question

Author
Message
Easily Confused
23
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 2nd Nov 2003 17:43
Just a quick question, why can't we draw directly onto images?
Is it because they are stored or structured in a different way to bitmaps?

Yes I know there are ways by using memblocks, but I was thinking of less fiddly ways.

Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 2nd Nov 2003 17:56
Well, apart from there being no commands for it ...


The least fiddly way is to paste your image to a bitmap, do your drawing there, and then grab the image again.


Images are stored as a series of DirectX surfaces (bitmaps) that are generated by the DirectX system (for each mipmap level).

Every time you draw to the most detailed surface, all of the mipmap levels will need to be regenerated. This is why GET IMAGE seems so slow.,

I have got a very basic TPC DLL for image manipulation, and I have been thinking about the best way to do this efficiently and easily. If enough people want this functionality, I can start working on it again.
Easily Confused
23
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 2nd Nov 2003 18:18
That's the thing you see, Get Image being slow.

I thought if you could do something like this:

Create Image 1,100,100 : ` create a blank image
Set Output To Image 1
Line 10,10,90,90

...it would be alot easier than the memblock way.

If combined with a sprite, drawing directly to the image would automaticaly update the look of the sprite, so things like windows, dialog boxes and menus would be FAR easier to make, eliminating the repeated use of Get Image every time you want to redraw the image.

So why not cut out the middle man?

Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.
HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 2nd Nov 2003 18:22
One thing I would suggest, EC, is that if you decide to ultimately do it that way, do as much as possible at the beginning of your program. This way you have no sudden load time in the middle of the game, except maybe before levels (or however you plan to do your game). Oh yeah...make a snazzy loading screen to go with it, lol.

Team EOD :: Programmer/Storyboard Assistant

Login to post a reply

Server time is: 2026-07-26 13:02:13
Your offset time is: 2026-07-26 13:02:13