Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

[Toolkit Desktop] Differrence between Game and GameWindowRenderer in forms #403

Closed
mgirlando opened this issue May 30, 2014 · 1 comment
Closed
Labels

Comments

@mgirlando
Copy link

Hi,
I have 3 problems to submit :
1- When you start normaly the app using program.Run(); then the game is well dimensionned but when you start it in a panel then the window size is not well initialized until first resizing. Strangely the gamewindowrenderer has not the problem.

2- in gamewindowrenderer the GraphicsDevice.BackBuffer is related to the parent game... Still Window is correctly assigned.

3- The most important : I have created to class (based on the vs2013 template) The first one is a Game and the second is a Gamewindowrenderer. They are identical (almost) and show that the model and primitive are not well rendered in the second (transparent).

I made a project that shows 1 and 3 (2 is obvious and can be seen in code) you can have here : http://www.mediafire.com/download/386uhrfeda787md/PB_GameWindowRenderer.rar

Best regards,
Michel Girlando

@mgirlando mgirlando changed the title Differrence between Game and GameWindowRenderer in forms [Toolkit Desktop] Differrence between Game and GameWindowRenderer in forms May 30, 2014
@mgirlando
Copy link
Author

I have a possible solution for the problem 1 :
I added a call to OnClientSizeChanged in GameWindowDesktop.cs in Run()

internal override void Run()
        {
            OnClientSizeChanged(null, null);  
#if NET35Plus
            if (wpfBorderControl != null)
            {
                StartWpfRenderLoop();
            }
            else
#endif
            {
                RunRenderLoop();
            }
        }

I know that it is noy very clean... It works ( for destop at least)
regards

@xoofx xoofx added the wontfix label Oct 31, 2014
@xoofx xoofx closed this as completed Oct 31, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants