glfw

GLFW can't create 4.3 context

纵饮孤独 提交于 2020-01-03 22:57:50
问题 I've begun using OpenGL via C++ and GLFW, but calls to glfwCreateWindow(...) aren't creating a context using the latest version of OpenGL available on my system (currently 4.3). I've used OpenGL 4.3 contexts before with Java and LWJGL, but since switching to GLFW I've been unsuccessful. Adding calls to glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); causes glfwCreateWindow(...) to return an error code, though changing the minor version to 2 works

GLFW can't create 4.3 context

。_饼干妹妹 提交于 2020-01-03 22:57:11
问题 I've begun using OpenGL via C++ and GLFW, but calls to glfwCreateWindow(...) aren't creating a context using the latest version of OpenGL available on my system (currently 4.3). I've used OpenGL 4.3 contexts before with Java and LWJGL, but since switching to GLFW I've been unsuccessful. Adding calls to glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); causes glfwCreateWindow(...) to return an error code, though changing the minor version to 2 works

Anttweakbar glfw3 OpenGL 3.2 not drawing

十年热恋 提交于 2020-01-02 04:31:06
问题 I'm having some trouble using AntTweakBar with modern opengl (dynamic pipeline) and glfw3. I'm using some shaders and i'm pretty sure the problem is something about the camera or the shaders. The keyboard shortcuts are working but I don't have the fancy window I should have :( Here is the source #include <GL/glew.h> #include <GLFW/glfw3.h> #include <iostream> #if __cplusplus <= 199711L #define nullptr NULL #endif #include <cmath> #include <AntTweakBar.h> const GLchar *vxShaderSrc = R"(

GLFW MinGW link error

社会主义新天地 提交于 2019-12-31 22:41:24
问题 I've been attempting to test out GLFW with C++ for quite a while and am having constant linker issues. I am fairly new to C++, although I have experience in Java and C#, working directly with the compiler is fairly new to me. Here's my setup information. IDE: Qt Creator OS: Windows 7 64-bit Compiler: MinGW32 4.8.1 01:23:26: Starting: "C:\MinGW\bin\mingw32-make.exe" C:/MinGW/bin/mingw32-make -f Makefile.Debug mingw32-make[1]: Entering directory 'A:/workspace_cpp/Test-Debug' g++ -Wl,-subsystem

Running mac os x c++ program working with OpenGL 3.3

大城市里の小女人 提交于 2019-12-31 03:55:11
问题 I am running Mac OS X Sierra 10.12.6 (16G29). I am working on a macbook pro. I have installed brew and the following packages: brew install glfw3 brew install glew brew install glm Here is my c++ program: #include <iostream> #include <GLFW/glfw3.h> GLFWwindow* window; #include <GL/gl.h> int main(int argc, const char * argv[]) { if (!glfwInit()) { return -1; } glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); // Should be true for macOS, according to

Setting up GLFW with MinGW

旧巷老猫 提交于 2019-12-30 06:36:45
问题 I'm trying to learn OpenGL with GLFW, but I'm having some problems. This is my main.cpp: #include <GL/glfw.h> int main() { glfwInit(); glfwSleep( 1.0 ); glfwTerminate(); } This is my project's folder structure: Project +- glfw.dll +- main.cpp This is where I extracted the GLFW files: MinGW +- include | +- GL | +- glfw.h +- lib +- libglfw.a +- libglfwdll.a And this is how I try to build the program: g++ main.cpp -o main.exe -lglfwdll And these are the errors I'm getting: C:\Users\Dark\AppData

Current state and solutions for OpenGL over Windows Remote

谁说胖子不能爱 提交于 2019-12-30 04:49:05
问题 OpenGL and Windows Remote don't play along nicely. Solutions for this are dependent on the use case and answers are fragmented across the vast depths of the net. This is a write-up I wish existed when I started researching this, both for coders and non-coders. Problem: A RDP session of Windows does not expose the graphics card, at least not directly. For instance you cannot change the desktop resolution and GraphicsCard drivers usually just disable their setting menus. Starting a OpenGL

OpenGL without shaders

北城以北 提交于 2019-12-25 11:58:09
问题 I have read some tutorials to write the following code. The only difference is the original tutorials where using SDL instead of GLEW. I do not understand what is wrong in this code. It compiles but i do not see the triangle. (the tutorial were not using shaders too) #include <iostream> #include <GL/glew.h> #include <GL/gl.h> #include <GLFW/glfw3.h> GLFWwindow* window; int main(int argc, const char * argv[]) { if (!glfwInit()) { return -1; } glfwWindowHint(GLFW_SAMPLES, 4); glfwWindowHint

How to set up in NetBeans 8.1 to successfully compile an OpenGL code which uses GLFW

对着背影说爱祢 提交于 2019-12-25 08:27:14
问题 I am trying to compile a sample code in the 9th edition of "OpenGL Programming Guide" using NetBeans v8.1 on Ubuntu 14.04 64bit x86. The sample code is triangles.cpp, the first sample code of the book, downloadable from here. I have added information in the "Linker" tab of Project Properties dialog as follows: You can see that "Additional Library Directories", "Libraries" and "Additional Options" fields are filled with needed and correct information (at least I think so). However, when I

How to include a dependency in a header without including it in projects that include the header

大憨熊 提交于 2019-12-25 08:16:15
问题 So when you #include a header in C++, the compiler just copies the content of the header and pastes it where the #include was. I'm making a small game engine/framework and I'm including GLEW & GLFW in my Engine.h because I need things like GLFWwindow. But I get a compiler error in my Test Game 1 Project that uses the engine because since the compiler is just copying the code form engine.h and pasting it in test game 1's main.cpp, It's trying to include glew and glfw in my test game 1, which I