diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2018-03-27 22:42:57 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2018-03-27 22:42:57 -0400 |
| commit | 6cf098e3450ba99c238cf0499c6cecaa246f4d50 (patch) | |
| tree | 175b84e32a3cf24f3fb7356825827f6611bab1ed /src/client/main.cpp | |
| parent | 2831e232b886c5e3b0791ea5192f9e5194e6abf3 (diff) | |
| download | brokengine-6cf098e3450ba99c238cf0499c6cecaa246f4d50.tar.gz brokengine-6cf098e3450ba99c238cf0499c6cecaa246f4d50.tar.bz2 brokengine-6cf098e3450ba99c238cf0499c6cecaa246f4d50.zip | |
Fixed the procedural textures
Procedural textures are now completely working.
Diffstat (limited to 'src/client/main.cpp')
| -rw-r--r-- | src/client/main.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/client/main.cpp b/src/client/main.cpp index 54aafc0..fbe707b 100644 --- a/src/client/main.cpp +++ b/src/client/main.cpp @@ -98,6 +98,16 @@ void UpdateElement(btRigidBody* TObject){ } +SColor background = SColor(255,100,101,140); + +//setbackgroundcolor(r,g,b) +int setbackgroundcolor(lua_State* L){ + long r,g,b; + popvector3i(L,&r,&g,&b); + background = SColor(255,r,g,b); + return 0; +} + int main(int argc, char *argv[]){ printf("Brok[en]gine Client"); // Initialize bullet @@ -140,6 +150,10 @@ int main(int argc, char *argv[]){ //u32 TimeStamp = irrTimer->getTime(), DeltaTime = 0; //high_resolution_clock::time_point t1 = high_resolution_clock::now(); + lua_getglobal(L,"GAME"); + lua_pushcfunction(L,setbackgroundcolor); + lua_setfield(L,-2,"setbackgroundcolor"); + lua_pop(L,1); while(device->run()){ gameloop_net(L); gameloop_phys(UpdateElement); @@ -149,7 +163,7 @@ int main(int argc, char *argv[]){ //double steps = delta.count() * 100; //UpdatePhysics(steps,UpdateElement); //t1 = now; - driver->beginScene(true, true, SColor(255,100,101,140)); + driver->beginScene(true, true, background); smgr->drawAll(); guienv->drawAll(); driver->endScene(); |
