CreateVertexBuffer() [FIXED]

Started by
11 comments, last by MrDoomMaster 18 years, 9 months ago
Quote:Original post by S1CA
Quote:Original post by MrDoomMaster
Well first of all, I don't even know what the Debug Runtimes are, much less how to use them. I've always based error checking on return values, nothing more.
...
Yet, in the DirectX documentation, the only 'reason' listed for failure of DrawPrimitive() is D3DERR_INVALIDCALL, which is absolutely *NO* help at all.


If a Direct3D function returns an error or is the slightest bit unhappy about something, the debug runtime will tell you *why* its unhappy. Here's some information on how to enable the debug runtimes (they're invaluable!):

http://nexe.gamedev.net/directKnowledge/default.asp?p=Debugging


Quote:I suspect submitting a NULL texture pointer to IDirect3DDevice9::SetTexture() may be the source of the problem. Can anyone confirm this?


NULL is actually a valid value for IDirect3DDevice9::SetTexture(), it simply unsets the currently set texture for that texture stage and decrements its reference count (the SetTexture() call with a non-NULL texture pointer increments the reference count for that texture).


By modifying my Direct3D to Debug version instead of retail, does this affect games I have installed? I don't want my video games slowing down because of this.
Advertisement
Quote:Original post by MrDoomMaster
By modifying my Direct3D to Debug version instead of retail, does this affect games I have installed? I don't want my video games slowing down because of this.


You can switch between the debug and retail runtime any time you want using the DirectX control panel applet. The retail runtime is the same as the end user runtime, i.e. fast with the games you have installed, and the debug runtime is slower, but provides lots of debugging assistance.

So when you want to play a game, you open the control panel and click the "Use Retail Version of Direct3D" button; and when you want to do some development work you open the control panel and click the "Use Debug Version of Direct3D" button - you can switch between them in 2 seconds, no installation/uninstallation to worry about (when the debug runtime is installed, it also installs the retail runtime so you can switch between them at will).

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

Guys I'm so retarded. I just figured out the problem:

I wasn't calling the function between scene's!! You have to enable the scene first, and then do all of your blittering.

Sigh.

Thank you everyone for all of your help. At least I know how to debug my applications now!

[Edited by - MrDoomMaster on July 30, 2005 11:32:03 PM]

This topic is closed to new replies.

Advertisement