resizing FrameBuffer and shadows

Started by raft, March 12, 2013, 09:05:44 PM

Previous topic - Next topic

raft

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


reverse is also true. this is what I get by a resizing a higher resolution to 800x600


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 ???

raft

and this happens all the time in the same way. not undeterministic

EgonOlsen

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...


raft

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

EgonOlsen

Looks like some threading issue...i anything (logic, rendering, input processing...) done in another thread. Is Config.useMultipleThreads enabled?

raft

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)

EgonOlsen

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.

raft

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 :)

EgonOlsen


raft

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?



EgonOlsen

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?

raft

I guess no, I double checked it. GUI is based on TWL so all GUI events are handled in GL thread.

EgonOlsen

I've no idea what else might be the reason... ???