I faced another weird situation. if I resize FrameBuffer when shadows are on, size change isn't reflected. FrameBuffer.getWidth/Height returns the correct values but buffer is rendered as initial size.
this is what I get by resizing 800x600 to 1024x768
(http://s11.postimage.org/pivdovn9v/size_1.jpg)
reverse is also true. this is what I get by a resizing a higher resolution to 800x600
(http://s12.postimage.org/6zje01qn1/size_2.jpg)
If I disable shadows and resize screen again, everything seems ok. but after enabling shadows and resizing I end up with initial size.
I've updated my driver twice and even made a bios update.
and this is the sequence of rendering:
skyBox render / draw
clearZBuffer
world render/draw
shadowHelper.updateShadowMap
shadowHelper.drawScene
buffer update/display
really weird ???
and this happens all the time in the same way. not undeterministic
I see...i think i found the reason for this, i just can't figure out why the code does what it does...give me some minutes...
Please try this jar: http://jpct.de/download/beta/jpct.jar (http://jpct.de/download/beta/jpct.jar)
thanks, yes resizing is fixed now :)
however I have another weird problem. please see the video below. sometimes happens after resizing when shadows are enabled.
http://aptalkarga.com/tmp/weird-1.avi (http://aptalkarga.com/tmp/weird-1.avi)
Looks like some threading issue...i anything (logic, rendering, input processing...) done in another thread. Is Config.useMultipleThreads enabled?
Quote from: EgonOlsen on March 13, 2013, 07:17:55 AM
Is Config.useMultipleThreads enabled?
not exclusively. it is left as default which is false I suppose (not in javadocs)
Yes, default is false.
Why are you actually doing this:
world render/draw
shadowHelper.updateShadowMap
shadowHelper.drawScene
? The shadowHelper.drawScene replaces the world render/draw calls. Try to remove that world render/draw part and see if that helps.
Quote from: EgonOlsen on March 13, 2013, 07:38:10 AM
Why are you actually doing this:
because of being a shadows newbie I suppose. and not very clear in docs ???
Quote from: EgonOlsen on March 13, 2013, 07:38:10 AM
Try to remove that world render/draw part and see if that helps.
yes, seems as it helped. problem was undeterministic but never happened in last trials. thanks :)
Quote from: raft on March 13, 2013, 07:52:16 AM
...and not very clear in docs ???
I agree. I'll make this more clear.
Quote from: raft on March 13, 2013, 07:52:16 AM
Quote from: EgonOlsen on March 13, 2013, 07:38:10 AM
Try to remove that world render/draw part and see if that helps.
yes, seems as it helped. problem was undeterministic but never happened in last trials. thanks :)
although very seldom, I still have this issue. possibly driver problem or?
I'm not sure...i looked like as if the scene was rendered using a wrong camera/camera matrix. Are you by any chance doing something in another thread that modifies jPCT related instances like moving the camera in an event listener or something like that?
I guess no, I double checked it. GUI is based on TWL so all GUI events are handled in GL thread.
I've no idea what else might be the reason... ???