this post was submitted on 10 Oct 2023
9 points (100.0% liked)

C++

1755 readers
1 users here now

The center for all discussion and news regarding C++.

Rules

founded 1 year ago
MODERATORS
 

I was doing this part of this opengl tutorial and when trying to replicate the rectangle example it ends in a segfault, it starts up when i dont create the VAO (the VAObject variable) but when i do that it doesnt draw anything at all, i recently recompiled glfw to use glx. rectangle source: https://pastebin.com/LD8QPa47 canned_glfw_window.hpp: https://pastebin.com/0pkxSrBK canned_glfw_window.cpp: https://pastebin.com/an3GQcy1 (i put most of the logic in the last 2 files in order to be able to reuse it later)

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 1 points 1 year ago (1 children)

Looks like you wrote std::shared_ptr fragment_shader(new GLShader(&vertex_shader_src, 1, GL_FRAGMENT_SHADER, NULL)); instead of passing &fragment_shader_src.

[โ€“] [email protected] 1 points 1 year ago

yeah, i noticed that before, i already fixed it, thank you anyway