mirror of
https://github.com/TomHarte/CLK.git
synced 2026-04-20 10:17:05 +00:00
Set source texture unit.
This commit is contained in:
@@ -336,7 +336,8 @@ OpenGL::Shader OpenGL::composition_shader(
|
||||
const int source_width,
|
||||
const int source_height,
|
||||
const int target_width,
|
||||
const int target_height
|
||||
const int target_height,
|
||||
const GLenum source_texture_unit
|
||||
) {
|
||||
//
|
||||
// Compose and compiler shader.
|
||||
@@ -416,6 +417,7 @@ OpenGL::Shader OpenGL::composition_shader(
|
||||
shader.set_uniform("cyclesSinceRetraceMultiplier", cycles_multiplier);
|
||||
shader.set_uniform("sourceSize", float(source_width), float(source_height));
|
||||
shader.set_uniform("targetSize", float(target_width), float(target_height));
|
||||
shader.set_uniform("source", GLint(source_texture_unit - GL_TEXTURE0));
|
||||
|
||||
return shader;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,8 @@ Shader composition_shader(
|
||||
int source_width,
|
||||
int source_height,
|
||||
int target_width,
|
||||
int target_height
|
||||
int target_height,
|
||||
GLenum source_texture_unit
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -141,7 +141,8 @@ ScanTarget::ScanTarget(const API api, const GLuint target_framebuffer, const flo
|
||||
pair.second,
|
||||
sample_multiplier,
|
||||
2048, 2048,
|
||||
buffer_width, 2048
|
||||
buffer_width, 2048,
|
||||
GL_TEXTURE0
|
||||
).bind();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user