glfw

error undefined reference to `FTExtrudeFont::FTExtrudeFont(char const*)' [duplicate]

江枫思渺然 提交于 2019-12-25 07:48:50
问题 This question already has answers here : What is an undefined reference/unresolved external symbol error and how do I fix it? (32 answers) Closed 2 years ago . while I am compiling my opengl code I am facing this error.how to remove this? all: sample2D sample2D: Sample_GL3_2D.cpp glad.c g++ -o sample2D Sample_GL3_2D.cpp glad.c -lGL -lglfw -ldl -std=c++11 clean: rm sample2D this is my contents of Makefile and my code for rendering the font const char* fontfile = "Monaco.ttf"; GL3Font.font =

GLFW mouse callback fired after mouse leave GLFWwindow?

风流意气都作罢 提交于 2019-12-24 18:55:11
问题 For some reason my Window::callback is being called even after the mouse has left the window. I am unable to find a solution or even something that could help. Is it possible that GLFW updated how the mouse cursor callback operates? I wonder if it is an order of invocation problem? Window Window::Window(std::string title, int32_t width, int32_t height) { // TODO: add support for monitor and share for GLFW m_window = std::unique_ptr<GLFWwindow, GLFWdeleter>(glfwCreateWindow(width, height,

Can't link GLFW in qtcreator

徘徊边缘 提交于 2019-12-24 10:39:34
问题 I want to link GLFW. I already installed: sudo apt-get install cmake make g++ libx11-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libxrandr-dev libxext-dev Then I create catalog with 2 sub catalogs build(cmake out source build) and libs(for external libraries). from build catalog I run cmake with command "cmake .." CMakeLists.txt in main catalog cmake_minimum_required(VERSION 2.6) project(MyProject) # project name #version number set(MyProject_Version_Major 1) #numer wersji glowny set

static build glew & glfw on linux

笑着哭i 提交于 2019-12-24 08:07:54
问题 In my project directory, i have: ./external/glew, which has glew compiled from source (ran make) ./external/glfw, which has glfw also compiled from source (ran make x11) in my .c source code: #include <stdio.h> #include <stdlib.h> #include "external/glew/include/GL/glew.h" #include "external/glfw/include/GL/glfw.h" i tried to compile using GCC: gcc test1.c -o test1 -DGLEW_STATIC -L./external/glew/lib -lGLEW -lGLU -lGL \ -L./external/glfw/lib/x11 -lglfw ./external/glew/lib is where the libGLEW

C++ GLFW3 input handling

て烟熏妆下的殇ゞ 提交于 2019-12-24 07:27:51
问题 So I've been working on a game engine using OpenGL + GLFW. Originally I had been using the LWJGL wrappers and using Java. I've decided to port my codebase to C++. I had been making use of the "glfwSetCursorPosCallback" function via a lambda like so: //Java: glfwSetCursorPosCallback(win, (window, xpos, ypos) -> { engine.onCursorMoved(xpos, ypos); }); Doing this allowed me to tie together all of the different "events" in the Engine class and keep the GLFW setup code + the raw update loop

GLFW returning the wrong GL_VERSION

走远了吗. 提交于 2019-12-24 06:55:43
问题 In GLFW I'm setting OpenGL context version via: glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0); However when I print it to the console after glfwMakeContextCurrent(window); and glewInit(); via: Log::brightWhite("OpenGL version:\t"); Log::white("%s\n", glGetString(GL_VERSION)); Log::brightWhite("GLSL version:\t"); Log::white("%s\n", glGetString(GL_SHADING_LANGUAGE_VERSION)); I get the following: Why is it 4.3 and not 2.0? 回答1: Because the

GLFW returning the wrong GL_VERSION

混江龙づ霸主 提交于 2019-12-24 06:55:24
问题 In GLFW I'm setting OpenGL context version via: glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0); However when I print it to the console after glfwMakeContextCurrent(window); and glewInit(); via: Log::brightWhite("OpenGL version:\t"); Log::white("%s\n", glGetString(GL_VERSION)); Log::brightWhite("GLSL version:\t"); Log::white("%s\n", glGetString(GL_SHADING_LANGUAGE_VERSION)); I get the following: Why is it 4.3 and not 2.0? 回答1: Because the

GLFW returning the wrong GL_VERSION

我的未来我决定 提交于 2019-12-24 06:54:51
问题 In GLFW I'm setting OpenGL context version via: glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0); However when I print it to the console after glfwMakeContextCurrent(window); and glewInit(); via: Log::brightWhite("OpenGL version:\t"); Log::white("%s\n", glGetString(GL_VERSION)); Log::brightWhite("GLSL version:\t"); Log::white("%s\n", glGetString(GL_SHADING_LANGUAGE_VERSION)); I get the following: Why is it 4.3 and not 2.0? 回答1: Because the

Visual Studio need to rebuild solution for every change

懵懂的女人 提交于 2019-12-24 06:11:53
问题 I am currently working on a game engine in c++. As I have progressed further into the project, I have noticed that the resulting executable often does not reflect the latest code changes. But completely cleaning the solution and rebuilding it, fixes the problem. Unfortunately a complete rebuild is not a viable option for a larger code base anymore. I have already checked different solutions on stackoverflow: I have checked that my "Build and Run" setting is set to "Always build" The

GLFW triangle will not change color

喜夏-厌秋 提交于 2019-12-23 22:52:04
问题 I've been following a short youtube tutorial on how to make basic graphics with glfw. I cannot get my triangle to change color help me. main code: #include <stdio.h> #include <stdlib.h> #include <string> #include <fstream> #include <GL/glew.h> #include <GLFW/glfw3.h> std::string LoadFileToString(const char* filepath) { std::string fileData; std::ifstream stream(filepath, std::ios::in); if (stream.is_open()) { std::string line = ""; while (getline(stream, line)) { fileData += "\n" + line; }