Loadimage\DrawImage Bug in windows 7

Archives Forums/BlitzPlus Bug Reports/Loadimage\DrawImage Bug in windows 7

DjBigWorm(Posted 2010) [#1]

First off I know that blitzplus is "out dated" according to some folk. I think it works very well. I hope this bug can be looked at
and maybe fixed. The problem occurs in windows 7. Same Program works
just fine on windows xp. Both are 32 bit if that helps. I have an app I made to edit sprite animations, maps, and cut scenes. I would
go ahead and port it to blitzmax, but blitzmax misses some basics that blitz plus does with buffers. So this is where the problem begins. My app clears the background, draws the map layer, then tops it off with the gui. The gui is a fullscreen image, masked of course. The map you edit is in the middle of the gui. in 640x480,800x600 windowed mode the map drawn on screen right before the gui doesn't show up. Strange as that seems. When I change the resolution of the app to 1024x768 i works as expected. In fullscreen mode in any resolution mentioned above works fine. I thought maybe the setbuffer command was broken in windows 7 at first. I didn't draw the gui on top of the map and i could see the map being displayed just fine. Further looking into this I found that when I use the "LoadImage" command and set the flag to "4" scratch image. It worked in all above resolutions in windowed mode no problem. So my guess either the "Loadimage" or "DrawImage" commands don't like the lower window sizes in windows7. Another thing that makes the app work fine is to set the blitzplus driver to native drivers. Goes slower than direct draw, but worked as explected. I would post some code, but it is tied into a big app. If blitz support wants I can send the source code to them in hopes this can be fixed. And who knows maybe it is my programming skillz!:)

Thank you Blitz Support for great apps and Thanks to the coolest community around for their help in the Past/Future!

GaryV(Posted 2010) [#2]
Without seeing code or any potential bugs in your code...

BlitzPlus uses DirectDraw which is no longer supported by Vista/7, it runs under emulation. Have you tried making the images you are drawing in a power of 2 to conform to the new DX requirements?

To avoid any emulation problems, I would use the OpenGL driver or the Native Driver.

DjBigWorm(Posted 2010) [#3]
I didn't realize that vista/7 didn't use directdraw and was emulated.

What do you mean power of 2 for images?

Is there a way to have blitzplus use directx 7/9 etc..?

GaryV(Posted 2010) [#4]
What do you mean power of 2 for images?
Googled for a tutorial, perhaps this will help:


DirectX is not backwards compatible anymore. Backwards compatibility is now provided via emulation on Vista and 7. If you are running the default DX driver (which uses DirectDraw) on Vista and 7, at runtime the API calls are converted to the new equivalents and you are actually using "2D in 3D" whether you want to or not. Since you are now using 3D methods to run your game, you can (can, not always) run into issues with non-power of 2 images.

In my experience (yours may vary) OpenGL seems to be a lot more forgiving about non power of 2 images.

Is there a way to have blitzplus use directx 7/9 etc..?
Not unless you use a third-party engine. Even then, you will still be dealing with the power of 2 issue on Vista/7. DX7 would be emulated on Vista and 7 and DirectDraw died with DX7. DX8 introduced using 3D methods to emulate 2D, but DX8/9 remained backwards compatible so there was never an emulation issue to worry about. Now DX is not backwards compatible on Vista/7 and all old DX stuff is emulated (sometimes problematically).

DjBigWorm(Posted 2010) [#5]

Thank you for the informative Insite. The "Emulation" vista/7 seems
to make sence now that I know that. My program seems to be hit and miss with the mouse wheel also. Anyhow thank you for taking the time and sharing your knowledge with me/us.

Until next time!

GaryV(Posted 2010) [#6]
DjBigWorm: You might want to look at the DX9 based 2D engine (in DLL form) that Dabhand wrote. It works with B+ and may solve all of your problems.

DjBigWorm(Posted 2010) [#7]

I tried getting the dll and try it, I can't seem to get any link to work.
Do you have the latest version or a working link?

Thanks for the suggestion.

Kcarlino(Posted 2010) [#8]
It looks like these links on BlitzMonkeys have the DX9 Plus DLL but I haven't looked at the details yet myself.



DjBigWorm(Posted 2010) [#9]

Thank You I think this will do nicely:) Thank you for the reply.