summaryrefslogtreecommitdiff
path: root/advanced_opengl/10.antialiasing/anti_aliasing_offscreen.c
diff options
context:
space:
mode:
Diffstat (limited to 'advanced_opengl/10.antialiasing/anti_aliasing_offscreen.c')
-rw-r--r--advanced_opengl/10.antialiasing/anti_aliasing_offscreen.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/advanced_opengl/10.antialiasing/anti_aliasing_offscreen.c b/advanced_opengl/10.antialiasing/anti_aliasing_offscreen.c
index 31f3cae..beb0d12 100644
--- a/advanced_opengl/10.antialiasing/anti_aliasing_offscreen.c
+++ b/advanced_opengl/10.antialiasing/anti_aliasing_offscreen.c
@@ -32,6 +32,7 @@ int main(void)
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
+ glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);
window = glfwCreateWindow(width, height, "Anti Aliasing (Off-screen)", 0, 0);
if (!window) {
fprintf(stderr, "[ERROR] Failed to create window.\n");
@@ -52,10 +53,8 @@ int main(void)
arena = arena_alloc(Kilobytes(4));
cube = mesh_load_obj(arena, "../../data/models/cube.obj");
- color_shader = create_shader_program("shaders/color.vert",
- "shaders/color.frag");
- screen_shader = create_shader_program("shaders/screen.vert",
- "shaders/screen.frag");
+ color_shader = load_shader("shaders/color.vert", "shaders/color.frag");
+ screen_shader = load_shader("shaders/screen.vert", "shaders/screen.frag");
glGenFramebuffers(1, &fbo);
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
glGenTextures(1, &color_tex);