Clamp the FBO texture
This commit is contained in:
parent
a3b85883f8
commit
b8e477c6eb
2 changed files with 10 additions and 8 deletions
|
|
@ -1,13 +1,13 @@
|
|||
#version GLSL_VERSION
|
||||
#define vleft -1.0
|
||||
#define vtop 1.0
|
||||
#define vright 1.0
|
||||
#define vbottom -1.0
|
||||
#define vleft -1.0f
|
||||
#define vtop 1.0f
|
||||
#define vright 1.0f
|
||||
#define vbottom -1.0f
|
||||
|
||||
#define tleft 0
|
||||
#define ttop 1
|
||||
#define tright 1
|
||||
#define tbottom 0
|
||||
#define tleft 0.0f
|
||||
#define ttop 1.0f
|
||||
#define tright 1.0f
|
||||
#define tbottom 0.0f
|
||||
|
||||
const vec2 viewport_xpos = vec2(vleft, vright);
|
||||
const vec2 viewport_ypos = vec2(vtop, vbottom);
|
||||
|
|
|
|||
|
|
@ -323,6 +323,8 @@ draw_cells_interleaved(ssize_t vao_idx, ssize_t gvao_idx, Screen *screen, OSWind
|
|||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, os_window->viewport_width, os_window->viewport_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
}
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, offscreen_framebuffer);
|
||||
glFramebufferTexture(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, os_window->offscreen_texture_id, 0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue