24 if (vbuffer && vshader)
35 D3D11_INPUT_ELEMENT_DESC& element =
mElements[i];
37 element.SemanticIndex = unit;
38 element.Format =
static_cast<DXGI_FORMAT
>(
type);
39 element.InputSlot = 0;
40 element.AlignedByteOffset =
offset;
41 element.InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
42 element.InstanceDataStepRate = 0;
45 std::vector<unsigned char>
const& compiledCode =
47 HRESULT hr = device->CreateInputLayout(
mElements, (
UINT)mNumElements,
48 &compiledCode[0], compiledCode.size(), &
mLayout);
53 LogError(
"Invalid inputs to DX11InputLayout constructor.");
61 context->IASetInputLayout(
mLayout);
70 context->IASetInputLayout(
nullptr);
#define CHECK_HR_RETURN_NONE(msg)
HRESULT SetPrivateName(ID3D11DeviceChild *object, std::string const &name)
GLuint const GLchar * name
ULONG FinalRelease(T *&object)
GLsizei const GLchar *const * string
#define LogError(message)
VertexFormat const & GetFormat() const
GLint GLint GLsizei GLint GLenum format
typedef UINT(WINAPI *PFNWGLGETGPUIDSAMDPROC)(UINT maxCount
std::vector< unsigned char > const & GetCompiledCode() const
GLint GLint GLsizei GLint GLenum GLenum type