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.

Dark GDK / dbSprite, dbPasteImage driving me NUTS

Author
Message
draknir_
18
Years of Service
User Offline
Joined: 19th Oct 2006
Location: Netherlands
Posted: 28th Apr 2008 01:48 Edited at: 28th Apr 2008 01:50
Man, im really frustrated right now, and I recently read some article about how frustration causes your heartbeart to bounce up down irregularly, so now Im frustrated about how thats feeling

Im trying to get an icon image Ive loaded to show up on the screen, and its JUST NOT WORKING.

dbSprite, dbPasteImage both simply refuse to show me my friggin bitmap.

heres the relevant code:

loading




its not some stupid X,Y problem, ive tried all over the screen, it cant be some set current bitmap problem ive tried that, ive tried placing the command in different functions, in the main loop, but no matter what i do, it doesnt want to draw my image.
draknir_
18
Years of Service
User Offline
Joined: 19th Oct 2006
Location: Netherlands
Posted: 29th Apr 2008 19:03
any help here? bump
tobi453
19
Years of Service
User Offline
Joined: 28th Apr 2005
Location:
Posted: 29th Apr 2008 19:19 Edited at: 30th Apr 2008 18:39
Have you checked that the image exists? Check before dbPasteImage().

or try to comment out more and more code and look if commenting out code solves the problem

and provide a fully functional code snippet that illustrates the problem.

FINAL VERSION RELEASED!!!!
Ghthor
16
Years of Service
User Offline
Joined: 5th Apr 2008
Location:
Posted: 2nd May 2008 09:26 Edited at: 2nd May 2008 09:27
Is sys_findfreeimage() tested to work correctly?

try using fullpath in dbMedia(); I dunno I haven't used that command yet.

Taco Justice
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 2nd May 2008 16:39
You try making a new project that JUST does NATIVE calls to DarkGDK to "mimic" you issue yet? That might help narrow it down.

For my GUI I'm using a different approach, not necessarily the fastest, but it seems to work. I have a class that utilizes a memblock (in image format.. basically, Width, Height, Depth, then the pixel data in cols,row format. Its the format you get when you call dbMakeMemblockFromImage.

Basically, I do all my drawing DIRECTLY into this Memblock, and then I Make an Image from it.. dbMakeImageFromMemblock(?,?).

That way I can avoid the pasting stuff.. and bit map "ripping" and I can use the image for sprite, plain, and even a texture...

draknir_
18
Years of Service
User Offline
Joined: 19th Oct 2006
Location: Netherlands
Posted: 5th May 2008 23:51
I finally (!!!) found out what was causing this, I was loading the media, then calling a function to change the display resolution, and then trying to draw the image. I fixed it by changing the resolution before loading the media, that fixed the problem. I dont understand why I cant change res after loading my images, so Im going to write up some example code to show the problem and then submit it to bug reports.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 6th May 2008 01:11
not a bug Sorry that bit you though.

Its my understanding that when the DirectX "Surface" gets destroyed, so does all the media.... Changing resolutions destroys current surface and makes a new one... hence the tiny lag.. alot happens.... not like your coding to the video card your coding to an API that controls EVERYTHING coming and going to card... ahh the old days when such a task just meant repainting the screen.

draknir_
18
Years of Service
User Offline
Joined: 19th Oct 2006
Location: Netherlands
Posted: 6th May 2008 02:36
wow, thats annoying.. that means you have to reload media everytime you want to change the display resolution!? I dont have much understanding of the way DirectX works, but why would it store media on the same 'surface' as the display :X
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 6th May 2008 03:17
Quote: "I dont have much understanding of the way DirectX works, but why would it store media on the same 'surface' as the display :X"


I'm just beginning to look at Direct X but from what I've seen seen, images are stored exclusively in system ram. However, since other surfaces may be stored in video ram and, of course, the vertex information necessary even for flat sprites, when you change the screen resolution the other information may have to be tossed to make way for screen information or to reclaim space if resolution is reduced.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
draknir_
18
Years of Service
User Offline
Joined: 19th Oct 2006
Location: Netherlands
Posted: 6th May 2008 04:38
hmm.. i suppose it might be an optimization thing then. Just one of those quirks you have to know, cause this problem was driving me insane hehe

Login to post a reply

Server time is: 2024-11-20 09:40:29
Your offset time is: 2024-11-20 09:40:29