I want to enable OpenGL pipeline for Java program I’m working on (command line
-Dsun.java2d.opengl=True). I will have quite a lot calls to 2d drawing APIs in it so it seems sensible.
However, even when Java reports “OpenGL pipeline enabled for default config on screen 0” I can’t see enything on screen. What I mean is that the program starts, I see the Java comment on OpenGL but the window is empty.
When I start the same program without any command line -D additions, everything is as expected, all the content gets rendered properly.
Where should I look for solution?
I suggest using an API made specifically to enable OpenGL integration with Java.
Not only it will get rid of most (case not “all”) difficulty of integration, it will likely make the implementation much easier as well.
I am working with the LWJGL (Light Weight Java Game Library) for a game project. Tough it is made for game-development, it’s focus is mainly enabling OpenGL, and actual game-frameworking is done with other, inheriting APIs, like Slick2D.
I am liking it very much and it made my OpenGL development a LOT easier. You can try it. Otherwise, there are some other OpenGL-focused APIs out there that contain yet even less non-OpenGL code.