VertexShaderPtr CompileAndCreateVertexShader(const std::string& code, const D3D_SHADER_MACRO* pDefines, const char* pEntry) { D3DBlob blob; if (CompileShader(DX11::D3D::ShaderType::Vertex, code, blob, pDefines, pEntry)) { return CreateVertexShaderFromByteCode(blob); } return nullptr; }
ID3D11VertexShader* CompileAndCreateVertexShader(const std::string& code) { D3DBlob* blob = nullptr; if (CompileVertexShader(code, &blob)) { ID3D11VertexShader* v_shader = CreateVertexShaderFromByteCode(blob); blob->Release(); return v_shader; } return nullptr; }
ID3D11VertexShader* CompileAndCreateVertexShader(const char* code, unsigned int len) { D3DBlob* blob = NULL; if (CompileVertexShader(code, len, &blob)) { ID3D11VertexShader* v_shader = CreateVertexShaderFromByteCode(blob); blob->Release(); return v_shader; } return NULL; }
ID3D11VertexShader* CompileAndCreateVertexShader(const char* code, unsigned int len) { D3DBlob* blob = NULL; if (CompileVertexShader(code, len, &blob)) { ID3D11VertexShader* v_shader = CreateVertexShaderFromByteCode(blob); blob->Release(); return v_shader; } PanicAlert("Failed to compile and create vertex shader from %p (size %d) at %s %d\n", code, len, __FILE__, __LINE__); return NULL; }