Jump to content

  • Log In with Google      Sign In   
  • Create Account


Rexxaw(Forgrim's mate)

Member Since 04 Feb 2011
Offline Last Active Dec 29 2012 11:20 AM

Topics I've Started

Does my shader code look alright?

10 December 2012 - 04:39 AM

[source lang="cpp"]cbuffer cbPerObject{ float4x4 gWorldViewProj;};Texture2D CubesTexture;SamplerState CubesTexSamplerState;/////////////////////////////struct VS_inputVPCT{ float3 Pos : POSITION; float4 Col : COLOUR; float2 Tex : TEXTURE;};struct VS_outputVPCT{ float4 Pos : SV_POSITION; float4 Col : COLOUR; float2 Tex : TEXTURE;};struct PS_outputVPCT{ float4 Col : COLOUR; float2 Tex : TEXTURE;};///////////////////////////////////////////////////////////////////////////////////VS_outputVPCT VSfuncVPCT(VS_inputVPCT input){ VS_outputVPCT output; output.Pos = mul(float4(input.Pos, 1.0f), gWorldViewProj); output.Col = input.Col; output.Tex = input.Tex; return output;}PS_outputVPCT PSfuncVPCT(VS_outputVPCT input) : SV_Target{ PS_outputVPCT output; output.Col = input.Col; output.Tex = CubesTexture.Sample(CubesTexSamplerState, input.Tex); return output;}///////////////////////////////////////////////////////////////[/source]




Thankyou for any assistance!

D3D11_CREATE_DEVICE_SINGLETHREADED , Should i?

19 April 2012 - 01:12 PM

I know nothing of threading. If i were to use this method, would it be safe? Or does it require careful design and coding to ensure that the app remains single -threaded?

Thanks.

Reynolds number effect on Lift Coefficient

12 September 2011 - 01:17 AM

Hi, so my question is, what effect does the reynolds number have on the lift coefficient (and anything else for that matter)?

I understand it's a measure of laminar vs turbulent airflow, and that it does effect the maximum lift coefficient. But i haven't found any information on how to incorporate it into an equation.
Any help much appreciated.
Thanks.

XNA Animations and Kilowatt

09 September 2011 - 04:10 AM

Hi im trying to get started with Kilowatt animation. And since i am fairly new to programming and xna, perhaps this can serve ultimately as a guide for noobs like me.


I follow the instructions to include the solutions of the pipeline and animation from kilowatt. No prob i can load my model through this new pipeline and it doesn't spit out any errors, nice :)

But i need to create an instance of AnimationInstance and also use the ModelDraw method, but how do i gain access to these classes? I try "using" but cannot find any reference to Kilowatt.

Any help appreciated, thankyou.

Object reference not set to an instance...

10 June 2011 - 05:01 AM

Hi im just trying to tidy up my code and place all the Vertex buffer stuff neatly in a class.


So everything is good up until i move the code over..





public void LoadBuffers(IndexBuffer iBuffer, int nIndices, VertexBuffer vBuffer, int nVertices, short[] indices,  GraphicsDevice device, VertexPositionNormalTexture[] vertices)
        {



            vBuffer = new VertexBuffer(device, typeof(VertexPositionNormalTexture), nVertices, BufferUsage.WriteOnly);
            iBuffer = new IndexBuffer(device, IndexElementSize.SixteenBits, nIndices, BufferUsage.WriteOnly);

            vBuffer.SetData<VertexPositionNormalTexture>(vertices);
            iBuffer.SetData<short>(indices);

            device.Indices = iBuffer;
            device.SetVertexBuffer(vBuffer);



So it refuses to work, saying object reference not set to an instance of an object.

Ive tried passing in already instanced buffers, but still no joy. All this code works fine placed in the game class, i just wanted to tidy it away in a nice class. Any tips appreciated.

I haven't taken any classes in programming, and it's bound to be a simple c# language stumbling block for me.

PARTNERS