Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!


Mesh.CreateText fails with E_INVALIDARG. Mesh.CreateSphere works. (SOLVED)


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 brettfo   Members   -  Reputation: 106

Like
0Likes
Like

Posted 30 May 2012 - 02:22 PM

Long story short I'm trying to create a mesh object for a string using Mesh.CreateText() but it is failing with "E_INVALIDARG: An invalid parameter was passed to the returning function (-2147024809)". I am getting proper behavior with Mesh.CreateSphere(), etc. and can even display the resultant mesh so I don't think it's an issue with how I'm using SlimDX directly.

More details about my setup:
Win7 x64.
VS 2010 Ultimate.
.NET 4.0 app compiling/running as x86.
Jan 2012 version of SlimDX (x86 version referenced).
WPF app using the D3D9 SlimDX WPF host sample.

My exact method call (it doesn't matter where I call this, same result):
var f = System.Drawing.SystemFonts.DefaultFont;
var m = Mesh.CreateText(Device, f, "foo", 0.0f, 0.0f); // different deviation/extrusion values don't work, either

Enabling the Debug D3D9 runtime only shows the first chance Direct3D9Exception getting thrown and I looked through the output of PIX but didn't see anything that caught my eye.

I'm not very familiar with D3D and I'm sure I'm lacking some helpful information, but I'll be happy to add any required details.

Edit: Updating title to indicate problem solved. See conversation below for the solution.

Sponsor:

#2 Mike.Popoloski   Crossbones+   -  Reputation: 2923

Like
0Likes
Like

Posted 30 May 2012 - 07:45 PM

Even after you've enabled the debug runtimes, you need to enable "unmanaged debugging" from within the VS IDE in order to see output messages. Have you done that? E_INVALIDARG is almost always an indicator that there's some other information to be had.
Mike Popoloski | Journal | SlimDX

#3 brettfo   Members   -  Reputation: 106

Like
0Likes
Like

Posted 30 May 2012 - 08:18 PM

I have native debugging enabled both for my executable and for the assembly that contains my 3D code but still nothing. I've attached the complete contents of my debug window if it helps. The call to Mesh.CreateText() only added the final line to the output window.

Attached Files



#4 Mike.Popoloski   Crossbones+   -  Reputation: 2923

Like
1Likes
Like

Posted 31 May 2012 - 08:02 AM

Are you by any chance using Direct3D9Ex instead of the traditional version? There are a few sources that seem to indicate that this particular function might be broken under Ex.
Mike Popoloski | Journal | SlimDX

#5 brettfo   Members   -  Reputation: 106

Like
0Likes
Like

Posted 31 May 2012 - 11:50 AM

Indeed I was using Direct3D9Ex instead of the regular one. Forcing the regular one to be used has fixed my problem, thank you!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS