D3D9Max2DDriver bugs

Archives Forums/BlitzMax Bug Reports/D3D9Max2DDriver bugs

MindWorm(Posted 2009) [#1]
I just tested the new features of BlitzMax 1.35 and found a few bugs/problems with the D3D9Max2DDriver.

I'm programming a little raycaster thing at the moment and with D3D7Max2DDriver and GLMax2DDriver it looks like expected:



When I use D3D9Max2DDriver instead, it looks like this:



I'm loading 64x64 images in strips (64 image frames with width=1 and height=64), then scale them using setscale() to get the correct size in relation to the camera position. The above bug happens only with a low scale factor, so if you get closer and the scale factor increases, it doesn't occur.

I tried to write a short sample code that demonstrates this behaviour, but it doesn't even draw the image onto the screen when the D3D9Max2D driver is used, so I guess that grabimage causes problems under D3D9, too. Again, works without problems when using D3D7Max2D or GLMax2D.






My system: Athlon 64 3000+ (1 x 2GHz), 1,5 GB PC3200 DDR SDRAM, GeForce FX 5200 (128 MB), Microsoft Windows XP Professional SP2, DirectX 9.0c. Newest graphics driver installed one week ago.


Oh, and textures from the doom texture pack "Ogro" by FrançoisX Delmotte ;) *cough*


Ked(Posted 2009) [#2]
[offtopic]What Windows GUI are you using? I like it. :P[/offtopic]


xlsior(Posted 2009) [#3]
[offtopic]What Windows GUI are you using? I like it. :P[/offtopic]


The bottom window? Default Vista / Windows 7 Aero interface, it looks like


Ked(Posted 2009) [#4]
The bottom window? Default Vista / Windows 7 Aero interface, it looks like

His specs say he's using Windows XP.


MindWorm(Posted 2009) [#5]
Yep, it's a custom visual style for Windows XP called Luna Element Black: http://gelosea.deviantart.com/art/Luna-Element-v5-1-Black-57571128

Happy polishing :)


marksibly(Posted 2009) [#6]
Hi,

Ok, fixed the problem with GrabImage which involved grabbing image alpha.

However, you can still your demo to work by using SetBlend SOLIDBLEND with the grabbed image.

Either way, I couldn't get your glitches to happen. Can you try it with just a simple image zooming in/out?

D3D9 is actually less GrabImage friendly than D3D7, as it only allows very limited access to the back buffer.

However, it is more friendly when it comes to render-to-image which in the long run is a better way to go I think.


TaskMaster(Posted 2009) [#7]
I think the issue I am having with ifsoGUI is related to the GrabImage problem.

Mark, will the fix be out relatively soon, or can you drop us a snippet of code that fixes this one issue?

Thanks.


MindWorm(Posted 2009) [#8]
Hi,

I'm sorry that I haven't replied earlier, but there seems to be a an issue with my graphics driver (although it's the latest version).

I've tried again to write a sample code that provokes the glitches, but as I tested this code...



...I got a bluescreen and my computer restarted. Reproducable. o__O

It only happens when the MIPMAPPEDIMAGE flag is set (which I use in my raycaster code, too), so this COULD be the reason for those nasty glitches in my raycaster.
But as the bluescreen shows that there's a problem with N4_disp.dll, chances are good that everything could relate to my graphics drivers and not to MAX's D3D9 driver.

I've tried uninstalling the graphics driver in safe mode and reinstalling the newest one again, but it didn't change anything. I'll try other (older) drivers and let you know what happened.

Bye...


marksibly(Posted 2009) [#9]
Hi,

Actually, this probably my fault.

There's an option in d3d9 to automatically generate mipmaps, but it turns out it may not be supported on some hardware.

I'm surprised your nVidia card, although old-ish, doesn't support it, but it's probably safer if I do the mipmap generation instead of dx anyway.


TaskMaster(Posted 2009) [#10]
BlitzMax 1.35rc5 solves the issue I was having with ifsoGUI and DX9.

Thanks Mark.


MindWorm(Posted 2009) [#11]
Solved my problems, too. No more bluescreens and glitches :)

I'm glad that in the end it wasn't a problem with my graphics driver, I spent hours updating/trying drivers for my geforce, mainboard etc., haha :D

Thanks for the update and keep up the good work!

Bye!