0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00

libobs-opengl: Make sampler optional when binding textures

This commit is contained in:
John R. Bradley 2015-05-23 00:47:22 -05:00 committed by jp9000
parent 3dede60384
commit 2278051985

View File

@ -470,7 +470,11 @@ void device_load_texture(gs_device_t *device, gs_texture_t *tex, int unit)
if (!tex)
return;
sampler = device->cur_samplers[param->sampler_id];
// texelFetch doesn't need a sampler
if (param->sampler_id == -1)
sampler = device->cur_samplers[param->sampler_id];
else
sampler = NULL;
if (!gl_bind_texture(tex->gl_target, tex->texture))
goto fail;