Gabriel Posted December 18, 2011 Posted December 18, 2011 Hello, I have crash with the Night and Day script with in C++ When I incorporate in the editor, no propbleme it works and I save my file SBX. Then I make a LoadScene it works, but after a RenderFrameWork I get an error "access violation":/ Any idea? thank you Gabriel m_pEngine = new LEO::Engine("Montana",ScreenWidth , ScreenHeight); m_pFrameWork = new LEO::Framework(); BP L = GetLuaState(); SetGlobalObject( "fw",(TEntity)m_pFrameWork); BP lua = GetLuaState(); lua_pushobject( lua, (TEntity)m_pFrameWork); lua_setglobal( lua, "fw" ); lua_pop( lua, 1 ); m_scene = LE::LoadScene(FileName.c_str()); SetHDR(1); SetSSAO(1); SetBloom(1); SetAntialias(1); SetShadowQuality(1); SetTextureQuality(1); OcclusionCulling(1); while(!KeyHit(KEY_ESCAPE)) { m_pFrameWork->Update(); m_pFrameWork->Render(); <-- crash when calling Render Flip(0); } Quote
DaDonik Posted December 18, 2011 Posted December 18, 2011 Try setting the framework effects after you rendered once. I think i had some problem with that, too. Like: m_pEngine = new LEO::Engine("Montana",ScreenWidth , ScreenHeight); m_pFrameWork = new LEO::Framework(); BP L = GetLuaState(); SetGlobalObject( "fw",(TEntity)m_pFrameWork); BP lua = GetLuaState(); lua_pushobject( lua, (TEntity)m_pFrameWork); lua_setglobal( lua, "fw" ); lua_pop( lua, 1 ); m_scene = LE::LoadScene(FileName.c_str()); while(!KeyHit(KEY_ESCAPE)) { if (KeyHit(KEY_G)) { SetHDR(1); SetSSAO(1); SetBloom(1); SetAntialias(1); SetShadowQuality(1); SetTextureQuality(1); OcclusionCulling(1); } m_pFrameWork->Update(); m_pFrameWork->Render(); <-- crash when calling Render Flip(0); } Quote (Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI)
Gabriel Posted December 18, 2011 Author Posted December 18, 2011 thank you, I tried so much, that I was wrong not to FrameWorkRender, but LoadScene (sorry for the mistake) Again, thank you, but I would hold that solution if I have this problem. thank you Someone try the Might & Day 1.3 with C++ ? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.