Sign in to follow this  

GWEN + My game = crash

This topic is 1930 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So today I decided to try Gwen a lightweight gui api for games. I Set gwen up in my game and tried to render but it crashed, an access violation inside the library here:

[CODE]
void Base::Layout( Skin::Base* skin )
{
if ( skin->GetRender()->GetCTT() && ShouldCacheToTexture() )
skin->GetRender()->GetCTT()->CreateControlCacheTexture( this );
}
[/CODE]

I set gwen up like so:

[CODE]
Gwen::Renderer::coRenderer * pRenderer = new Gwen::Renderer::coRenderer(); //my custom renderer
Gwen::Skin::TexturedBase skin;
skin.SetRender( pRenderer );
skin.Init("DefaultSkin.png");
pCanvas = new Gwen::Controls::Canvas( &skin );
pCanvas->SetSize( screen->w, screen->h );
[/CODE]

Right now I'm using a custom renderer based on the opengl renderer, I also tried using the stock opengl renderer and I had the same issue. anybody here used Gwen before? Anybody know what's wrong?

thanks in advance.

Share this post


Link to post
Share on other sites
problem went away after I updated to the SVN version of gwen and changed my setup code to this:

[CODE]
Gwen::Renderer::coRenderer * pRenderer = new Gwen::Renderer::coRenderer();
Gwen::Skin::TexturedBase* pSkin = new Gwen::Skin::TexturedBase( pRenderer );
pSkin->Init("DefaultSkin.png");
pCanvas = new Gwen::Controls::Canvas( pSkin );
pCanvas->SetSize( screen->w, screen->h );
[/CODE]

Share this post


Link to post
Share on other sites
Sign in to follow this