Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/renderer/backend/dummy/Device.cpp
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | std::unique_ptr<ITexture> CDevice::CreateTexture2D( | ||||
const Format format, const uint32_t width, const uint32_t height, | const Format format, const uint32_t width, const uint32_t height, | ||||
const Sampler::Desc& defaultSamplerDesc, const uint32_t MIPLevelCount, const uint32_t sampleCount) | const Sampler::Desc& defaultSamplerDesc, const uint32_t MIPLevelCount, const uint32_t sampleCount) | ||||
{ | { | ||||
return CreateTexture(name, ITexture::Type::TEXTURE_2D, usage, | return CreateTexture(name, ITexture::Type::TEXTURE_2D, usage, | ||||
format, width, height, defaultSamplerDesc, MIPLevelCount, sampleCount); | format, width, height, defaultSamplerDesc, MIPLevelCount, sampleCount); | ||||
} | } | ||||
std::unique_ptr<IFramebuffer> CDevice::CreateFramebuffer( | std::unique_ptr<IFramebuffer> CDevice::CreateFramebuffer( | ||||
const char*, ITexture*, ITexture*) | const char*, SColorAttachment*, SDepthStencilAttachment*) | ||||
{ | |||||
return CFramebuffer::Create(this); | |||||
} | |||||
std::unique_ptr<IFramebuffer> CDevice::CreateFramebuffer( | |||||
const char*, ITexture*, ITexture*, const CColor&) | |||||
{ | { | ||||
return CFramebuffer::Create(this); | return CFramebuffer::Create(this); | ||||
} | } | ||||
std::unique_ptr<IBuffer> CDevice::CreateBuffer( | std::unique_ptr<IBuffer> CDevice::CreateBuffer( | ||||
const char*, const CBuffer::Type type, const uint32_t size, const bool dynamic) | const char*, const CBuffer::Type type, const uint32_t size, const bool dynamic) | ||||
{ | { | ||||
return CBuffer::Create(this, type, size, dynamic); | return CBuffer::Create(this, type, size, dynamic); | ||||
} | } | ||||
std::unique_ptr<IShaderProgram> CDevice::CreateShaderProgram( | std::unique_ptr<IShaderProgram> CDevice::CreateShaderProgram( | ||||
const CStr&, const CShaderDefines&) | const CStr&, const CShaderDefines&) | ||||
{ | { | ||||
return CShaderProgram::Create(this); | return CShaderProgram::Create(this); | ||||
} | } | ||||
bool CDevice::AcquireNextBackbuffer() | bool CDevice::AcquireNextBackbuffer() | ||||
{ | { | ||||
// We have nothing to acquire. | // We have nothing to acquire. | ||||
return true; | return true; | ||||
} | } | ||||
IFramebuffer* CDevice::GetCurrentBackbuffer( | |||||
const AttachmentLoadOp, const AttachmentStoreOp, | |||||
const AttachmentLoadOp, const AttachmentStoreOp) | |||||
{ | |||||
return m_Backbuffer.get(); | |||||
} | |||||
void CDevice::Present() | void CDevice::Present() | ||||
{ | { | ||||
// We have nothing to present. | // We have nothing to present. | ||||
} | } | ||||
bool CDevice::IsTextureFormatSupported(const Format UNUSED(format)) const | bool CDevice::IsTextureFormatSupported(const Format UNUSED(format)) const | ||||
{ | { | ||||
return true; | return true; | ||||
Show All 17 Lines |
Wildfire Games · Phabricator