Код: Выделить всё
int main(){
glfwInit();
glfwSetErrorCallback(ErrCallbackGLFW);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 5);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
GLFWwindow* window = glfwCreateWindow(800,600,"TerrainGen",nullptr,nullptr);
if (window == nullptr){
std::cout
#ifndef MINREPRODUCE_HPP
#define MINREPRODUCE_HPP
#include
class Shader{
public:
Shader();
private:
GLuint program{};
};
#endif
~
< /code>
#include
#include
#include
#include "minReproduce.hpp"
void ErrCallbackGLFW(int, const char * err_str){
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79700045/segfault-when-calling-opengl-functions-from-other-file[/url]