MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / EnsureTextureCreated

Method EnsureTextureCreated

Source/Engine/Render2D/FontTextureAtlas.cpp:223–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221}
222
223void FontTextureAtlas::EnsureTextureCreated() const
224{
225 if (_texture->IsAllocated() == false)
226 {
227 // Initialize atlas texture
228 if (_texture->Init(GPUTextureDescription::New2D(_width, _height, 1, _format, GPUTextureFlags::ShaderResource)))
229 {
230 LOG(Warning, "Cannot initialize font atlas texture.");
231 }
232 }
233}
234
235bool FontTextureAtlas::HasDataSyncWithGPU() const
236{

Callers 3

DrawTextMethod · 0.80
EnsureAtlasCreatedMethod · 0.80
UpdateLayoutMethod · 0.80

Calls 3

New2DFunction · 0.85
IsAllocatedMethod · 0.80
InitMethod · 0.45

Tested by

no test coverage detected