Advertisement

GWEN + My game = crash

Started by October 05, 2012 12:56 AM
0 comments, last by ic0de 12 years, 1 month ago
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:


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


I set gwen up like so:


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


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.
problem went away after I updated to the SVN version of gwen and changed my setup code to this:


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

This topic is closed to new replies.

Advertisement