mirror of
https://github.com/servo/servo.git
synced 2025-08-27 08:08:19 +01:00
Add new hololens code (winrt + D3D immersive mode example)
This commit is contained in:
parent
13872eb254
commit
24d2213780
51 changed files with 4691 additions and 27 deletions
20
support/hololens/ServoApp/Content/ShaderStructures.h
Normal file
20
support/hololens/ServoApp/Content/ShaderStructures.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
#pragma once
|
||||
|
||||
namespace Immersive {
|
||||
// Constant buffer used to send hologram position transform to the shader
|
||||
// pipeline.
|
||||
struct ModelConstantBuffer {
|
||||
DirectX::XMFLOAT4X4 model;
|
||||
};
|
||||
|
||||
// Assert that the constant buffer remains 16-byte aligned (best practice).
|
||||
static_assert((sizeof(ModelConstantBuffer) % (sizeof(float) * 4)) == 0,
|
||||
"Model constant buffer size must be 16-byte aligned (16 bytes is "
|
||||
"the length of four floats).");
|
||||
|
||||
// Used to send per-vertex data to the vertex shader.
|
||||
struct VertexPositionColor {
|
||||
DirectX::XMFLOAT3 pos;
|
||||
DirectX::XMFLOAT3 color;
|
||||
};
|
||||
} // namespace Immersive
|
Loading…
Add table
Add a link
Reference in a new issue