• Advertisement
Sign in to follow this  

XNA or OpenGL

This topic is 2770 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

XNA or OpenGL??

I studied XNA and learnt manual shaders to draw basic shapes and manipulate them.
But my friend told me that OpenGL has got more scope than XNA.

Shall I go for OpenGL now?
I am comfortable with C# and thus XNA. For OpenGL, would I have to learn VC++.
I know C++. I have created many small games in C++ BGI graphics. But I dont know to handle Windows in VC++.

Even somewhere I read that XNA games are simply crashes if they are not supplied with necessary resources (.Net and XNA).

What should I do now?
If OpenGL, do you have any material to start with?
From where to get OpenGL header and library files?
Please help me.

Thanks

Share this post


Link to post
Share on other sites
Advertisement
Visual Studio allows to build setup file, which will download and install XNA, .NET then install your game, so it won't crash. So it's not big problem.
With XNA you can make games for PC, XBox 360, and.. iPhone I think, or something, forgot sorry, but I think it has Pixel Shader 2 requirement for PCs (which is like geforce fx/4).
OpenGL will work on all OS: Windows, Mac, Linux (I think XNA doesn't)

There's enough of material for OpenGL and XNA even if you won't find anything, you have GameDev :)

Share this post


Link to post
Share on other sites
Ya! Setups can be created and it downloads the required softwares.

Doesn't XNA works on every OS??
Which OSs support XNA?
Different Companies may use different OS. So what will be the use of XNA in windows if company uses Linux or some other OS?

@Kunos! Please give me a brief explanation to stick with XNA.
Its simple. Is that the only reason?
I'm talking about the scope in terms of career.
Please help me.

Thanks

Share this post


Link to post
Share on other sites
Quote:
Original post by Shashwat
Ya! Setups can be created and it downloads the required softwares.

Doesn't XNA works on every OS??
Which OSs support XNA?
Different Companies may use different OS. So what will be the use of XNA in windows if company uses Linux or some other OS?

@Kunos! Please give me a brief explanation to stick with XNA.
Its simple. Is that the only reason?
I'm talking about the scope in terms of career.
Please help me.

Thanks


XNA works only on a handful of OS's, IIRC XNA uses DirectX down-core. So you'd only get Windows, XBOX and any other system that supports DirectX (perhaps some other consoles / mobile phones).

OpenGL, on the contrary, works on many OS's. All modern desktop OS's support OpenGL (Windows, Linux, Mac, Amiga, many phones (OpenGL ES etc)...), or a limited version.

DirectX seems to be used by all major companies at the moment, while OpenGL is mostly used for indie (small) or medium sized games. XNA is relatively new, it's a production tool, so if you want to know what is going on I suggest OpenGL/DirectX. If you want a game to be finished yesterday, I suggest XNA.

Share this post


Link to post
Share on other sites
Quote:
Original post by Shashwat
Ya! Setups can be created and it downloads the required softwares.

Doesn't XNA works on every OS??
Which OSs support XNA?
Different Companies may use different OS. So what will be the use of XNA in windows if company uses Linux or some other OS?

@Kunos! Please give me a brief explanation to stick with XNA.
Its simple. Is that the only reason?
I'm talking about the scope in terms of career.
Please help me.



The "company using Linux or other OS" argument is non existent.

My point is that, you say you have already experienced XNA. There is _NOTHING_ OpenGL can do that XNA cannot.
So any experience you will get by using XNA will worth in your future as graphics developer.

The "portable" argument for OpenGL is, also, non existent. First you'll need a recompile on the new host to make it work. Code for input, sound also will have to be using portable technologies (ie. OpenAL instead of XAudio2).

If I hire a developer and I had to choose between a guy that:

- Can draw triangles in XNA
- Can draw triangles in OpenGL in every OS on the planet
- Can draw triangles in DX9 - DX10 - DX11
- Can draw triangles in low level assembler
- Can draw triangles on an iPhone and iPad

and a guy that:

- Has a working game demo in ANY technology

I'd hire the second guy... who you want to be?


Share this post


Link to post
Share on other sites
Quote:
Original post by Shashwat

@Kunos! Please give me a brief explanation to stick with XNA.
Its simple. Is that the only reason?
I'm talking about the scope in terms of career.



In most cases, the only people who are going to hire you in a professional environment using XNA are companies that are developing games for XBox Live.

OpenGL is also not really used often in major game development companies but there are a lot of indie companies that use it.

Directx is by far the most used of the three for game development by major companies. I would say your safest bet is to learn Directx 10.

