Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/opengl/gl_texture.cc
| Show First 20 Lines • Show All 284 Lines • ▼ Show 20 Lines | switch (dimensions) { | ||||
| break; | break; | ||||
| case 3: | case 3: | ||||
| glTexSubImage3D(target_, mip, UNPACK3(offset), UNPACK3(extent), gl_format, gl_type, data); | glTexSubImage3D(target_, mip, UNPACK3(offset), UNPACK3(extent), gl_format, gl_type, data); | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /** This will create the mipmap images and populate them with filtered data from base level. | /** | ||||
| * This will create the mipmap images and populate them with filtered data from base level. | |||||
| * | |||||
| * WARNING: Depth textures are not populated but they have their mips correctly defined. | * WARNING: Depth textures are not populated but they have their mips correctly defined. | ||||
| * WARNING: This resets the mipmap range. | * WARNING: This resets the mipmap range. | ||||
| */ | */ | ||||
| void GLTexture::generate_mipmap() | void GLTexture::generate_mipmap() | ||||
| { | { | ||||
| this->ensure_mipmaps(9999); | this->ensure_mipmaps(9999); | ||||
| /* Some drivers have bugs when using #glGenerateMipmap with depth textures (see T56789). | /* Some drivers have bugs when using #glGenerateMipmap with depth textures (see T56789). | ||||
| * In this case we just create a complete texture with mipmaps manually without | * In this case we just create a complete texture with mipmaps manually without | ||||
| ▲ Show 20 Lines • Show All 388 Lines • Show Last 20 Lines | |||||