Jump to content

Leadwerk Engine in a C# / WPF application


bholtzman
 Share

Recommended Posts

I've got a project that calls for embedding a 3d window into a C# / WPF application. I've looked around for ways to do this but I've got a few issues that I'm not sure how to address. I'd like to remove the border around the Leadwerks Engine while it's not in full screen. I'd also like to make the Leadwerks Engine window act as a pane in a multi pane application. So I'd like to be able to dock, undock and resize the engine window. One way to go is to have a blank pane and display Leadwerks Engine over it whenever the pane becomes visible.

 

Any help solving this would be greatly appreciated.

 

Thanks,

 

Ben Holtzman

Link to comment
Share on other sites

Not sure whether this works for windowed, but try,

 

Graphics(screenwidth,screenheight,32);

 

BTW why are you a dev if you have only posted once?

Win7 64bit, Leadwerks SDK 2.5, Visual Studio 2012, 3DWS, 3ds Max, Photoshop CS5.

 

 

 

Life is too short to remove USB safely.

Link to comment
Share on other sites

Ok, thanks for the suggestions, I'll try them out. Any idea how to go about grabbing the Leadwerks Engine window in c#? Managed code doesn't expose much in the way of pointers.

 

@DigitalHax: I've been a developer for years, but I normally don't have to ask questions, as I'm dealing with familiar technologies or technologies that I can easily figure out. However, in the case I'm asking about, I've no experience with Leadwerks Engine and trying to get it to work with C# / WPF. The documentation doesn't help in this respect either, and I can't just google the answer, so I need to ask for help.

 

Thanks guys!

  • Upvote 1
Link to comment
Share on other sites

You need at least a Control instead of the Full Window. Take the one suggested by Aggror or check mine included in here:

 

http://www.leadwerks.com/werkspace/files/file/242-extensions-for-lenet-including-samples/

 

Both controls are original for Windows.Forms so you have to wrap it into a WindowsFormsHost. But be aware, mixing Forms and WPF has multiple downsides. An alternative maybe sharpGL which has a native WPF OpenGL Control. I haven't tried it yet, but it may work.

 

Hope this helps. If not, feel free to contact me via PM.

  • Intel® Core™ i7-8550U @ 1.80 Ghz 
  • 16GB RAM 
  • INTEL UHD Graphics 620
  • Windows 10 Pro 64-Bit-Version
Link to comment
Share on other sites

Thanks klepto2. Your solution is really cool and I'd love to use it. But I see that both solutions are in really early stages of development and I need something robust that will not fail. So, at least for now, I'll have to switch to another engine, as I can't justify the risk to my project.

 

Thanks again all, I'll be excited to see how these projects and LE continues to grow.

 

Ben

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...