mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-08 00:59:44 +00:00
DX11: Introduce a D3DBlob class.
Advantages: - easier to use - drops our dependence on d3d10.lib, without depending on the June 2010 DX SDK - makes finding unreleased buffers easier - possibly more ;P git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5728 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
b63e15e412
commit
4f339ebc82
11 changed files with 181 additions and 72 deletions
|
@ -206,7 +206,7 @@ int CD3DFont::Init()
|
|||
m_pshader = D3D::CompileAndCreatePixelShader(fontpixshader, sizeof(fontpixshader));
|
||||
if (m_pshader == NULL) PanicAlert("Failed to create pixel shader, %s %d\n", __FILE__, __LINE__);
|
||||
|
||||
ID3D10Blob* vsbytecode;
|
||||
D3DBlob* vsbytecode;
|
||||
D3D::CompileVertexShader(fontvertshader, sizeof(fontvertshader), &vsbytecode);
|
||||
if (vsbytecode == NULL) PanicAlert("Failed to compile vertex shader, %s %d\n", __FILE__, __LINE__);
|
||||
m_vshader = D3D::CreateVertexShaderFromByteCode(vsbytecode);
|
||||
|
@ -218,7 +218,7 @@ int CD3DFont::Init()
|
|||
{ "COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 28, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
};
|
||||
hr = D3D::device->CreateInputLayout(desc, 3, vsbytecode->GetBufferPointer(), vsbytecode->GetBufferSize(), &m_InputLayout);
|
||||
hr = D3D::device->CreateInputLayout(desc, 3, vsbytecode->Data(), vsbytecode->Size(), &m_InputLayout);
|
||||
if (FAILED(hr)) PanicAlert("Failed to create input layout, %s %d\n", __FILE__, __LINE__);
|
||||
vsbytecode->Release();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue