MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / createTexture2D

Function createTexture2D

Source/Falcor/Core/API/FBO.cpp:120–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120ref<Texture> createTexture2D(
121 ref<Device> pDevice,
122 uint32_t w,
123 uint32_t h,
124 ResourceFormat format,
125 uint32_t sampleCount,
126 uint32_t arraySize,
127 uint32_t mipLevels,
128 ResourceBindFlags flags
129)
130{
131 if (format == ResourceFormat::Unknown)
132 {
133 FALCOR_THROW("Can't create Texture2D with an unknown resource format.");
134 }
135
136 if (sampleCount > 1)
137 {
138 return pDevice->createTexture2DMS(w, h, format, sampleCount, arraySize, flags);
139 }
140 else
141 {
142 return pDevice->createTexture2D(w, h, format, arraySize, mipLevels, nullptr, flags);
143 }
144}
145
146ResourceBindFlags getBindFlags(bool isDepth, bool allowUav)
147{

Callers 1

create2DMethod · 0.85

Calls 2

createTexture2DMSMethod · 0.80
createTexture2DMethod · 0.80

Tested by

no test coverage detected