Jump to content

ZeroByte

Members
  • Posts

    99
  • Joined

  • Last visited

Everything posted by ZeroByte

  1. Thank's Josh, it worked great. I converted it to use the Framewerk, but i can't get the blades to turn. Here is the code i'm using, with SetGlobalObject(); #include "framewerk.h" using namespace leadwerks; int main() { if(!Initialize())return 1; RegisterAbstractPath("C:/LE2.3"); SetAppTitle( "C++ Lua Demo" ) ; Graphics( 800, 600 ) ; AFilter() ; TFilter() ; TLight light; TMesh ground; TMaterial material; Framewerk fw; if( !fw.Create() ) { MessageBoxA(0,"Failed to initialize engine.",NULL,0); return 1; } //================================================================ // Here is the code I added //================================================================ SetGlobalObject("world_main",fw.GetMain().GetWorld()); LoadModel("abstract::windmill.gmf"); //================================================================ // //================================================================ fw.GetRenderer().SetSkybox( LoadMaterial("abstract::FullskiesBlueClear0016_2_L.mat") ); fw.GetRenderer().SetSSAO(0); fw.SetStats(2); PositionEntity(fw.GetMain().GetCamera(),Vec3(0,8,-22)); material = LoadMaterial("abstract::cobblestones.mat"); ground = CreateCube(); ScaleEntity ( ground, Vec3(12, 1, 12)); PositionEntity( ground, Vec3(0, -1, 0)); PaintEntity ( ground, material ); light=CreateDirectionalLight(); RotateEntity( light, Vec3(45) ); // Game loop do { if( KeyHit(KEY_ESCAPE) ) break; if( AppTerminate() ) break; // Update timing and world //UpdateAppTime(); //UpdateWorld(AppSpeed()) ; // Render fw.Update(); fw.Render(); // Send to screen Flip(0) ; } while( true ); // Done return Terminate() ; } Is it possible to use Lua with Framewerk ?
×
×
  • Create New...