Sign in to follow this  

[.net] C# or Win32

This topic is 4867 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I am good @ C++ & Java and an average user with OpenGL. I am trying to emulate some OpenGL tutorials without using GLUT as I would like to gain experience in Microsoft environment. I donno Win32 or C#. Which is better to start and learn considering the future perspective of .NET? some ppl. say Win32 and some say, go for C# ~ charley

Share this post


Link to post
Share on other sites
I suggest learning C# with Windows Forms first. Win32's usefulness will be going out the windows eventually and C# has a MUCH lower learning curve.

Keeping what I said in mind, I think you should eventually also take a practice run with raw Win32 just so you know how to work with it. Even with Longhorn coming out, and with .NET, alot of code will still use Win32.

Share this post


Link to post
Share on other sites
Win32 and C# are two completely different things. Win32 is an API, C# is a language. The Windows forms you use through C# are just a layer on top of Win32, and there is nothing preventing you from using raw Win32 in C#.

Share this post


Link to post
Share on other sites
Quote:
Original post by Raloth
Win32 and C# are two completely different things. Win32 is an API, C# is a language. The Windows forms you use through C# are just a layer on top of Win32, and there is nothing preventing you from using raw Win32 in C#.


True, but using C# to act as a layer over the Win32 API is a lot faster than learning it from scratch. You can learn the details of the lower-level Win32 calls when you want/need to.

I'd start with C# and then delve into the win32 API as needed.

Share this post


Link to post
Share on other sites
I think win32 is mostly delegated for writing gui frameworks like MFC with. I use primarily MFC because it's easier to work with than win32 but I also must use some win32 for those things not in MFC. There's just not much sense to write a C centric gui app nor to mimick MFC with win32 and OO mechanism. .Net is also something to consider using as well. For speed I would go with C++/mfc or C++/.net otherwise C#/.net combo(ie. all managed). For engines I would use win32 because of low overhead. Also, if you try to do some exotic things then win32 is very flexible much more than MFC.

Share this post


Link to post
Share on other sites
If you're just doing an OpenGL engine (and you want to replace GLUT), definatly use win32 and avoid the overhead of C#, .NET and Windows Forms (also applies to MFC).

Grab some early NeHe tutorials and use them - they have the bare minimum of win32 stuff to get your window up on screen (basicly what GLUT does). Also check out the (newer, better) basecode once you're comfortable with the tutorial.

I would suggest the tiny ammount of win32 you need for this is eaiser (and has less overhead) than having to learn and use Windows Forms (or MFC).


The only reason you'd want to use Windows Forms is if you're actualy going to use the controls (like buttons, text entry fields, whatever). This might apply if you're going to be making a tool for your engine (level editor, perhaps). Getting OpenGL to work in Windows Forms isn't too hard, but it's not as easy as win32.


On my own project, my engine is unmanaged C++ using win32 and OpenGL, my editor is mixed managed and unmanaged C++ using Windows Forms and OpenGL. So I've tried both, and I wouldn't dream of having my engine anything other than win32. (and I wouldn't dream of using win32 for anything more complicated than a single window).


Of course, this dosn't say you couldn't do it in C# the language using win32, but as you already know C++, then I wouldn't worry about it (not to mention, with C# you'll have the overhead of .NET still).

Share this post


Link to post
Share on other sites

This topic is 4867 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this