Starting out with graphics

Started by
7 comments, last by 21st Century Moose 10 years, 10 months ago

In advance, I apologize for this. I'm sure it's a question submitted and answered countless times and I'm most likely overlooking something, or not finding a thread that has already been through this.. Anyways, I've been learning C++ for a while now, most likely half a year or so at that and I feel as if I have a good grasp on the language. Well somewhat good! I understand things presented to me when it comes to coding.

Now one thing that I'm slightly dumbfounded on is moving out of things like text-based games, or simply programming on the console as I make random things. I've been somewhat studying the Win32 API, which I still cannot find a decent book for. (If any could be suggested, or even sites with good tutorials, I'd appreciate that.) But that aside, the problem I seem to be running into is starting out with rendering graphics and going through that.

I'm aware of SFML, SDL, OpenGL and DirectX. All of which are good in their own rights, but the issue is more or less wanting to learn more about the last two. I've been through DirectXTutorial.com (Or whatever that site is, apologies if I forgot the name.), and what they push seem to sometimes run into errors, or do not push enough for me to learn much before wanting a Premium Sub. I have no issues with a sub fee, or buying books.. Just the site doesn't do enough for me to consider it.

Anyways! To sum this up in a better way, I'm looking for good resources to start out with DirectX or OpenGL. (Websites or books.) The latter of the two for me has been a giant pain. Each time I think I'm stumbled upon something good for OpenGL, it's really outdated. So anything up to date would be wonderful. As for DirectX, I'm looking to learn something from 9/10/11. Mainly 9, seeing as this PC is old and gives me issues as is.

In turn, thank you for reading this and everything!

Advertisement
One difficulty is the level you are jumping in at.

Learning rendering at the primitive level is often good for beginners. Learn what it means to render a few polygons, learn how winding order works, learn how basic texturing works, and so on.

Unfortunately for beginners, newer interfaces like the latest rounds of Direct3D are focused on the high performance algorithms on a particular age of video card. D3D11 is great if you want to have six levels of shaders and a bazillion instances of models. But primitives are not high performance, I don't think there is an equivalent of DrawPrimative in the past few editions of D3D.

Even though the out-of-date resources you found are a few years old and won't teach you about the latest rounds of shaders or the cutting-edge graphics techniques, they will teach you how the graphics system works. The older resources tended to focus on the fundamentals because that's all there was. The old resources will teach you how to use a transformation matrix, how to manipulate objects in space, how to traverse a scene graph, and all the other topics you need to know.

You mentioned SDL and that is a pretty good choice for those just entering graphics. The library does much of the gruntwork for creating windows and managing resources, and it exposes most of the rendering system to you for your own use. You are still responsible for actually making the graphics, and you have access to primitives as well as advanced features.

After you've got the fundamental basics down, then get in to the D3D13 (or whatever we are on at the time) and it's 14 layers of programmable shaders. :-)

Thank you, frob.

Everything you said does have a valid point to it. In ways, I guess I am jumping ahead of myself to get into DirectX and play with all the shaders, etc. Which isn't the best step in all this.

Anyways, I'll toy with SDL for a while and see where I can get. It'll be good just to get some experience in all of this!

I think frob summarized everything well. If you would like to learn about DirectX and/or OpenGL this guy is presenting easy-to-digest-tutorials in my opinion: http://www.rastertek.com/tutindex.html

I've followed these a few times myself and there haven't been a problem at all so far. The tutorials are built upon each other so you are wise to start at the very first lesson ^^! Good luck

Once you're ready to get into DirectX, I would recommend Introduction to 3D Game Programming with DirectX 9.0C A Shader Approach as a book to read/reference material. It goes from mathematical foundations to shaders and all the way to shadow mapping. It even includes a (short) section about Win32 API programming as it relates to game programming.

If you need a demo program to look at, here's a 3-d terrain exploration demo using DX9 and X files. It also has an example of collision detection/response since it has castles and buildings.

https://dl.dropboxusercontent.com/u/8974528/BigWorldToShare.zip

I recommend SFML 2 because of object-orientation, easy to use, and awesomeness :)!

Cheers :)!

I'm a game programmer and computer science ninja !

Here's my 2D RPG-Ish Platformer Programmed in Python + Pygame, with a Custom Level Editor and Rendering System!

Here's my Custom IDE / Debugger Programmed in Pure Python and Designed from the Ground Up for Programming Education!

Want to ask about Python, Flask, wxPython, Pygame, C++, HTML5, CSS3, Javascript, jQuery, C++, Vimscript, SFML 1.6 / 2.0, or anything else? Recruiting for a game development team and need a passionate programmer? Just want to talk about programming? Email me here:

hobohm.business@gmail.com

or Personal-Message me on here !

If you want to make sure that the openGL code you find is up to date then try and stick with openGL ES 2.0 examples, even if you have no intention of working with embedded devices. Everything in the spec is valid for desktops and laptops and if you decide to go cross-platform it will work on Windows, MacOS, Linux, iOS and even Android so long as you use the Android NDK. Also, you can add the newer features of openGL in combination with the ES 2.0 spec code. Now so far as learning the Windows API stuff. You may want to consider just grabbing example projects from all the DirectX and OpenGL project websites and compare what they are all doing to start up a window. Maybe delete out what is not common to them all and study the functions that are necessary to get things up and running on a per-function basis by using a search engine.

Consider it pure joy, my brothers and sisters, whenever you face trials of many kinds, 3 because you know that the testing of your faith produces perseverance. 4 Let perseverance finish its work so that you may be mature and complete, not lacking anything.

If you want to learn (reasonably) modern OpenGL, then the de-facto "go to" place is here: Learning Modern 3D Graphics Programming. Last time I looked it was up to date as of GL3.3, but it may have had some 4.x functionality added since. Either way you'll get a good grounding in the more up to date and less crufty versions of OpenGL.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

This topic is closed to new replies.

Advertisement