Comments (13)
More information in my case. It seems like I get to if (!_glfwIsValidContext(&ctxconfig))
in GLFW and whatever checks are done inside _glfwIsValidContext(&ctxconfig)
are failing so I get NULL
instead of a context.
For the tutorial itself, maybe some wording about debugging and seeing where the context is failing is appropriate? In my case I've just been single stepping the code in Visual Studio.
from glitter.
Found it. In glfwIsValidContext
, two OpenGL contexts are checked against each other and if the version doesn't match, we get NULL.
I'm on Windows 10 on a Lenovo X1 Carbon (3443CTO)
ctxconfig = 0x003ef8a8 {api=196609 major=4 minor=1 ...} //the context we're checking window->context = {api=196609 major=4 minor=0 ...} //result of _glfwPlatformGetCurrentContext
Further than that, I don't really understand - maybe someone else can provide more insight.
FWIW, making _glfwIsValidContext
return GL_TRUE
gets me a grey window, but I have no idea if it's usable / working.
from glitter.
Can you try generating an OpenGL 3.3 context instead?
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
I don't have an HD 4000 anymore, but I can ask around and try to have someone else reproduce this.
from glitter.
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
works, and so does
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
Maybe something in the README about dropping the OpenGL version down if you have trouble? Or is there a way to make the "Failed" message spit out the system's supported OpenGL version?
from glitter.
@voltagex according to Wikipedia, the Intel HD 4000 only supports OpenGL 4.0
under Windows. Looks like that's what your error messages were saying as well. You'll want:
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
I tested this on an HD 4000 in OSX, where 4.1 is available. Should have caught this, sorry about that!
from glitter.
Edit: Similar problems under Linux.
from glitter.
This chart says it only runs 3.3 under Linux.
Looks like it's time to roll back to an older GL version or maybe insert more error messages ...
from glitter.
Depends what you expect from your target audience. If this is intended for classrooms where all the machines would have the same version supported, maybe hardcoding 4.0 is OK.
Should I open another issue for something like "Minimum OpenGL requirements"?
from glitter.
Fundamentally, GL 3 and GL 4 are pretty similar. They're both within the scope of "Modern OpenGL" though there are a few nice things about 4 that aren't available in 3. 4.0 and 4.1 is miniscule differences, so it's probably safe to drop to 4.0. It'll still create a forward compatible context when possible.
I'm more concerned about users who are on older graphics cards that aren't GL 4 compatible. They are out there, but evidently a lot more are still floating around than I realized, considering this is the second issue raised about this so far.
from glitter.
Setting an error callback could be helpful: http://www.glfw.org/docs/latest/quick.html#quick_capture_error - but in this case, the error message produced is useless. I wonder if that's worth a bug report to GLFW...
from glitter.
I want to avoid callbacks as much as possible. This project is used by a significant number of "non-programmers" (art majors, etc. who just want OpenGL to "work"). Ideally the main code should be as short and simple as possible, and should be easy to read without having to go "oh, this is called when an error happens? But why?!"
from glitter.
Fair enough. Thanks for helping me get started.
from glitter.
@voltagex sure thing!
I set it to OpenGL 4.0, so you should be able to pull latest and pick up that change.
from glitter.
Related Issues (20)
- How to resuse the Glitter project setting? HOT 1
- Nothing displays when run on MacOS
- Where can I find this fbx? HOT 1
- How to build as library? HOT 3
- XCode project not found stbi_load function HOT 4
- Feature request: add imgui HOT 1
- Warnings on Arch Linux HOT 2
- stbi load not working on macOS, linker problems HOT 4
- CMake Error: does not contain a CMakeLists.txt file HOT 2
- Makefile:4: *** missing separator. Stop. HOT 2
- Support for WSL2 in Windows? HOT 1
- Hi there! Could you provide some more details on which Mac you're building on, which version of Xcode you're using, and the build output produced when your build fails? HOT 1
- Does not have a folder to add textures
- Add FreeType HOT 1
- Call to 'abs' is ambiguous. Hash.h HOT 5
- ld: library not found for -lminizip HOT 4
- [Tip] Solution to "Implicit conversion loses integer precision" error on macos 13+ and xcode 14+ HOT 1
- assimp build error on ARCH
- Can't load/open image files HOT 1
- STBI Linker Issue on mac(?)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glitter.