Jump to content

  • Log In with Google      Sign In   
  • Create Account

ankhd

Member Since 05 Nov 2006
Online Last Active Today, 12:54 AM

Posts I've Made

In Topic: How Does D3D10_APPEND_ALIGNED_ELEMENT Work

28 October 2014 - 11:08 PM

Hi there. And thanks to all wwho helped.

 

I think the error is in ID3DX10Mesh class it does not use the input element flag D3D10_APPEND_ALIGNED_ELEMENT.

 

evidence if you set this here input element discription


const D3D10_INPUT_ELEMENT_DESC TestLayout[3] =
 {
  
	{ "POSITION",		0, DXGI_FORMAT_R32G32B32_FLOAT,		0, 0,  D3D10_INPUT_PER_VERTEX_DATA, 0 },
	{ "NORMAL",		0, DXGI_FORMAT_R32G32B32_FLOAT,		0, D3D10_APPEND_ALIGNED_ELEMENT, D3D10_INPUT_PER_VERTEX_DATA, 0 },
	{ "TEXCOORD",		0,  DXGI_FORMAT_R32G32_FLOAT,		0, D3D10_APPEND_ALIGNED_ELEMENT, D3D10_INPUT_PER_VERTEX_DATA, 0 },
	
  };

When you call the Mesh class drewsubset(0);

 

Pix's display window reports a stride of 12 for the current input element

 

like here

 

PixInput.jpg?psid=1


In Topic: Has this game, or something similar, already been made?

27 October 2014 - 10:17 PM

Just start programming allready. The time your halfway through learing and creating this game, the probability is that someone some where has allready finnished it.

Even for ideas you thought where you own.(like star craft 2 some of there things look like mine How, I had mine done before theres).

 

Or wear a foil hat at all times.


In Topic: How Does D3D10_APPEND_ALIGNED_ELEMENT Work

27 October 2014 - 12:42 AM

No the problem is with D3D10_APPEND_ALIGNED_ELEMENT this is probely padding to a 8 bit alignment and the pos float 3 drops a float.

 

I't doesn't render. doesn't matter is I use  //#pragma pack(push, 16) nor set the compiler to do the padding in properties settings

 

if I use D3D10_APPEND_ALIGNED_ELEMENT for the first element the quad looks more like a quad but not correctly rendered.

 

 

I don't need to use this value but the doc say it works and I'm just trying things out any way.

 

 

How would the vertex shaders input be. Should it have padding but when you do that the layout need extra members and semantics then you get the same problem

 

I may try again tomorrow to look into it more maybe I just let this one be.

 

Not going to use boost now people here saying its slow to read data in from file(I'll leave it for later  I have it downloaded and read the docs it looks like it has some good stuff in there).

 

now I'm going to smash some coppers in need for speed online yeah.


In Topic: How Does D3D10_APPEND_ALIGNED_ELEMENT Work

26 October 2014 - 03:02 PM

I read in the file then that data is used to load and set up the menu and in that file it has the mesh name to load.

It's the last part of my code base that could interfer with memory.

In Topic: How Does D3D10_APPEND_ALIGNED_ELEMENT Work

26 October 2014 - 05:22 AM

Would the structure packing on visual c++ express 8 be the same as on cv ++ 10.

Because I may have done something crazy like writefile sizeof(class) to file and packing rule may be wrong.

Apparently I load them file first.

I'm going to look into boost serialization and rewrite my menu class and see what happens.

PARTNERS