MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / FillTextureFromBGRABlock

Function FillTextureFromBGRABlock

Source/Graphics/text.cpp:217–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217void FillTextureFromBGRABlock(const TextureRef& texture_ref, const TextCanvas::MemoryBlock& bgra_block, int width, int height) {
218 Textures::Instance()->bindTexture(texture_ref);
219 glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, &bgra_block[0]);
220 Textures::Instance()->GenerateMipmap(texture_ref);
221}
222
223void TextCanvasTexture::UploadTextCanvasToTexture() {
224 TextCanvas& text_canvas = impl_->text_canvas;

Callers 1

Calls 2

bindTextureMethod · 0.80
GenerateMipmapMethod · 0.80

Tested by

no test coverage detected