Jump to content

Official C# Support in 2.3


Darkworth
 Share

Recommended Posts

Hello, I just bought the 2.3 upgrade and had a quick question. The advertisements for 2.3 state that it now officially supports C#, yet I see no evidence of that in the SDK download anywhere. Is the "official" C# support for 2.3 still done via Ubu's header dll or is it something new?

 

Thanks in advance.

Link to comment
Share on other sites

Thanks. Ok I got that setup in a new C# project and am runnin ginto an error right off the bat.

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Leadwerks;

namespace LW_23_Test1
{
   public class Program
   {
       public static void Main(string[] args)
       {		
           // Initialize the graphics.
           Graphics.Initialize(800, 600);

           // Create a world. A world must be created before anything else.
           new World();

           // Create a camera.
       }
   }
}

 

The new world call,

 

new World();

 

is throwing an AccessViolationException saying:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

 

Here is the stack trace if it helps:

 

"   at Leadwerks.Core.CreateWorld()\r\n   at Leadwerks.World..ctor()\r\n   
at LW_23_Test1.Program.Main(String[] args) in C:\\Users\\TJames\\Documents\\Visual 
Studio 2008\\Projects\\LW_23_Test1\\LW_23_Test1\\Program.cs:line 17\r\n   
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)\r\n   
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, 
String[] args)\r\n   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()\r\n   
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)\r\n   
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback 
callback, Object state)\r\n   at System.Threading.ThreadHelper.ThreadStart()"

 

Any ideas on this one?

Link to comment
Share on other sites

Well, I'm testing the wrapper just now to use for my project (since I don't like C/C++ and love C#) with the 1.2 beta version downloadable from that thread and it doesn't occur any error. If you are on a x64 machine perhaps you should use x86 build configuration (building x64/AnyCPU configuration it raised some errors on my Windows 7 64-bit). I used the code from the "C# Getting started" page on wiki, only using 800x600 as resolution instead of 640x480 and creating a Windows Form Project instead of a Blank Solution (still you need to copy the DLLs, shaders.pak and Scripts from LE SDK folder to your build executable folder).

?? FRANCESCO CROCETTI ??

http://skaredcreations.com

Link to comment
Share on other sites

You should not love C#, but C++.

 

 

:)

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

You should not love C#, but C++.

Well I may love C++ when I will be enough forward in my training with it, but atm after almost 10 years of NET programming there is no comparable language as easy but powerful as NET... C++ is really too complex for me now, I must admit that it is really more powerful in term of performance etc but I still know too few about it to appreciate more. :)

?? FRANCESCO CROCETTI ??

http://skaredcreations.com

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...