SpiecsEngine
 
Loading...
Searching...
No Matches

◆ RendererResource()

Spices::RendererResource::RendererResource ( const RendererResourceCreateInfo & info)

Constructor Function. Init member variables.

Parameters
[in]infoRendererResourceCreateInfo.

Set local variable.

Create the texture with specific info.

Set local variable.

Create the texture with specific info.

Definition at line 12 of file RendererResource.cpp.

13 : m_Info(info)
14 {
16
21
25 switch (info.type)
26 {
28 m_Texture = std::make_unique<Texture2D>(info);
29 break;
31 m_Texture = std::make_unique<Texture2DArray>(info);
32 break;
34 m_Texture = std::make_unique<Texture2DCube>(info);
35 break;
36 default:
37 SPICES_CORE_ERROR("Not supported Texture Class Type");
38 break;
39 }
40 }
#define SPICES_PROFILE_ZONE
std::unique_ptr< Texture2D > m_Texture
The texture this class Wrapped.
RendererResourceCreateInfo m_Info
The information of this resource.
bool m_IsResizeable
True if this resource can resize.
bool isResizeable
True if this resource needs resize(sync with viewport's size).

References Spices::RendererResourceCreateInfo::isResizeable, m_IsResizeable, RendererResource(), and Spices::RendererResourceCreateInfo::type.

Referenced by RendererResource().