Hello Guest

Recent Posts

Pages: 1 [2] 3 4 ... 10
11
Hi, i am trying to setup LWJGL3 and have followed the instructions from "https://github.com/LWJGL/lwjgl3-wiki/wiki/1.2.-Install" , "http://wiki.lwjgl.org/wiki/Setting_Up_LWJGL_with_NetBeans.html" and "https://stackoverflow.com/questions/40806793/how-do-i-add-lwjgl-3-1-1-to-netbeans-to-use-in-a-java-project" and have searched for solutions online but nothing seems to work.

I am using win 10x64, netbeans 11.3x64, JDK 14x64. The library is setup using the above mentioned instructions. The test code is from "https://www.lwjgl.org/guide"

Following is the snapshot of the error.

run:
Hello LWJGL 3.2.3 build 13!
[LWJGL] Failed to load a library. Possible solutions:
   a) Add the directory that contains the shared library to -Djava.library.path or -Dorg.lwjgl.librarypath.
   b) Add the JAR that contains the shared library to the classpath.
[LWJGL] Enable debug mode with -Dorg.lwjgl.util.Debug=true for better diagnostics.
[LWJGL] Enable the SharedLibraryLoader debug mode with -Dorg.lwjgl.util.DebugLoader=true for better diagnostics.
Exception in thread "main" java.lang.UnsatisfiedLinkError: Failed to locate library: lwjgl.dll
   at org.lwjgl/org.lwjgl.system.Library.loadSystem(Library.java:162)
   at org.lwjgl/org.lwjgl.system.Library.loadSystem(Library.java:62)
   at org.lwjgl/org.lwjgl.system.Library.<clinit>(Library.java:50)
   at org.lwjgl/org.lwjgl.system.MemoryUtil.<clinit>(MemoryUtil.java:97)
   at org.lwjgl/org.lwjgl.system.Pointer$Default.<clinit>(Pointer.java:67)
   at org.lwjgl/org.lwjgl.system.Callback.<clinit>(Callback.java:41)
   at newmodule/newpackage.NewClass.init(NewClass.java:46)
   at newmodule/newpackage.NewClass.run(NewClass.java:31)
   at newmodule/newpackage.NewClass.main(NewClass.java:121)
C:\Users\waqas\AppData\Local\NetBeans\Cache\11.3\executor-snippets\run.xml:111: The following error occurred while executing this line:
C:\Users\waqas\AppData\Local\NetBeans\Cache\11.3\executor-snippets\run.xml:40: Java returned: 1
BUILD FAILED (total time: 0 seconds)


12
Lightweight Java Gaming Library / LWJGL3 with no window
« Last post by hdonk on March 28, 2020, 14:25:46 »
Hi,
   I want to mix OpenGLES/LWJGL3 with Swing on Linux. This works fine on Windows, but due to the (well known?) issue with XWindows errors caused by Swing being caught by the nvidia egl stack and killing the application, I haven't yet succeeded.
   I've created a version of code that uses an FBO, but I can't find a way of using LWJGL3 to create an OpenGLES context without a window to then use the FBO. Even using a non-displayed window results in the errors just mentioned.
   Anyone have a solution for this please?
Cheers,
hdonk
13
Hi,
   I've put an example of this here: https://github.com/hdonk/lwjgl_vr_framework/tree/OpenGL
Cheers,
hdonk
14
Hello, if it's okay to do it here, I post this for looking for people who:

-Want to be involved in a 2D RPG game developing from scratch.
-Know that you can create a game by Unity, RPG maker etc. more easily, but still want to write it yourself in JAVA.
-Search for a team to work and learn together!
-Have some interesting, bizarre ideas or stories and want to make those a game.
-Watch Anime, or like to play Anime-influenced game!

I'm actually new to lwjgl or OpenGL , definitely not a pro,
but I have implemented some basic things for a game so far,
and now I want to find some fellows to work with,
if you are interested, contact me through this email : j9263178@gmail.com
we can discuss our vision about making game in detail,
then decide whether we can work together!

15
OpenGL / Can't get EasyFont render on my lwjgl3 game
« Last post by j9263178 on March 26, 2020, 12:24:25 »
The following demo works well on its own program
https://github.com/LWJGL/lwjgl3/blob/master/modules/samples/src/test/java/org/lwjgl/demo/stb/EasyFont.java
but I just can't get it draw in my game.
I copied from line 53 to line 63 (make it a draw() method) to my game loop , and put other things( like those in front of the while loop in original code) in a init() method,
Code: [Select]
    public void init(){
        ByteBuffer charBuffer = BufferUtils.createByteBuffer(text.length() * 270);

        int quads = stb_easy_font_print(0, 0, getText(), null, charBuffer);

        glEnableClientState(GL_VERTEX_ARRAY);
        glVertexPointer(2, GL_FLOAT, 16, charBuffer);

        glClearColor(43f / 255f, 43f / 255f, 43f / 255f, 0f); // BG color
        glColor3f(169f / 255f, 183f / 255f, 198f / 255f); // Text color

    }

    public void draw(){
        float scaleFactor = 1.0f + getScale() * 0.25f;

        glPushMatrix();
        // Zoom
        glScalef(scaleFactor, scaleFactor, 1f);
        // Scroll
        glTranslatef(4.0f, 4.0f - getLineOffset() * getFontHeight(), 0f);

        glDrawArrays(GL_QUADS, 0, quads * 4);

        glPopMatrix();

    }

