PDA

View Full Version : Open GL and Direct X?


705
10-30-2006, 02:00 AM
Hi guys...
I a computer science student and planning to learn how to develop a game.
I got a few newbie questions about game development.
1. What is Open GL? What is direct X? Are they different?
2. Why most game (I know) used direct X?
3. If I want to learn how to make a Direct X based game, what should I learn?
4. Is it right to learn C++ for game programming? Are there any other language I should know?
5. I've got a lot of OpenGL Source, but having trouble finding a Direct X source. Any reference?

Thx for any reply...
sorry for bad english...:)

rakmaya
10-30-2006, 03:21 AM
Both OpenGL and DirectX are 3D libraries that handles the rendering and hardware side of things. Just use Google or pickup a DirectX book to learn DX.

You must know C++ if you are trying to get work in game programming. Game programming more or less revolves around the algorithms that has built over the past few years. Language is just secondary. But Learning C++ and having basic knowldge of Rendering and DX (or OGL) is essential.

You can also look at the game engines available to start of things. But I suggest you do that after you learn some basics.

There is no DX source. You can download the DX SDK from microsoft. It comes with everything you need to start of with. They pack some demos and tutorials in there too (... used to. I haven't looked at those folders in years).
You can also program in Managed C# or VB.NET. Either way, the basics related to game programming are the same in C++ or in other languages DX supports.

Good Luck

UrbanFuturistic
10-30-2006, 12:36 PM
Actually, DirectX handles a whole load of stuff including input (keyboard, mouse, joystick, etc), audio, 2D (DirectDraw) and 3D (Direct3D) graphics and, in 9.0c/10 will provide an API for physics (DirectPhysics) cards as well.

OpenGL does 2D and 3D graphics and nothing else.

Note that it is possible to do these things without either OpenGL or DirectX but they do make it a hell of a lot easier.

Personally I prefer a combination of OpenGL, SDL and OpenAL as it's nicely cross-platform.

705
10-31-2006, 01:56 AM
Personally I prefer a combination of OpenGL, SDL and OpenAL as it's nicely cross-platform.

Mac included?
Intresting....planning to code in mac too....

Another questions...
Is direct X supported by OS X?
Why most famous game(I know) used Direct X instead of OpenGL. What happened to OpenGL?
I'm corious about the 64-bit OS. Will the 64-bit OS affect my code?

thx 4 any reply
sorry 4 bad english...:)

ihsan
10-31-2006, 03:48 AM
I don't think there is any native support for Direct X on Mac. If compatability is a major concern then follow odubtaig and use OpenGL, SDL and OpenAL together.

UrbanFuturistic
10-31-2006, 11:12 AM
Mac included?Mac, Linux, some embedded systems. SDL also has limited support for audio at the moment but it's not very advanced.Is direct X supported by OS X?More accurately, 'is OS X supported by DirectX? ...and the answer is no. DirectX is Microsoft only and works on Windows or XBox/XBox360 only.Why most famous game(I know) used Direct X instead of OpenGL. What happened to OpenGL?Microsoft refuse to properly support OpenGL which can make it a bit of a pain sometimes but it hasn't stopped id Software or the guys who programmed Unreal Tournament and they both ported to Linux and OS X, using SDL in the case of the latter.I'm corious about the 64-bit OS. Will the 64-bit OS affect my code?Not unless you program 64Bit code. Hardly anyone uses 64Bit Windows and Linux has all the necessary compatability libs for most 32Bit software. Even in the case of Windows, there's a fair chance your 32Bit game will run. I'm not sure how it works with Apple as I haven't programmed anything for OS X myself. As it is, if you want a decent amount of performance and backwards compatability you should stick to 32Bit code.

mihkeltt
11-05-2006, 03:26 PM
if you're trying to develop a game on your own using DirectX, you can also use microsoft .Net and any compliant languages (C#, VB.net, J# etc). In this case, you need to download managed directx version from msdn (http://msdn.microsoft.com/directx/). using managed version frees you from all the memory management nessecary with c++. for resources and source code samples check out the msdn site and also www.gamedev.net (http://forums.cgsociety.org/www.gamedev.net).

mihkel

705
11-06-2006, 02:00 AM
if you're trying to develop a game on your own using DirectX, you can also use microsoft .Net and any compliant languages (C#, VB.net, J# etc).
Intresting...
Will using another language beside C++ affect the performance?
I do have a book about programming game with VB in .NET framework. Will it perform as good as the C++ game?

In this case, you need to download managed directx version from msdn (http://msdn.microsoft.com/directx/). using managed version frees you from all the memory management nessecary with c++. for resources and source code samples check out the msdn site and also www.gamedev.net (http://forums.cgsociety.org/www.gamedev.net).

mihkel

I thought a high performance games require us to do the memory managing manually.
Will it affect my performance?

thx 4 any reply
sorry 4 bad english

mihkeltt
11-06-2006, 09:03 AM
tests have been conducted showing only a 96-99% speed loss using managed directx instead of native directx.

mihkeltt
11-06-2006, 07:54 PM
ok, that came out wrong :), what i meant to say that it's only 96-99% the speed of native directx, meaning a 1-3% speed loss.

phonx
11-12-2006, 11:24 AM
go with opengl if you want to learn there are learning materials on the Internet and its cross platform even Mac OSX Gui is done with opengl.

opengl + SDL + openal as sucessed is great combinations.

If you want out of the box programming use python and pygame combinations instead.

CGTalk Moderation
11-12-2006, 11:24 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.