OpenGL or Direct3D for a new Windows game project? Or something else?

后端 未结 15 1527
小鲜肉
小鲜肉 2021-02-14 16:22

I\'m starting a hobby game project on Windows that will make heavy use of 3D graphics effects. It will most likely be written in C++.

Should I use OpenGL or Direct3D for

相关标签:
15条回答
  • 2021-02-14 17:09

    You could also base your work on ogre they provide the abstraction themselves and they have really nice tools. Since this is a projects that's been around for over 6 years I think. The base library is not really for beginners since you need to know a bit about software design, but I found a lot of people that have written games using it.

    It would be safer and quicker than learning the heavier stuff since it's already been abstracted. Plus after a couple of month you'll be talking 3D jargon anyways. There is also a book to get you started with Ogre, I think it's kinda old by now but a starting point anyways.

    0 讨论(0)
  • 2021-02-14 17:09

    Best thing to do would be to abstract over your renderer as much as possible, to make porting to the other technology as painless as possible.

    0 讨论(0)
  • 2021-02-14 17:13

    I really agree with those telling you to learn Ogre3D. You said you'd use C++, so Ogre3D is a great choice. XNA uses C# and you'd have to learn the differences between it and C++, apart from learning the very XNA. Also XNA is neither Open Source nor cross platform, so if you wanna have a wider knowledge about game development, I'd suggest first learning SDL, and then Ogre3D.

    0 讨论(0)
  • 2021-02-14 17:17

    While OpenGL is by far easy to start with and as some people already wrote - getting a triangle to show on screen and from there move to textures, particles and more can be done within a day.

    I do however think that a good question to ask is what is your final goal.
    If it is a simple game, no skeletal animation, and simple 3D - OpenGL is definitely the answer. If you aim way higher and don't want to put the time in developing all the technology from scratch (or go hunting for free libraries and putting all together) then DX is a good choice, I would go for DX9c until DX11 comes out.

    If you don't mind messing with other languages other than C++ you should also take a look at the XNA development environment - it became quite mature and good.

    Just as well, using an already existing engine is good if you know that it'll give you most of what you need, for the right price and will save you the time to develop it yourself, the main problem is that you'd need to go over several game engines (Ogre, Game Studio, Torque, etc..) and then make your choice based on limited experience - read as many reviews from casual developers as you can before you proceed, and try to take a look at the code if you intend to change it.

    Hope it helped.

    0 讨论(0)
  • 2021-02-14 17:17

    You must remember that DirectX is a collection of technologies - Input, Audio and Graphics. However to most people DX is synonymous with the renderer.

    In my opinion D3D (or DirectGraphics) has not really been that hard since DX8. I have not tried DX9 or DX10.

    Bernard is right - try to abstract as much as possible. Try to keep DX or OGL calls outside your object classes.

    0 讨论(0)
  • 2021-02-14 17:17

    The thing you should consider is the decision of platform independence. Do you want to tie your game to Windows, or would you like to release it to Mac OS X or Linux at some point. If you decide that you want to support Linux, OS X in the future, you will need to use OpenGL.

    There seems to be a lot of goodwill by the Linux community if the game is at least semi-released for Linux.

    0 讨论(0)
提交回复
热议问题