规范模型输入以及测试shader
This commit is contained in:
@@ -9,13 +9,31 @@ class TestShaderInterface : public davinci::ShaderFileInterface
|
||||
public:
|
||||
virtual davinci::VertexShaderInterface* getVertexShader(const char* szName)
|
||||
{
|
||||
static TestVertexShader testVertexShader;
|
||||
return &testVertexShader;
|
||||
if (strcmp(szName, "standard") == 0)
|
||||
{
|
||||
static StandardVertexShader standardVertexShader;
|
||||
return &standardVertexShader;
|
||||
}
|
||||
else if (strcmp(szName, "test") == 0)
|
||||
{
|
||||
static TestVertexShader testVertexShader;
|
||||
return &testVertexShader;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
virtual davinci::PixelShaderInterface* getPixelShader(const char* szName)
|
||||
{
|
||||
static SolidColorPixelShader solidColorPixelShader;
|
||||
static TestPixelShader testPixelShader;
|
||||
return &testPixelShader;
|
||||
if(strcmp(szName, solidColorPixelShader.getName()) == 0)
|
||||
{
|
||||
return &solidColorPixelShader;
|
||||
}
|
||||
else if (strcmp(szName, testPixelShader.getName()) == 0)
|
||||
{
|
||||
return &testPixelShader;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user