Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


[SlimDX] Setting vertex shader constants


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
1 reply to this topic

#1 Johan Gustafsson   GDNet+   -  Reputation: 285

Like
0Likes
Like

Posted 08 September 2009 - 04:27 AM

Hi, I'm trying to set vertex shader constants in SlimDX, but doing so gives me "D3DERR_INVALIDCALL: Invalid call (-2005530516)". Here is my code:
Renderer.Device.VertexShader = shader.VertexShader;
Renderer.Device.PixelShader = shader.PixelShader;

shader.VertexShader.Function.ConstantTable.SetValue(Renderer.Device, new SlimDX.Direct3D9.EffectHandle("worldViewProj"), worldViewProjection);

Is there something else that I have to do?

Sponsor:

#2 Johan Gustafsson   GDNet+   -  Reputation: 285

Like
0Likes
Like

Posted 15 September 2009 - 12:23 AM

Turns out that there was something wrong with my shaders.
I had to do
float4x4 worldViewProj;
float4x4 world;

void main_vs(


instead of
void main_vs(
uniform float4x4 worldViewProj,
uniform float4x4 world,





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