MCPcopy Create free account
hub / github.com/crownengine/crown / add_texture

Method add_texture

src/resource/material_resource.cpp:147–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145 }
146
147 void add_texture(const StringView &sampler, StringId64 texture_name)
148 {
149 TextureHandle th;
150 th.sampler_handle = 0;
151 th.texture_handle = 0;
152
153 TextureData td;
154 td.sampler_name_offset = add_name(sampler);
155 td.name = StringId32(sampler.data(), sampler.length());
156 td.id = texture_name;
157 td.data_offset = 0; // Computed later in alloc_blob().
158 td._pad1 = 0;
159
160 array::push_back(textures, td);
161 array::push_back(texture_handles, th);
162 }
163
164 void add_uniform(const StringView &name, UniformType::Enum type, const UniformValue &value)
165 {

Callers 1

parse_texturesFunction · 0.80

Calls 3

StringId32Class · 0.50
dataMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected