Jump to content

elcoo

Members
  • Posts

    31
  • Joined

  • Last visited

Everything posted by elcoo

  1. I guess the GTX680 is that kind of a gfx card you call a beast. Disabeling HDR via SetHDR(0) gave a performance boost of 100 FPS, but still isn't that high as in the precompiled exe. Are there some more options, like Antialiasing or Anistropic filters, that are set higher in the framework maybe? Btw, I did some mass physics tests, with instancing and so on and I have to say I'm pretty impressed by the overall performance of Leadwerks. Guess I'll stick to it
  2. Argl, I found the fault. I used ScaleEntity on the ground, instead of initializing it with the right size. It's so typical for me - After trying around for an hour and not finding the error I post a thread about it and immidiatly find the cause
  3. And another thread by me, sorry about that I played around with physics a bit and I got this weird problem in the following code: // ==================================================================== // This file was generated by LEBuilder // http://leadwerks.com/werkspace // ==================================================================== #include "engine.h" #include <iostream> #include <string> #define LW_SSAO const int ScreenWidth = 1024; const int ScreenHeight = 768; const char* MediaDir = "C:/Program Files/Leadwerks Engine SDK"; const char* AppTitle = "LeadwerksTest"; void createPSphere(float,float,float,TMaterial); void ErrOut( const std::string& message ) { std::cerr << message << std::endl; } // ------------------------------- int main( int argn, char* argv[] ) { // Initialize if( !Initialize() ) return 1; SetAppTitle( AppTitle ) ; RegisterAbstractPath( MediaDir ); // Set graphics mode if( !Graphics(ScreenWidth,ScreenHeight) ) { ErrOut( "Failed to set graphics mode." ); return 1; } // Create framework object and set it to a global object so other scripts can access it TFramework fw = CreateFramework(); if( fw == NULL ) { ErrOut( "Failed to initialize engine." ); return 1; } // Set Lua framework object SetGlobalObject( "fw", fw ); // Set Lua framework variable BP lua = GetLuaState(); lua_pushobject( lua, fw ); lua_setglobal( lua, "fw" ); lua_pop( lua, 1 ); // Get framework main camera TCamera camera = GetLayerCamera( GetFrameworkLayer(0) ); PositionEntity( camera, Vec3(2,2,-10) ); // Create cube TMaterial material = LoadMaterial( "abstract::cobblestones.mat" ); Collisions(1,1,1); TMesh mesh2 = CreateSphere(4); PaintEntity( mesh2, material ); TBody body2=CreateBodySphere(); EntityType(body2,1); EntityParent(mesh2,body2); SetBodyMass(body2,1); PositionEntity( body2, Vec3(0.01,10,0) ); SetBodyMassCenter(body2, Vec3(0,0,0)); TMesh mesh = CreateSphere(4); PaintEntity( mesh, material ); TBody body=CreateBodySphere(); EntityType(body,1); EntityParent(mesh,body); SetBodyMass(body,1); PositionEntity( body, Vec3(0,20,0) ); SetBodyMassCenter(body, Vec3(0,0,0)); // Create ground TMesh ground = CreateCube(); ScaleEntity( ground, Vec3(20,1,20) ); PositionEntity( ground, Vec3(0,-1.4,0) ); PaintEntity( ground, material ); body=CreateBodyBox(); ScaleEntity( body, Vec3(20,1,20) ); PositionEntity( body, Vec3(0,-1.4,0) ); EntityType(body,1); SetBodyMass(body,0); // Add some light TLight light = CreateDirectionalLight(); RotateEntity( light, Vec3(45,45,45) ); SetShadowSoftness( light, 50); // DebugPhysics(1); while( !KeyHit() && !AppTerminate() ) { if( !AppSuspended() ) { UpdateFramework(); RenderFramework(); Flip( 0 ); } } return Terminate(); } It's based on the spinning cube template. The problem is, that "body2" with the small offset of 0.01 in the x-coord just falls through the ground. It seems the spheres can only collide with the ground when they are perfectly placed in the middle of it. It works fine when using box-colliders though. What am I doing wrong?
  4. I also tried starting it directly - No difference. It could be because of the HDR. I'm gonna check that one out.
  5. the 1200 FPS is in Release mode, in debug it's around 1000 fps.
  6. Hey guys, I'm new to Leadwerks and I just downloaded the evaluation kit. So I created the "Spinning Cube" project with the LEbuilder and compiled it in VS 2010. It works and looks the same as the one that's included in the SDK. However it "only" runs with 1200 FPS, while the one comming with the SDK (Engine.exe) runs at 1800 FPS on the same resolution. I know that its hard to compare FPS when they are this high, but the difference is just soo obvious. How does this come?
×
×
  • Create New...