windows phone 8 - Do I have to implement my own matrix stack in a WP8 Direct3D application? -


i use matrix stack keep track of transforms in hierarchical model. bummer is, appears there no built-in matrix stack class can use this. direct3d templates keep track of model, view, , projection matrix , passes vertex shader.

renderer making constant buffer:

cd3d11_buffer_desc constantbufferdesc(sizeof(modelviewprojectionconstantbuffer), d3d11_bind_constant_buffer); dx::throwiffailed(     m_d3ddevice->createbuffer(     &constantbufferdesc,     nullptr,     &m_constantbuffer)     ); 

vertex shader transforming each vertex:

cbuffer modelviewprojectionconstantbuffer : register(b0) {     matrix model;     matrix view;     matrix projection; };  ... // transform vertex position projected space. pos = mul(pos, model); pos = mul(pos, view); pos = mul(pos, projection); output.pos = pos; ... 

i have spent time looking built in matrix stack class wouldn't have reinvent wheel, promising lead got, the id3dxmatrixstack, doesn't appear accessible in wp8 direct3d app.

so missing or need write own?

you need write own. id3dxmatrixstack interface went out direct3d10.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -