Java LWJGL new Rendering issue windows - java

I have been working on a simple LWJGL practice project for a bit and just recently stumbled into a new issue. Now with every project i due i save working backups in multiple places. I was running a Windows 8.1 OS and recently upgraded to Windows 10 and suddenly all of my backups and current program have the rendering error as seen below. I've tried to run my program on a windows 8.1 OS and it works fine there.
Is there some new windows driver update that could be causing this rendering issue?
Or is there some incompatibility with windows 10 and LWJGL i havn't been able to find out about?

Try this:
before you render any objects into your world, make sure you are using the inbuilt depth testing, this can be done by using this line of code:
GL11.glEnable(GL11.GL_DEPTH_TEST);
This should work for you, as it is forgotten in most cases that this happens!
-Kore
EDIT:
Also dont forget to clear the buffer aswell!!
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT|GL11.GL_DEPTH_BUFFER_BIT);

Related

LWJGL GLFW hangs on native glfwInit call

I originally posted this question on GameDev stackexchange however I'll also ask the question here to try and get more outreach, especially since I wasn't sure my problem was specific to game development since it's a problem with a Java native call.
For the past months I've been working on creating my own game engine for personal use in LWJGL using pieces here and there, especially from developer ThinMatrix's rightfully credited code, to learn as much as I can while building it. Only recently there has been strange behavior happening when I launch the engine from IntelliJ for testing:
After about 6-10 individual times I click run, all subsequent runs suddenly take about 60 seconds for the window to appear.
Whenever I restart my PC this hanging resets and I have another 6-10 runs before it hangs everytime again.
I located the issue to glfwInit, more specifically at the call to the native method:
#NativeType("int")
public static boolean glfwInit() {
long __functionAddress = Functions.Init;
return invokeI(__functionAddress) != 0; // Right here
}
I also noticed that this issue only started when I attempted to implement text support in my engine using the STBTrueType library. It was perfectly fine before that. I tried removing the TrueType code but it didn't fix it.
Here's a list of things I've tried:
Clearing my temp folder in case a buggy or corrupted file was present.
Recompiling and rebuilding the entire LWJGL jars twice.
Building glfw.dll from the GLFW sources and replacing the glfw.dll in the native jars with the former.
Reinstalling Java and actually upgrading JDK versions (from 13.0.2 to 14.0.2)
Switching IDEs even if I suspected it wouldn't work.
Updating my NVIDIA drivers, and reinstalling them.
I'm quite confused as to what it could be, and I'd be more than happy to share code, thread dumps, or debug info if you deem it necessary. Here is the Github repository with the latest, "faulty" code (fault in quotes because I'm not too sure the code is the problem.)
Thank you very much for any guidance.
P.S: Please tell me if this is better asked in StackOverflow instead of here.
So I fixed the issue, it turns out it wasn't even related to anything to do with programming, or STBTrueType, or the library itself. The problem was as pointed out in this StackOverflow post, where this hanging behavior was due to a faulty driver or, in my case, my keyboard USB being plugged in the "wrong" USB port. I moved my computer at the same time I started working on text in my engine, hence why I wrongly linked the issue with the TrueType library. If you're having the same issue, look at the aforementioned post or if that doesn't work, look for a peripheral that might cause interference.

Java-utilizing programs malfunctioning

Ok so I've had this problem for as long as I've had this computer.
Almost all programs which utilize java in some way seem to be malfunctioning, e.g Geogebra, Maple, MarvinSketch etc.
The problem is hard to describe but it's some kind of image distortion that changes when the cursor is moved around.
Funny enough Java IDE software such as Eclipse and JCreator work just fine, the programs on them as well.
Here are some pictures:
https://drive.google.com/file/d/0B8FJefOEBlXEWm4yR0I5bHBVX0U/view?usp=sharing
https://drive.google.com/file/d/0B8FJefOEBlXEZEpRYmhleW1KdFE/view?usp=sharing
Things I have tried:Reinstall Java (duh),cleared Java cache, tried every possible compatibility settings, reinstalled the malfunctioning programs
I am currently running the latest version of java (both 32 and 64 bit) on Windows 10.
I would be really thankful if anyone could help me on this one, as Google couldn't.
P.S: There are no issues with the hardware performance and all drivers are up to date.

jogl program starting extremely slow

Im trying to get a project with JOGL running and from second one I've run into problems. I have downloaded jogl-all.jar, gluegen-rt.jar and gluegen-rt-natives-windows-amd64.jar and jogl-all-natives-windows-amd64.jar version 2.3.2 from the release website of JOGL. I have extracted gluegen-rt.jar and jogl-all.jar, added them as a library to my project and put all the native files into lib/natives/windows-amd64. So far so good, I then set up a simple method doing the following:
System.out.println("Start");
GLProfile profile = GLProfile.getDefault();
System.out.println(profile.getImplName());
I hit the run button in IntelliJ and it printed "Start". Thats it. I started checking some logs, browsing the internet about that issue and suddenly, like 2 minutes later I realized in the corner of my eye that the output changed and it printed GL4bc. A little bit confused i thought this might be some IntelliJ related issue or so and started it in the command line. Same thing there, it consistently takes 1-2 minutes to execute GLProfile.getDefault(). What's this madness? I mean, I never choose Java for performance reasons, but that's a little bit too much :D.
What am I missing here? Or is this 'as designed'? Thanks for any help in advance and have a nice day!

Why Java Applet working only on my computer, but not on the others?

I just wonder something about java applet with awt. I quite disappointed with this problem and want to throw it away sometimes. Below are my descriptions:
I already created one application using java applet with awt controls on my own computer, let's say computerA using Window 7 32bit Operating System. To up and running this application, I update java version to the latest one.
Application is working fine with computerA. However, this application also need to run on the others as well. As my own situation, I run with another computer, let's say computerB using Window 7 64bits Operation System. I knew that the application created with 32bits java version, thus I decided to install this java version on computerB. However, when I run the application it can only display interface on browswer, but some of its function did not work.
Yet I didn't throw it away, I decided to configure in the last computer, let's say computerC. This computer use Window 8 32bits Operating System. I did configure as I did with computerA and computerB. The result is still exact as computerB.
I also checked up this solution on here, but it is not fit my problem.
Here are my questions:
What is the exact problem on here?
Where does the problem come from?
Is it solvable?
How can I solve this kind of problem? Any helps?
Update:
PostgreSQL Database also install in other local computers as well.
I noticed that If I convert my code into eclipse project, it worked fine. No problem at all.
Thanks in Advance.

MATLAB GUIDE window appears empty and without controls

I'm running MATLAB 2013b on Ubuntu, and I'm having many problems with the display of windows. For instance, when I try to start GUIDE (typing "guide" at the command prompt), I get just an empty rectangle.
Looks like some kind of incompatibility between MATLAB, Ubuntu and Java, but I'm not sure about how to proceed... any ideas?
... well, just in case somebody comes across the same problem, I'll leave my answer: it's just a question of giving up Unity in Ubuntu and start the session with the "classical gnome desktop (no effects)" option.

Categories