Rick Posted July 29, 2010 Share Posted July 29, 2010 So I'm trying to create another world along side framework and I'm wondering if I'm doing some things correctly in the C# library. I'm also using Klepto's control. Inside the controls init event I create my world, and it's camera, set that to the current world, then load a mesh. Then set it back to the main layers world. topWorld = new World(); Leadwerks.World.Current = topWorld; topCamera = new Camera(); // load model xAxis = Mesh.Load("abstract::x_red.gmf"); xAxis.Position = new Vector3(0, 0, 0); Leadwerks.World.Current = Leadwerks.Framework.Layers.Main.World; In AfterRender I switch the current world to the top world, set that camera's matrix to the main layers camera matrix, clear the depth buffer to what I assume would be the currently selected buffer, render the world, then set the current world back. All this results in nothing being displayed on the screen. What am I missing? If I take all the extra world stuff out and just load the mesh in the main layers world I see the mesh. Quote Link to comment Share on other sites More sharing options...
Canardia Posted July 29, 2010 Share Posted July 29, 2010 You don't need another world, just put the 3D GUI objects near to the camera. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Rick Posted July 29, 2010 Author Share Posted July 29, 2010 This isn't just for 3D, it's also for moving axis controls on selected models in an editor. I'm using 3D models for these axis controls and they need to be drawn on top always. Either way, I'm looking for this effect. Also putting them in a non always on top world could lead to issues. I have to worry about models coming between the planes and my camera, I have to worry about lighting in whatever world they exist in, and I wouldn't want post processing effects to be on the GUI controls. Quote Link to comment Share on other sites More sharing options...
TylerH Posted July 30, 2010 Share Posted July 30, 2010 Wait until right before your flip commands, set the world, render it, set back. Quote nVidia 530M Intel Core i7 - 2.3Ghz 8GB DDR3 RAM Windows 7 Ultimate (64x)----- Visual Studio 2010 Ultimate Google Chrome Creative Suite 5 FL Studio 10 Office 15 ----- Expert Professional Expert BMX Programmer ----- Link to comment Share on other sites More sharing options...
Rick Posted July 30, 2010 Author Share Posted July 30, 2010 When I did this in C w/o the framework it seemed I had to also do CameraClearMode(topCamera, BUFFER_DEPTH); with my topCamera and then it worked. Now I have to test with a normal C# program to see if that works, and if that works I then need to figure out how to get it to work with kelpto's control because currently it's not working. Quote Link to comment Share on other sites More sharing options...
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.