Include_directories(OpenGL/lib) # OpenGL/lib has to contain the required OpenGL's. Include_directories(OpenGL/include) # OpenGL/include has to contain the required OpenGL's. Project(Graphics_Offline_1) # Your Project Name If you can't, there are plenty of tutorials on youtube and StackOverflow. I am assuming you can setup OpenGL on windows. I am assuming that you can write basic OpenGL programs and you have written a file named
Here, I am going to show you how to configure the CMakeLists.txt file to compile a OpenGL program which is the main challenge here. So, I am gonna put an end to this problem now and here. Apparently it's not so easy to find after all.
I have made it work in both Windows 10 and Linux (Ubuntu 16.04) after a lot of searching on Google.
Even line rendering is typically done by drawing a thin triangle or quad (pair of tris), and blitting or clearing a rectangle is done by drawing a quad (the APIs hide that, but the hardware often has no dedicated line rendering hardware).ĪPIs like SDL's are faster in software these days. Everything today is triangles and shaders. SDL 1.x dates back to the days of old Windows DIB/GDI interfaces and X.org drawing, which no longer work well on modern hardware, as the old 2D rendering parts of graphics chips are long gone. I'd recommend the prerelease 2.0 version, as I ran into some WONTFIX bugs in SFML 1 a few years ago that are fixed for 2.ĭoing 2D well, like doing 3D well, requires understanding how modern hardware works and batching together objects with the same render state and layer. It also allows shaders and such in its 2D API, unlike SDL. SFML HAS A hardware accelerated graphics module, and in my non-objective opinion is a far better, more modern, easier to use API than SDL anyway. If you understand the hadware, making a fast 2d renderer is not terribly hard or time consuming.
I believe the prerelease SDL 2.0 code has hardware accelerated 2D.īuilding your own over OpenGL or Direct3D is another option, easier than you might think, and is what most native-codec"real" 2D games do these days. I've been told that projects like sdl_gfx seek to offer an accelerated but simple 2D drawing API, though the docs indicate otherwise (it looks likw SDL extensiona). SDL's drawing primitives do not match modern hardware well.
Integer parameter out of range for operationĮrror would be the reason for LWJGL to think that my video driver doesn't support OpenGL, but that's just a guess. Maybe that's just because i'm running linux and he isn't, i don't know. When comparing the stack trace to this guy, the cause is aparently notĬaused by: : X Error - disp: 0x7f12cc000c50 serial: 194 error: BadValue (integer parameter out of range for operation) request_code: 154 minor_code: 24 Here's the stack traceĮxception in thread "LWJGL Application" .GdxRuntimeException: OpenGL is not supported by the video driver.Īt .(LwjglGraphics.java:229)Īt .(LwjglGraphics.java:174)Īt .(LwjglApplication.java:138)Īt .lwjgl.LwjglApplication$1.run(LwjglApplication.java:120)Ĭaused by: : X Error - disp: 0x7f0f4c000c50 serial: 194 error: BadValue (integer parameter out of range for operation) request_code: 154 minor_code: 24Īt .globalErrorHandler(LinuxDisplay.java:320)Īt .nCreate(Native Method)Īt .create(LinuxContextImplementation.java:51)Īt .(ContextGL.java:132)Īt .create(Display.java:850)Īt .create(Display.java:757)Īt .(LwjglGraphics.java:220) tProperty(".allowSoftwareOpenGL", "true") īut believe it or not, it doesn't work. I also tried what others on older posts have recommended, like here and here (which shouldn't be neccessary anymore since that commit, but worth trying) When you disconnect from the Windows box the OpenGL driver is not reloaded. When you connect to a Windows box the OpenGL Driver is unloaded and you end up with software emulation of OpenGL.
There's also hardware that doesn't support certain render states in hardware, so if you set a certain state, switch to software rendering, and again, nothing will run on the GPU (even though there's one there). 2 There are software rendered implementations of OpenGL, so it's possible that noOpenGL functions run on the GPU.