Hello Guest

Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
Lightweight Java Gaming Library / Re: 3D First Person Frame Rate Issues
« Last post by GhostAssasin105 on September 12, 2018, 03:21:36 »
It's probably not a good idea to call Mouse.setGrabbed(true) in your game everytime you move the mouse.

Thanks, this helped, but still dropping frames whenever the mouse is moved.
22
Lightweight Java Gaming Library / Re: 3D First Person Frame Rate Issues
« Last post by KaiHH on September 11, 2018, 20:04:35 »
It's probably not a good idea to call Mouse.setGrabbed(true) in your game everytime you move the mouse.
23
Lightweight Java Gaming Library / 3D First Person Frame Rate Issues
« Last post by GhostAssasin105 on September 11, 2018, 19:18:46 »
Hi,

I'm currently coding a 3D game in lwjgl 2, and have a problem with my frame rate. I have a key based system of moving the camera, and a mouse based system of looking around, each contained in separate methods. Whenever I move the camera, the game runs at 60fps, however, when I move the mouse to look around, the frame rate drops until I stop moving the mouse.

The look around code:

Code: [Select]
public void moveMouse(Camera cam) {
int dx = Mouse.getDX();
    int dy = Mouse.getDY();
   
if(inMenu == false) {
Mouse.setGrabbed(true);
    cam.yaw(dx * 0.05f);
    cam.pitch(dy * -0.05f);
} else {
Mouse.setGrabbed(false);
}
}

and the player movement code:

Code: [Select]
if (Keyboard.isKeyDown(Keyboard.KEY_W))
        {
            camera.walkForward(movementSpeed*dt);
        }
        if (Keyboard.isKeyDown(Keyboard.KEY_S))
        {
            camera.walkBackwards(movementSpeed*dt);
        }
        if (Keyboard.isKeyDown(Keyboard.KEY_A))
        {
            camera.strafeLeft(movementSpeed*dt);
        }
        if (Keyboard.isKeyDown(Keyboard.KEY_D))
        {
            camera.strafeRight(movementSpeed*dt);
        }
        if (Keyboard.isKeyDown(Keyboard.KEY_E))
        {
        camera.rollLeft(0.5f*dt);
        }

*I'm trying to reveal as little code as possible as I plan to market this game in the near future.

Hope I provided enough evidence. Thanks in advance!
24
Bug Reports / RFE / Re: VRTrackedCamera NullPointerException
« Last post by spasi on September 10, 2018, 08:20:05 »
Thanks, will be fixed in the next 3.2.1 snapshot. In the meantime, a workaround is to use nVRTrackedCamera_GetVideoStreamFrameBuffer instead.
25
Bug Reports / RFE / Re: VRTrackedCamera NullPointerException
« Last post by neph on September 10, 2018, 07:59:47 »
Hello again.

Another issue (but the title is still correct), and I think it's a real one, this time.

I'm supposed to be able to send a null frameBuffer to
Code: [Select]
VRTrackedCamera_GetVideoStreamFrameBuffer to check if there's a new frame available.

Ref:

Quote
A caller can provide null for the framebuffer or frameheader if not desired.

However, this yiels a NPE:

Code: [Select]
java.lang.NullPointerException
at org.lwjgl.system.MemoryUtil.memAddress(MemoryUtil.java:646)
at org.lwjgl.openvr.VRTrackedCamera.VRTrackedCamera_GetVideoStreamFrameBuffer(VRTrackedCamera.java:190)

More specifically:

Code: [Select]
memAddress(pFrameBuffer)
Workaround:
Call
Code: [Select]
VRTrackedCamera.nVRTrackedCamera_GetVideoStreamFrameBuffer directly

Should I report this on github?

26
Bug Reports / RFE / Re: VRTrackedCamera NullPointerException
« Last post by neph on September 10, 2018, 06:13:10 »
It seems that opting out of the beta and reinstalling SteamVR solved the issue.

Thanks for the help.

27
Bug Reports / RFE / Re: VRTrackedCamera NullPointerException
« Last post by spasi on September 10, 2018, 05:51:32 »
Yes, that's the error. Sounds like SteamVR is broken on your system somehow, try re-installing it. The check code above is basically what LWJGL uses to retrieve the OpenVR function pointers, the bindings can't work if it fails.
28
Bug Reports / RFE / Re: VRTrackedCamera NullPointerException
« Last post by neph on September 10, 2018, 05:26:57 »
Thanks, and sorry for the late reply.

The only error I get with that code is:

Code: [Select]
Failed to retrieve IVRTrackedCamera_003. Error: 105
Is it this error it's refering to?

Code: [Select]
EVRInitError_VRInitError_Init_InterfaceNotFound = 105
29
OpenGL / LWJGL Maven Build
« Last post by _overflow_ on September 08, 2018, 11:03:37 »
Hello all!

I am trying to build an application using Maven in order to do this I have copied the pom.xml generated from https://www.lwjgl.org/customize.
All compile like a charm and the .jar is created but when I execute it the following error message appears "Error starting bundle.
org.osgi.framework.BundleException: Unable to resolve com.test.appliction [100](R 100.0): missing requirement osgi.wiring.package; (&(osgi.wiring.package=org.lwjgl)(version>=3.2.0)(!(version>=4.0.0)))".


Can anyone help me?

Thank you in advance.
30
JOML / Re: intersection between the camera and xy plane
« Last post by relaxslow on September 06, 2018, 12:28:36 »
Thank you for detailed explain. So now I know I don't need ray trace calculation anymore . because I use ortho project whose  bottom and right are exactly the same as the canvas height and width.
Pages: 1 2 [3] 4 5 ... 10