If you want a good introduction book to Directx 10 get:
Introduction to 3D Game Programming with DirectX 10 by Frank D. Luna

Share this post


Link to post
Share on other sites
You don't have to learn C++ to use OpenGL. You can use it with C# just fine through, e.g. OpenTK.

XNA is higher level, so you'll get stuff done easier, but you'll be limited to Windows and XBox. With OpenTK you can target Windows/Linux/Mac OS X and MonoTouch (if you limit yourself to the subset supported on the iPhone).

The choice is rather simple in the end: if you wish cross-platform support, use OpenGL, otherwise use XNA.

Share this post


Link to post
Share on other sites
Quote:
Original post by KBakerSR
OpenGL is also not really used often in major game development companies but there are a lot of indie companies that use it.


Actually OpenGL is used quite alot in major game development aswell, pretty much all Mac games use it. (and quite many of the major games do get mac releases aswell these days). Windows games tend not to use it since Intel has awful OpenGL support (compared to their D3D support), in general it doesn't really matter which one you learn though unless you:
1) Have or is targeting systems with intel integrated graphics in which case OpenGL is a bad idea. (unless you settle for OpenGL 2.0 with no extensions, but the same intel hardware tends to support DX10 which has far more features)
2) Target Mac and/or Linux in which case DirectX is a bad idea. (You can run DX9 software on Mac and Linux through wine or even make native builds using Winelib but its not really a perfect solution, and DX10/11 is still mostly unsupported)

With Windows having ~90% marketshare you really can't go completely wrong with DirectX.

Share this post


Link to post
Share on other sites
Without digging any deeper into this.. My suggestion is: Go with C# and XNA. Make a few simple games. Get a feel for it. If you run into things the C# and XNA can't handle, solve it yourself or take a look around for alternatives.

Share this post


Link to post
Share on other sites
Quote:
If you run into things the C# and XNA can't handle, solve it yourself or take a look around for alternatives.


What type of things are they?
XNA can do everything which OpenGL can? Are you talking about its platform independence?

Quote:
You don't have to learn C++ to use OpenGL. You can use it with C# just fine through, e.g. OpenTK.


What is OpenTK? I know C++ but not VC++.

Share this post


Link to post
Share on other sites
XNA is based on DirectX.
So, what is advantage of DirectX over OpenGL? Even it is not productive like XNA.

Share this post


Link to post
Share on other sites
Quote:
What is OpenTK?

Why don't you google it? First result.
Anyways if you are a beginner, you're learning and you don't have any especific reason to use OpenGL, IMO you should stick to the XNA with C# and DirectX.

Share this post


Link to post
Share on other sites
Quote:
Original post by Shashwat
XNA is based on DirectX.
So, what is advantage of DirectX over OpenGL? Even it is not productive like XNA.


Look, threads regarding "DX vs OpenGL" arguments can be found everywhere on the internet. They're mostly a waste of time. If you got lot of time to waste feel free to google and loose yourself into it for days.
They both are interfaces to talk to a video card, the same video card.. so they basically do the same things.
So it doesn't really matter what they do and how they do it, the difference is what YOU are going to do with those. They're tools to do a job.
Whatever tool you will learn, it'll make it easier for you to learn another one after that.

XNA is based on DX9. The reasons DX9 is still in use are:

- Most game companies have lots of existing libraries in C++. Going XNA would mean to give up all this backbone infrastructure. This is, usually a no no
- DX9 is the base for XBOX 360 development. XNA can be used to develop on the XBOX but performances are pretty bad at the moment, and, anyway, the same reason as above would apply

IMO, the "problem" with DX9 and OpenGL is that they have too much "past" and offer too many ways to do the same things... most of the time you'll find easy OpenGL tutorials using immediate mode but then you'll realise that's not what you need to make things go fast.
Same goes with DX9 that offers both a FFP and a shader-based pipeline.

XNA (and DX10/11) are modern takes on the problem and they offer ONE GOOD shader based approach to rendering that will give you good result and point you in the right direction regarding modern real time 3D application developing.

Anyhow, the worst thing you can do is to waste your time thinking "what is best?"... there is no best, just pick one and do stuff.

Share this post


Link to post
Share on other sites
Quote:
Anyhow, the worst thing you can do is to waste your time thinking "what is best?"... there is no best, just pick one and do stuff.


I'm not wasting time by asking this. I'm learning XNA side-by-side.

And thanks for your reply. Your explanation made it clear in my mind what to do.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement