Hello Guest

Recent Posts

Pages: 1 ... 8 9 [10]
91
Lightweight Java Gaming Library / New download of LWJGL missing classes
« Last post by NexoKnight12 on October 09, 2018, 18:12:48 »
I downloaded LWJGL as a .zip, from their site. On their Wiki, they provide an example game of Space Invaders, with 10 different classes. The first class I tried to copy, IntelliJ gave me the error that it couldn't find ANY of the import statements. I have unpacked and added the .zip to my project classpath, and as a library. The snippet of code on the LWJGL "Getting Started" worked fine. I can go through the .jar files on the left, and the classes being used by the game are not in their corresponding .jars.

For example, the first class the game tries to import is:

import static org.lwjgl.LWJGLException;

But in the lwjgl.jar, under org.lwjgl, the only classes and interfaces are:

BufferUtils

package-info

PointerBuffer

Version

I can import any of these without problem, but why am I missing all these classes? Is there something I needed to set up before I can use LWJGL? (I am running Linux, Ubuntu 64bit)
92
Lightweight Java Gaming Library / Re: Is bgfx example broken?
« Last post by mudlee on October 08, 2018, 13:25:08 »
Ah, yes, you were right. Using 3.2.1-SNAPSHOT fixes the problem.
93
Lightweight Java Gaming Library / Re: Is bgfx example broken?
« Last post by KaiHH on October 08, 2018, 13:22:02 »
The lwjgl3-demos repository always compiles against the very very latest LWJGL snapshot versions, which currently is 3.2.1-20181006.135819-4. It might be that you are using an earlier version in which the BGFX version was different.
94
Lightweight Java Gaming Library / [SOLVED] Is bgfx example broken?
« Last post by mudlee on October 08, 2018, 13:13:16 »
Hi.

I'd like to create a basic LWJGL/BGFX example/template, if one (eg. me) wants to start a java game development with LWJGL and bgfx.
In this file I have a problem: https://github.com/LWJGL/lwjgl3-demos/blob/master/src/org/lwjgl/demo/bgfx/Demo.java
line 131:
Code: [Select]
format = init.resolution().format();
.resolution returns a BGFXResolution that does not have format method.

Am I missing something?
95
Lightweight Java Gaming Library / Re: Mac OSX - GLFW window issues
« Last post by StubbyRogue46 on October 07, 2018, 01:18:45 »
I have now found the source of the problem. Apparently I had missed one import of java.awt.Point in one remote class that was not even being used. So with that import removed it now works perfectly, even with both jorbis and JavaCV.

Thank you for your help and thank eclipse for the search tool.
96
Lightweight Java Gaming Library / Re: Mac OSX - GLFW window issues
« Last post by StubbyRogue46 on October 07, 2018, 00:47:09 »
I have now created a test with only GLFW window creation and a simple OpenGL draw. It works.
I tried adding a javax.sampled SourceDataLine playing a wav file to the test. It works.
I tried adding some references to jorbis files and methods (not all the same from the other program). It still works.
I went through all jorbis files on their github page and found no awt imports.

I tried removing all but the GLFW window creation from the main method and startup procedure of my main program. The issue remains.
I added a GLFWErrorCallback.createPrint() with glfwSetErrorCallback(). No recorded error.
I tried removing jorbis from the class-path entirely. The issue remains.
97
Lightweight Java Gaming Library / Re: Mac OSX - GLFW window issues
« Last post by spasi on October 06, 2018, 23:32:30 »
Try registering a GLFWErrorCallback, or running the application with LWJGLX/debug. Also, does the bug go away if you don't do anything with jorbis and/or javax.sound.sampled?
98
Lightweight Java Gaming Library / Re: Mac OSX - GLFW window issues
« Last post by StubbyRogue46 on October 06, 2018, 23:27:47 »
Tried removing JavaCV entirely, even the library in itself, but the issue still remains the same.
99
Lightweight Java Gaming Library / Re: Mac OSX - GLFW window issues
« Last post by spasi on October 06, 2018, 22:13:13 »
Afaict, JavaCV has AWT dependencies and may be causing this issue.
100
Lightweight Java Gaming Library / Mac OSX - GLFW window issues
« Last post by StubbyRogue46 on October 06, 2018, 15:38:29 »
I have largely one major issue regarding GLFW window creation using LWJGL on Mac OSX. The jar-file is launched from the terminal using the following command:

Code: [Select]
java -XstartOnFirstThread -jar MyJar.jar
The problem is that the GLFW window appears behind the terminal window and is out of focus, even if you click on it. The graphics and audio of the window works perfectly (when the window is resized, for the graphics), but due to the GLFW window not being in focus no key-input can be registered. The key-input is instead being registered in the terminal window and key-input is rather important for my program.

A common answer floating around on especially the lwjgl forum is that AWT causes this issue. I have now ensured that no AWT object nor call what so ever exists in my code, but the issue remains the same. The standard active threads are the following:

Code: [Select]
main
Java Sound Event Dispatcher
MUSIC#assets/audio/music/menu.ogg

where "main" is the java main thread, "Java Sound Event Dispatcher" is probably something that has to do with javax.sound.sampled and "MUSIC#assets/audio/music/menu.ogg" is just a thread that reads data into jorbis where I have ensured that my code contains no references to anything in the AWT package. So it does not appear to exist any AWT-thread.

I have also tried both glfwWindowHint(GLFW_FOCUSED, GL_TRUE) and glfwFocusWindow(...), none of which works. I have also tried to add -Djava.awt.headless=true which just causes the terminal to output:

Code: [Select]
[...] mainbasesystem.local java[384] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
GLFW window creation code is as follows:
 
Code: [Select]
public static boolean initGLFW(boolean full) {
try{
glfwInit();
glfwWindowHint(GLFW_RESIZABLE, GL_TRUE);
glfwWindowHint(GLFW_VISIBLE, GL_FALSE);
glfwWindowHint(GLFW_FOCUSED, GL_TRUE);

try{glfwDestroyWindow(window);} catch(Exception e){}
videoMode = glfwGetVideoMode(glfwGetPrimaryMonitor());

window = glfwCreateWindow(VIEWPORT_WIDTH, VIEWPORT_HEIGHT, TITLE, 0, 0);
glfwSetWindowPos(window, (videoMode.width()-VIEWPORT_WIDTH)/2, (videoMode.height()-VIEWPORT_HEIGHT)/2);

keyHandler = new KeyHandler();
glfwSetKeyCallback(window, keyHandler);
glfwSetWindowSizeCallback(window, windowSize);
glfwSetWindowIconifyCallback(window, windowIconification);
glfwSetInputMode(window, GLFW_CURSOR, (Options.cursorBound ? GLFW_CURSOR_DISABLED : GLFW_CURSOR_NORMAL));

try {
File icon16Path = new File("assets/icon16.png");
if(icon16Path.exists())
glfwSetWindowIcon(window, LWJGLFunc.createGLFWIcon("assets/icon16.png", "assets/icon32.png"));
} catch(Exception e) {
e.printStackTrace(Core.err);
}

glfwSwapInterval(0);
glfwMakeContextCurrent(window);
glfwShowWindow(window);
glfwFocusWindow(window);
return true;
} catch(Exception e){
e.printStackTrace(Core.err);
}
return false;
}


Everything works perfectly on Windows 7 and 8.1 (where Windows 8.1 is used on the same computer as Mac OSX).

Additional info:
- Mac OSX Yosemite 10.10.5
- LWJGL 3.2.0 (custom download with GLFW and STB)
- Also javacv and jorbis

How should this problem be solved?
Pages: 1 ... 8 9 [10]