but I just can't see any text in my game, is it because I am using a shader (I've tried unbind it but didn't work) or a camera (which relates to a "projection" Matrix4f uniform in shader) or a VBO?
or I need to to do some glEnable or glDisable stuff?
my game loop looks like this

Code: [Select]
glClear(GL_COLOR_BUFFER_BIT |GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
shader.bind();
mainCamera.getPosition().lerp(new Vector3f(0.64f*main.getPos().x,0.86f*main.getPos().y,0).mul(-1,new Vector3f()), 0.07f);
onEntitiesDraw();
input.update();
EasyFont.draw();  //much the same as in the while loop of original code
glfwSwapBuffers(window);
glfwPollEvents();
16
Lightweight Java Gaming Library / Re: Project panama
« Last post by tlf30 on March 24, 2020, 16:39:18 »
Thank you for the update!
I see that JDK14 is finally out... (for better or worse) I need to start looking into what they broke this time around. It looks like improvements have been made to gc though.

I guess we will not see the Panama project for a while then. Which is unfortunate, it would be great to get C++ support in LWJGL.

Anyways, thanks again for the update, you are much more in the loop on the project status than anyone else I have talked to.

~Trevor
17
Vulkan / Re: Vulkan UBO management -
« Last post by abcdef on March 20, 2020, 12:43:50 »
UBO's are updated as soon as you update the buffer memory, when drawing you record commands then pass them to the GPU to execute. I would guess you have a loop where you update the UBO then draw a mesh and you repeat this x times. The thing is the commands aren't executed till the end so I you are probably always getting the last UBO value. This is a big mindset change compared to opengl.

Just a guess on my part but i had a similar issue myself
18
OpenGL / EGL + Wayland woes
« Last post by Aisaaax on March 20, 2020, 11:48:47 »
Hi there!

I've been tasked on running my 3d modules under wayland, and I'm running into problems.

The way I'm currently doing stuff, is taking AWT Canvas, getting the DrawingSurface from it, and from that I can get Display and Native Window components.
I can then use EGL to connect those components and GLES, and create a context.

Here's a small code snippet:

Code: [Select]
this.ds = JAWT_GetDrawingSurface(canvas, awt.GetDrawingSurface());
JAWTDrawingSurfaceInfo dsi = JAWT_DrawingSurface_GetDrawingSurfaceInfo(ds, ds.GetDrawingSurfaceInfo());

JAWTX11DrawingSurfaceInfo dsiWin = JAWTX11DrawingSurfaceInfo.create(dsi.platformInfo());

int depth = dsiWin.depth();
long display = dsiWin.display();
long drawable = dsiWin.drawable();

// convert JAWT display handle into EGL display.
eglDisplay = eglGetDisplay(display);
I want to stress that everything until the last line works fine. Everything is set up as it should be, and the handles all seem good and well.

I run into a bit of a snag on the last line.
Here's the thing. It works fine on Desktop Linux PC. It works fine on ARM Debian machine. It seems to work fine on the Wayland ARM machine...
Only it returns Display = 0.
At the same time, it returns EGL_SUCCESS as the error code! So EGL basically thinks that everything went well, only display handle address is 0, which is unusable, obviously.

Because the display is 0, when I get to eglInitialize() - I get null pointer exception.

Another funny thing - I can get past that point if I do this:
Code: [Select]
eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
It works fine, it initializes EGL, it even finds frameBuffers and creates EGL capabilities.
It even creates the context just fine!
But then I need to get SURFACE, and for that I need Native Window, and obviously my Default Display that I used and the drawable that I got from JAWT - are incompatible. Bummer.

Any tips?
19
OpenGL / Re: glOrtho - invalid value?
« Last post by VarenytsiaMykhailo on March 20, 2020, 10:41:36 »
When I write glOrtho(0.0, 800.0, 0.0, 600.0, 1.0, 1.0) I get an invalid value exception. And I only get it when I assign near and far the same value. However I've done this before and never noticed any errors :/

However I've been doing OpenGL in both C/C++ and Java, so it's possible I have totally missed this error because I have mostly used C/C++ and been bad at checking for errors. But still it's kind of odd, since my OpenGL reference says that gluOrtho2D is the same as glOrtho with near and far plane set to 1. So it should work right?

You need to add one minus for zNear of zFar)
20
I've moved from using ANGLE to using Mali's emulator, so moved from using DirectX to using OpenGL as the underlying renderer. From this I suspect that there's an issue with textures generated from lwjgl's GLES code, but I can't prove it. About the only way of doing that would be to write a test app in C & GLES and to straight to OpenVR from there. I might try and get around to doing that test sometime. :)
So in the meantime, I'll keep doing my development in OpenGL, but try to limit myself to ES functionality.
Pages: 1 [2] 3 4 ... 10