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

Method subImage

Source/Graphics/textures.cpp:759–768  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

757}
758
759void Textures::subImage(const TextureRef& tex_ref, void* data) {
760 if (tex_ref.valid()) {
761 bindTexture(tex_ref);
762 Texture& texture = textures[tex_ref.id];
763
764 glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, texture.width, texture.height, texture.format, GL_UNSIGNED_BYTE, data);
765 } else {
766 LOGE << "Unable to load data to texture." << std::endl;
767 }
768}
769
770void Textures::subImage(const TextureRef& destination, const TextureRef& source, int xoffset, int yoffset) {
771 if (destination.valid() && source.valid()) {

Callers 1

DrawToAtlasNodeMethod · 0.80

Calls 15

GetLinearGLFormatFunction · 0.85
EnsureInRAMMethod · 0.80
GetGLInternalFormatMethod · 0.80
DebugTracePrintMethod · 0.80
GetMipLevelsMethod · 0.80
GetMipWidthMethod · 0.80
GetMipHeightMethod · 0.80
GetMipDataSizeMethod · 0.80
GetMipDataMethod · 0.80
GetGLBaseFormatMethod · 0.80
GetGLTypeMethod · 0.80

Tested by

no test coverage detected