[.net] Draw2D with managed sprites

Started by
4 comments, last by Drazgal 19 years, 8 months ago
In normal mode this works fine. However I cannot for the life of me get this working in when run with the debugger. No exceptions are thrown, just no image apears. One thing I find is that I get the message: D3D9 Helper: Enhanced D3DDebugging disabled; Application was not compiled with D3D_DEBUG_INFO even though I define D3D_DEBUG_INFO in the project settings and at the top of my files. Anyone else had this problem?
Advertisement
You want to do 2d by 3d? that's overkill...
microsoft has a newer verion of directdraw i'd like to call (you guessed it ) managed directdraw.

there had been a lot of changes with it like the difficulty of directly accessing the contents of a surface and the simplicity of loading image file of any type.

just how advanced do you want your graphics engine to be?
if you want special lighting effects and whatnot, stick to directgraphics(aka: direct3d8) if you want true 2d performance, easy access to image memory, and speed, stick to managed directdraw or for the direct memory access use directdraw 7 by means of dxvblib , an old com library meant for visual basic 5 and above.
(then again I'm one of the few who chose the simplest path and chose visual basic.net not c++)
I don't think 2D by 3D is overkill at all. It's just as simple as DirectDraw.

Are you getting DX debug information? If not, you may want to get your debug spew, pump up your Direct3D settings to max and run dbmon.exe at the same time. If it's not displaying in debug mode, I think there's a good chance some debug information is being created.

I have had things run correctly in "normal mode" but not "debug" mode. Debug mode sometimes helps you fix problems in your application by *not* working when something is wrong (that way you know there's a problem). In the regular mode, it will sometimes gloss over or ignore problem areas (which, obviously, you do NOT want when designing software).
Co-creator of Star Bandits -- a graphical Science Fiction multiplayer online game, in the style of "Trade Wars'.
Thanks for the replies.

I also wondered if it was because something was going wrong, the annoying thing is that the billboarded sprites work great with the current setup, its just when I coworker desided to try for an interface we noticed this problem.

What really gets me confused is that the none managed version works fine with similar setup once again.

@machine_gun_man using a none c# approach isnt viable for this project as the other three major components are written in C++ and C# although Im not actually working on this project I have been assured that getting the dlls working together has been hell and nobody wants to add another language to the mix :) (there was a breakdown in communication over which langauge was being used).
Are you using the "sprite" interface provided with Direct3D? One thing that caused me problems in the past with the sprite interface is that sprites (even 2D sprites called by Draw2D()) are still affected by the world matrix. So, right before you call sprite.End() or sprite.Flush() make sure to set the world transform back to the identity.

I also had a problem before with quads (NOT using the Sprite interface) where I had forgotten to set Device.VertexFormat to CustomVertex.TransformedTexturedNormal... it still worked correctly in non-debug mode but it crapped out in debug mode.
Co-creator of Star Bandits -- a graphical Science Fiction multiplayer online game, in the style of "Trade Wars'.
Hmmm, I first thought that it might have been a project matrix problem, never occured to me that Draw2D would use the world matrix. Ill try that first thing tomorrow.

Thanks!!

This topic is closed to new replies.

Advertisement