fix linux build, fix small gl rendering issues

This commit is contained in:
Ryan Fleury committed 2026-08-04 15:38:28 -07:00
1 parent 11cb826181
commit a6755d6191
6 files changed
+11 -10

No files matched your search

@@ -260,7 +260,7 @@ str8_lit_comp(
" \n"
" // rjf: sample for corners\n"
" float corner_sdf_s = rect_sdf(sdf_sample_pos, rect_half_size, corner_radius);\n"
" float corner_sdf_t = smoothstep(0, 2, corner_sdf_s);\n"
" float corner_sdf_t = 1-smoothstep(0, 2, corner_sdf_s);\n"
" \n"
" // rjf: weight output color by sdf\n"
" // this is doing alpha testing, leave blurring only where mostly opaque pixels are\n"
+1 -1
View File
@@ -418,7 +418,7 @@ r_window_begin_frame(WM_Window os, R_Handle r)
glBindFramebufferScope(GL_FRAMEBUFFER, targets[idx]->fbo)
glBindTextureScope(GL_TEXTURE_2D, targets[idx]->color_texture)
{
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (S32)client_rect_dim.x, (S32)client_rect_dim.y, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, (S32)client_rect_dim.x, (S32)client_rect_dim.y, 0, GL_RGBA, GL_FLOAT, 0);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, targets[idx]->color_texture, 0);
}
}
+1
View File
@@ -52,6 +52,7 @@ typedef ptrdiff_t GLintptr;
#define GL_COLOR_ATTACHMENT31 0x8CFF
#define GL_R8 0x8229
#define GL_RGBA32F 0x8814
#define GL_ARRAY_BUFFER 0x8892
#define GL_STREAM_DRAW 0x88E0
+1 -1
View File
@@ -282,7 +282,7 @@ void main(void)
// rjf: sample for corners
float corner_sdf_s = rect_sdf(sdf_sample_pos, rect_half_size, corner_radius);
float corner_sdf_t = smoothstep(0, 2, corner_sdf_s);
float corner_sdf_t = 1-smoothstep(0, 2, corner_sdf_s);
// rjf: weight output color by sdf
// this is doing alpha testing, leave blurring only where mostly opaque pixels are