cegui opengl template (glfw3.cpp) has exception

-1

I'm trying to compile and run the OpenGL template provided with CEGUI on CEGUI 0.8.7.

I've changed the code to just use this main block:

int main(int argc, char* argv[])

And by inserting an actual path here (not actually ...):

String ceguiDir = ".../cegui-0.8.7/"; DefaultResourceProvider* rp = static_cast(System::getSingleton().getResourceProvider()); rp->setResourceGroupDirectory("schemes", ceguiDir + "datafiles/schemes/"); rp->setResourceGroupDirectory("imagesets", ceguiDir + "datafiles/imagesets/"); rp->setResourceGroupDirectory("fonts", ceguiDir + "datafiles/fonts/"); rp->setResourceGroupDirectory("layouts", ceguiDir + "datafiles/layouts/"); rp->setResourceGroupDirectory("looknfeels", ceguiDir + "datafiles/looknfeel/"); rp->setResourceGroupDirectory("lua_scripts", ceguiDir + "datafiles/lua_scripts/"); rp->setResourceGroupDirectory("schemas", ceguiDir + "datafiles/xml_schemas/");

And I get an exception at the following line:

System::getSingleton().getDefaultGUIContext().injectTimePulse(time_elapsed);

Exception reads: "Exception thrown at 0x00007FF7DCC45ECB in playground.exe: 0xC0000005: Access violation reading location 0x0000006F00000051.".

I'm compiling on Visual Studio Express 2017 and I've included just about every lib I can find from CEGUI, not to mention a good number from some OpenGL tutorials I was working on (e.g. opengl32.lib glu32.lib):

  • CEGUIBase-0.lib
  • CEGUIOpenGLRenderer-0.lib
  • CEGUICoreWindowRendererSet.lib
  • CEGUIExpatParser.lib
  • CEGUICommonDialogs-0.lib
  • CEGUIDirect3D9Renderer-0.lib
  • CEGUIDirect3D11Renderer-0.lib
  • CEGUISILLYImageCodec.lib
  • D3DX11Effects.lib
  • freetype.lib
  • glew.lib
  • glfw.lib
  • jpeg.lib
  • libexpat.lib
  • libpng.lib
  • pcre.lib
  • SILLY.lib
  • zlib.lib

I kind of thought this template would just work out of the box. What am I missing?

c++
opengl
glfw
cegui
asked on Stack Overflow Aug 19, 2018 by Steve Miles • edited Aug 16, 2019 by genpfault

1 Answer

-1

Seems not a lib configuration error, but something not be initiated properly. Have you create the GUIContext by some code like this?

CEGUI::OpenGL3Renderer* gui_render = &(CEGUI::OpenGL3Renderer::bootstrapSystem());    
CEGUI::System::getSingleton().createGUIContext(gui_render->getDefaultRenderTarget());
answered on Stack Overflow Aug 15, 2019 by Denny

User contributions licensed under CC BY-SA 3.0