示例#1
0
	FramebufferDepth* FramebufferDepth::Create(uint width, uint height)
	{
		switch (API::Context::GetRenderAPI())
		{
			case API::RenderAPI::OPENGL:	return spnew GLFramebufferDepth(width, height);
            #ifdef SP_PLATFORM_WINDOWS
			case API::RenderAPI::DIRECT3D:	return spnew D3DFramebufferDepth(width, height);
            #endif
		}
		return nullptr;
	}
示例#2
0
FramebufferDepth* FramebufferDepth::Create(uint width, uint height)
{
    switch (API::Context::GetRenderAPI())
    {
    case API::RenderAPI::OPENGL:
        return spnew GLFramebufferDepth(width, height);
    case API::RenderAPI::DIRECT3D:
        return spnew D3DFramebufferDepth(width, height);
    }
    return nullptr;
}