renderer/opengl: resize the screen texture

This commit is contained in:
Mitchell Hashimoto
2023-11-17 20:46:23 -08:00
parent c8a51a2158
commit 5c7bad2f7d
2 changed files with 14 additions and 1 deletions

View File

@ -148,6 +148,19 @@ pub const State = struct {
1,
};
try self.syncUniforms();
// Update our texture
const texbind = try self.fb_texture.bind(.@"2D");
try texbind.image2D(
0,
.rgb,
@intCast(size.width),
@intCast(size.height),
0,
.rgb,
.UnsignedByte,
null,
);
}
/// Call this prior to drawing a frame to update the time

View File

@ -13,7 +13,7 @@ layout(binding = 0) uniform Globals {
uniform float iSampleRate;
};
layout(binding = 1) uniform sampler2D iChannel0;
layout(binding = 0) uniform sampler2D iChannel0;
// These are unused currently by Ghostty:
// layout(binding = 1) uniform sampler2D iChannel1;