Jump to content
  • Advertisement
Sign in to follow this  
snowfell

programming possibilitys

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

Hey, I was wondering what is a good C++ library or API to use to make a 3d game. I have 4 years of non-professional under my belt, so I decided that I needed to move up to a big boy language. I already know the basic to C++ and I tried a bit with opengl. I need to find a good library or something that can help me make a 3d engine without too much hassle.

Share this post


Link to post
Share on other sites
Advertisement
Well your choices are these:

- OpenGL
- DirectX
- Write your own.

Both OpenGL and DirectX are professional, top notch 3D APIs. You won't find anything else thats better. So pick one and go with it. I suggest OpenGL because its easy to learn.

Good Luck.

Share this post


Link to post
Share on other sites
Since you are concerned with hassle, why not go with an existing 3D engine instead of writing your own? Just use Google and the search feature here and you will find plenty of suggestions.

EDIT: (Posted at the same time as you...)
Quote:
Now when you say design your own what exactly do you mean by that? Is 3d possible directly from C++?

It's not feasible and was probably more of an alternative meant to show the beauty of the other options. I would assume you'd need extensive knowledge of assembly language or other very low level tasks, and it would definitely never compete with OpenGL or DirectX. Use one of those, or see what I posted above. Have you ever done any 2D API work in C++? That information might lead to a better suggestion of what you should do.

Share this post


Link to post
Share on other sites
Nope I have to make my own game engine. I could never use someone elses. What I mean by no hassle is that it a pretty straight forward programming API.

I have done a little work with opengl already, its ok but before I start anything big I would like to hear all my other options. Now when you say design your own what exactly do you mean by that? Is 3d possible directly from C++?

Share this post


Link to post
Share on other sites
If you want hardware accelerated 3D graphics then OpenGL and DirectX (and obviously anything built with them) are you only choices. Since it's hardware it's the vendors device drivers which actually execute your code; so you cannot get acceleration without something that each and every vendor supports in their hardware drivers. Rolling your own 3D language without OpenGL/DirectX would mean writing a separate custom driver for each card on the market; since the hardware specs are not public that's basically impossible.

-me

Share this post


Link to post
Share on other sites
Quote:

Nope I have to make my own game engine.

Read this.

Quote:

I could never use someone elses.

Why?

Quote:

I have done a little work with opengl already, its ok but before I start anything big I would like to hear all my other options. Now when you say design your own what exactly do you mean by that? Is 3d possible directly from C++?

Your realistic options are OpenGL and Direct3D. C++ itself has no graphics capabilities of any kind, you must use an external library. OpenGL and Direct3D are your only options for getting hardware acceleration on Windows. "Writing your own" 3D API would mean that you would be using software rasterization, which is quite slow. Writing your own 3D API from scratch is a fairly complicated undertaking -- a great learning experience, but a non-starter for actually finishing a game.

Share this post


Link to post
Share on other sites
Do you mind me asking what software rasterization is? I probably will go back to opengl but I would love to hear all the different possibles. And don't know what software rasterization is but I believe I have seen it in action. In Half-Life under options you can set it to opengl, direct x, or software rendering. Is this the same concept?

Share this post


Link to post
Share on other sites
Software rendering is when the CPU does the graphical calculations instead of the graphics card. It is painfully slow and is not really a viable option for games. However, if your card does not support certain features that you wish to use, you may use those features with software rendering. Usually you'll get just a few frames per second, though. All the coding is still done through OpenGL or Direct3D.

Share this post


Link to post
Share on other sites
Just wondering, how exactly do you program using software rasterization? Would you need any librarys or something? I was googleing the topic and found a few things out, like the fact that it converts the polygons to pixels. Now before I go any farther, do you think this is a good approach at a learning experience.

Share this post


Link to post
Share on other sites
Quote:

Just wondering, how exactly do you program using software rasterization? Would you need any librarys or something? I was googleing the topic and found a few things out, like the fact that it converts the polygons to pixels. Now before I go any farther, do you think this is a good approach at a learning experience.

You use some API that provides a way for you to blit a region of memory as a bitmap to a window on the screen (GDI or DirectDraw, basically).

Like I said, it's good if you want to learn how to write a render pipeline from the ground up. In the process -- if you follow a good book, such as Fundamentals of Computer Graphics, 2nd Ed. -- you'll learn a lot of about how the graphics pipeline operates from a theoretical standpoint which can aid you in your application of OpenGL or Direct3D when you want to write real applications. You'll also get a good refresher on your linear algebra; matrices and vectors and whatnot (although you'd need that for using D3D or GL anyway).

That said, if you want to write real applications (games, et cetera), using GL or D3D from the start.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!