Shard Posted August 2, 2010 Share Posted August 2, 2010 So I am now officially moving to coding in C# and I tried to get Leadwerks to import into it but it didn't work Below is my code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Leadwerks; namespace N_Body.Source { static class Program { static void Main() { Framework.Initialize(true); Leadwerks.Framework.Update(); Leadwerks.Framework.Render(); } } } I included the Leadwerks.dll from the repository (as a reference). This is the result of the log file: Leadwerks Engine 2.40Initializing Renderer... OpenGL Version: GLSL Version: Render device: Vendor: Error: GLSL 1.20 is not supported. Please update your graphics drivers or replace your hardware. But Leadwerks programs in C++ works fine for me. Can anyone help me start up? Quote Programmer/Engineer/Student www.reikumar.com 2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM C++ - Visual Studio Express - Dark GDK - Leadwerks SDK Link to comment Share on other sites More sharing options...
klepto2 Posted August 2, 2010 Share Posted August 2, 2010 You need to copy the engine.dll, newton.dll, jointlibrary.dll, shader.pak and if you use scripting the whole Script Folder into the Output Folder of your app (both, debug and release) Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
Shard Posted August 2, 2010 Author Share Posted August 2, 2010 You need to copy the engine.dll, newton.dll, jointlibrary.dll, shader.pak and if you use scripting the whole Script Folder into the Output Folder of your app (both, debug and release) I did that and got the results above. Quote Programmer/Engineer/Student www.reikumar.com 2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM C++ - Visual Studio Express - Dark GDK - Leadwerks SDK Link to comment Share on other sites More sharing options...
klepto2 Posted August 2, 2010 Share Posted August 2, 2010 Which engine.dll do you use? If i remember correctly you need the 2.3 dlls and not the 2.4 dlls. Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
L B Posted August 2, 2010 Share Posted August 2, 2010 You didn't use Engine.Initialize before Framework.Initialize. You do not have a rendering loop with Graphics.Flip. You do not need to use the Leadwerks prefix if you import the using. static void Main() { Engine.Initialize(...); Framework.Initialize(); while (!Keyboard.KeyHit(Key.Escape)) { Framework.Update(); Framework.Render(); Graphics.Flip(); } Framework.Terminate(); Engine.Terminate(); } Quote Link to comment Share on other sites More sharing options...
Shard Posted August 3, 2010 Author Share Posted August 3, 2010 You didn't use Engine.Initialize before Framework.Initialize. You do not have a rendering loop with Graphics.Flip. You do not need to use the Leadwerks prefix if you import the using. static void Main() { Engine.Initialize(...); Framework.Initialize(); while (!Keyboard.KeyHit(Key.Escape)) { Framework.Update(); Framework.Render(); Graphics.Flip(); } Framework.Terminate(); Engine.Terminate(); } Thanks, but I did get an error: D:\Source Code Control\N Body\N Body\N Body\Source\Main.cs(13,20): error CS0117: 'Leadwerks.Engine' does not contain a definition for 'Initialize' At this Engine.Initialize(); Quote Programmer/Engineer/Student www.reikumar.com 2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM C++ - Visual Studio Express - Dark GDK - Leadwerks SDK Link to comment Share on other sites More sharing options...
ZioRed Posted August 3, 2010 Share Posted August 3, 2010 If you're using the 1.32.8 wrapper there is not Engine.Initialize, you should call Framework.Initialize after Graphics.Initialize (if you will get an error calling this, probably you're importing the System.Drawing using, in that case you can remove the using or prefix "Leadwerks."), watch the tutorial or download the templates (you need to overwrite the DLL after you save the solution in your project directory because the one shipped with the templates is before 1.32.8, they will be replaced with new versions as soon as the new stable wrapper has been released in the next weeks): Graphics.Initialize(800, 600); Framework.Initialize(true); FileSystem.AbstractPath = "C:/Leadwerks Engine SDK"; while (!Keyboard.KeyHit(Key.Escape) && !Window.HasRequestedClose()) { Framework.Update(); Framework.Render(); Graphics.Flip(); } Engine.Terminate(); Quote ?? FRANCESCO CROCETTI ?? http://skaredcreations.com Link to comment Share on other sites More sharing options...
L B Posted August 3, 2010 Share Posted August 3, 2010 Ah, whoops, I'm getting used to the new headers' syntax, in which it is "Engine.Initialize". 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.