Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML and LWJGL strange bug  (Read 4360 times)

0 Members and 1 Guest are viewing this topic.


  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
SFML and LWJGL strange bug
« on: December 02, 2013, 04:29:28 am »
I'm getting a strange bug with this.  No errors, it just isn't doing what it's supposed to do
What happens when run is that the red overtakes the entire OpenGL area until it's >=2 coords away.

Source attached as zip.


  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
Re: SFML and LWJGL strange bug
« Reply #1 on: December 03, 2013, 09:10:35 am »
I'd love to give you an answer, but for now, I can't. :-\ LWJGL support has not really been researched too much yet - the last time I tried it, I didn't see a thing. Therefore, cool to see anything working with LWJGL and JSFML at all!

I tried your FPSCamera's strafing methods and those work fine, so I assume there is something wrong with the depth buffer. Clipping occurs way too quickly despite the settings applied by gluPerspective. You didn't give any context settings to your render window, therefore the context is initialized with zero depth buffer bits. However, passing one with forced depth buffer bits didn't do the trick:

ContextSettings contextSettings = new ContextSettings(8, 0, 0, 2, 0); //8 depth bits, rest is default
RenderWindow win = new RenderWindow(new VideoMode(800, 600), "SFML Game", WindowStyle.DEFAULT, contextSettings);

I will have to sit down at some point and investigate. If you happen to find out something, it would be great if you shared the info.
JSFML - The Java binding to SFML.