Artefacts after display.recreateWindow()

Hi folks,

I’m still fighting with being able to resize my game window. I call:



    private void reInitInGL() {

     

      display.recreateWindow(

            simulator.getWindowWidth(),

            simulator.getWindowHeight(),

            16,

            simulator.getFrameRate(),

            false);

        camera.resize(simulator.getWindowWidth(),simulator.getWindowHeight());

        initCameraView();

    }



With initCameraView() like:

    private void initCameraView(){

        /** Set up how our camera sees. /

       

        cameraPerspective();

        Vector3f loc = new Vector3f( 0.0f, 0.0f, 25.0f );

        Vector3f left = new Vector3f( -1.0f, 0.0f, 0.0f );

        Vector3f up = new Vector3f( 0.0f, 1.0f, 0.0f );

        Vector3f dir = new Vector3f( 0.0f, 0f, -1.0f );

        /
* Move our camera to a correct place and orientation. /

        camera.setFrame( loc, left, up, dir );

       

        /
* Signal that we’ve changed our camera’s location/frustum. /

        camera.update();

        /
* Assign the camera to this renderer. */

        display.getRenderer().setCamera( camera );       

    }



At least in WinXP the window is recreated without error (in contrast to Linux) but the rendering shows flickering borders in the increased area. In the picture below you see what I mean. Only the area with the gray background is rendered as expected but still has the same size as before (though the window is bigger). It looks like after resizing the new space is just filled with pixle junk.







Is there any additional ‘magic’ I could do? I already looked into the resizing example test code but couldn’t find any special trick there.



Greetings,

Marcus

OK, her might come an additional clue:

I found out that the corrupted pixels disappear if I minimize and restore the game window! In the awt world I would guess that something like a "revalidate()" or "doLayout()"  call could do this programatically, but the game window is probably something different.



Additionally I found out that it is important to call

TextureManager.clearCache() on closing the game window in order to have the textures displayed again after a game restart.



I've got a shutdown method that looks like:

protected void cleanup() {

        TextureManager.doTextureCleanup();

        TextureManager.clearCache();

        KeyInput.destroyIfInitalized();

        MouseInput.destroyIfInitalized();

        JoystickInput.destroyIfInitalized();

        getRootNode().detachAllChildren();

    }



Is there a chance that this canl be fixed in the near future? Or is there a way to hide / restore the window from within the game?