Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpu/intern/gpu_viewport.c')
-rw-r--r--source/blender/gpu/intern/gpu_viewport.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c
index dc898c85773..0bf215f31a8 100644
--- a/source/blender/gpu/intern/gpu_viewport.c
+++ b/source/blender/gpu/intern/gpu_viewport.c
@@ -291,7 +291,7 @@ double *GPU_viewport_cache_time_get(GPUViewport *viewport)
* Try to find a texture coresponding to params into the texture pool.
* If no texture was found, create one and add it to the pool.
*/
-GPUTexture *GPU_viewport_texture_pool_query(GPUViewport *viewport, void *engine, int width, int height, int channels, int format)
+GPUTexture *GPU_viewport_texture_pool_query(GPUViewport *viewport, void *engine, int width, int height, int format)
{
GPUTexture *tex;
@@ -314,7 +314,7 @@ GPUTexture *GPU_viewport_texture_pool_query(GPUViewport *viewport, void *engine,
}
}
- tex = GPU_texture_create_2D_custom(width, height, channels, format, NULL, NULL);
+ tex = GPU_texture_create_2D(width, height, format, NULL, NULL);
GPU_texture_bind(tex, 0);
/* Doing filtering for depth does not make sense when not doing shadow mapping,
* and enabling texture filtering on integer texture make them unreadable. */
@@ -391,8 +391,8 @@ static void gpu_viewport_default_fb_create(GPUViewport *viewport)
int *size = viewport->size;
bool ok = true;
- dtxl->color = GPU_texture_create_2D(size[0], size[1], NULL, NULL);
- dtxl->depth = GPU_texture_create_depth_with_stencil(size[0], size[1], NULL);
+ dtxl->color = GPU_texture_create_2D(size[0], size[1], GPU_RGBA8, NULL, NULL);
+ dtxl->depth = GPU_texture_create_2D(size[0], size[1], GPU_DEPTH24_STENCIL8, NULL, NULL);
if (!(dtxl->depth && dtxl->color)) {
ok = false;
@@ -436,8 +436,8 @@ static void gpu_viewport_default_multisample_fb_create(GPUViewport *viewport)
int samples = viewport->samples;
bool ok = true;
- dtxl->multisample_color = GPU_texture_create_2D_multisample(size[0], size[1], NULL, samples, NULL);
- dtxl->multisample_depth = GPU_texture_create_depth_with_stencil_multisample(size[0], size[1], samples, NULL);
+ dtxl->multisample_color = GPU_texture_create_2D_multisample(size[0], size[1], GPU_RGBA8, NULL, samples, NULL);
+ dtxl->multisample_depth = GPU_texture_create_2D_multisample(size[0], size[1], GPU_DEPTH24_STENCIL8, NULL, samples, NULL);
if (!(dtxl->multisample_depth && dtxl->multisample_color)) {
ok = false;