Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_texture.c
| Show First 20 Lines • Show All 655 Lines • ▼ Show 20 Lines | GPUTexture *GPU_texture_create_nD( | ||||
| } | } | ||||
| glBindTexture(tex->target, tex->bindcode); | glBindTexture(tex->target, tex->bindcode); | ||||
| /* Check if texture fit in VRAM */ | /* Check if texture fit in VRAM */ | ||||
| GLenum proxy = GL_PROXY_TEXTURE_2D; | GLenum proxy = GL_PROXY_TEXTURE_2D; | ||||
| if (n == 2) { | if (n == 2) { | ||||
| if (d > 0) | if (d > 1) | ||||
| proxy = GL_PROXY_TEXTURE_2D_ARRAY; | proxy = GL_PROXY_TEXTURE_2D_ARRAY; | ||||
| } | } | ||||
| else if (n == 1) { | else if (n == 1) { | ||||
| if (h == 0) | if (h == 0) | ||||
| proxy = GL_PROXY_TEXTURE_1D; | proxy = GL_PROXY_TEXTURE_1D; | ||||
| else | else | ||||
| proxy = GL_PROXY_TEXTURE_1D_ARRAY; | proxy = GL_PROXY_TEXTURE_1D_ARRAY; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 961 Lines • Show Last 20 Lines | |||||