Sorry, the Forum is closed :(

Unfortunately, the forum is now closed.

Please read the following post for further details.

We apologize for the inconvenience.
The SharpDX team.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: [Toolkit] Drawuserprimitves

[Toolkit] Drawuserprimitves 1 year 4 months ago #1315


  • Posts:2
  • Arti's Avatar
  • Arti
  • Fresh Boarder
  • OFFLINE
Hi,

So i was porting some code from xna and as xna uses direct3d9 most of the draw calls are of drawuserprimitive so i was a bit confused on how to do this in a simple way in the toolkit.Should i just create local buffers from the vertices and then use the normal draw?

Also a question about the sampler state ,what is an easy way of setting it without using an effect?

Thanks.
The administrator has disabled public write access.

Re: [Toolkit] Drawuserprimitves 1 year 4 months ago #1320


  • Posts:843 Thank you received: 1
  • xoofx's Avatar
  • xoofx
  • Administrator
  • OFFLINE
Arti wrote:
Hi,
So i was porting some code from xna and as xna uses direct3d9 most of the draw calls are of drawuserprimitive so i was a bit confused on how to do this in a simple way in the toolkit.Should i just create local buffers from the vertices and then use the normal draw?
PrimitiveBatch<T> is a port of DirectTk and an equivalent of DrawUserPrimitive
Arti wrote:
Also a question about the sampler state ,what is an easy way of setting it without using an effect?
The recommended way is to use effect.Parameters["mySampler"].SetResource(samplerState); Behind the scene, it will bind the sampler for the appropriates stages (VS, PS...etc) and slot.
If you know exactly the stage and slot, you can directly use the low level D3D11 API ((DeviceContext)graphicsDevice).PixelShader.SetSampler(0, samplerState);
The administrator has disabled public write access.

Re: [Toolkit] Drawuserprimitves 1 year 4 months ago #1329


  • Posts:2
  • Arti's Avatar
  • Arti
  • Fresh Boarder
  • OFFLINE
Hi,

Thanks for the help ,just what i was looking for .Still a bit confused about the primitive batch ,but almost there thanks.
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 0.186 seconds