-
Notifications
You must be signed in to change notification settings - Fork 6
CommonMistakes
RippeR37 edited this page Mar 5, 2015
·
2 revisions
This article presents most common mistakes of users of this library.
-
Creation of OpenGL context before using any of OpenGL functionality
- Result: crash (mostly on initialization/startup)
- Cause: OpenGL context is not created default.
- Solution: You have to create Window object and use it's
create()
method, which will initialize internally used libraries (GLFW, GLEW). - Alternative solution: You could create hidden context. See this guide.
-
Initialization of libraries before using library's modules
- Result: mostly crash
- Cause: Some of library's modules (like ones system-dependant) use internally GLFW library.
- Solution: You have to initialize GLFW by creating Window (check above).
- Alternative solution: You could use
Window::initializeGLFW()
static method without creating any windows.
- No auto-binding (yet)
- Result: Incorrect work of program
- Cause: No binding buffers/textures/program/etc. before usage. Fow now, library does not bind it's object before usage of it not to slow down whole program.
- Solution: You have to ensure that proper object are binded/used.
- Additional notes:
- This feature (auto-binding and context management) may be implemented in future, but it's not implemented yet.