Graphics

Pages: 12
Now i am aware that there are a few threads already on the site about this topic. But im wondering where the best place to start is.
First off, im not looking for the EASY way out, im looking for a stepping stone between the console -> ? -> OpenGL

Or maybe you think i should just jump in to OpenGL if thats the path i want to go?

I went to this site http://www.arcsynthesis.org/gltut/ and alas, i couldnt figure out how to get it working =/ Like i couldnt even build the first tutorial. It was really discouraging.

Im confident that i can atleast START graphics. I know my BASIC BASIC stuffs
(arrays/vectors/pointer/references/strings/structs/functions/basic types)

Im reading C++ Primer (C++ 11) and im now starting to learn about the std library, but i really have been waiting to start up on graphics.

So opinions, Should i Dive right into OpenGL, and really focus on getting it working? Or maybe learn about a wrapper to learn the basic foundations of graphic programming? If so, which library would be a good stepping stone?

When i start learning OpenGL, which version should i be learning? 3.1? 3.3?

My computer's graphics card cannot handle 4.0 =/


Any input would be greatly appreciated!
Last edited on
it'd probably be a good idea to learn a 2D API first. Good ones to start with would be SFML, Allegro, or SDL, these are the only ones I know about for sure, but a google search would produce more I'm sure. And I think as far as OpenGL goes, you can use any of these to produce your window and then let OpenGL drive the actual graphics, but I would suggest leaning 2D graphics first, there is a LOT less math involved as far as I know.
THANK YOU for your input, and that makes alot of sense, starting with 2D graphics, and then moving onto 3D.

Im planning on starting simple while im learning (Turn based RPGS)
Then move on to Real time, and math once i am starting to get comfortable with graphics in general

And OpenGL is a disater with me, once i get it set up correctly once, im sure it will be fine from then on.
But i cant get a firm grasp on using library's provided in the site arcsynthesis.org

Iv heard of SFML, Allegro, and SDL on this site. Im just curious which one is most similar to OpenGL.

Any pros/cons on the top of your head?

Well most people I have talked to say SFML is the easiest to set up and use, but for me it didn't go well, this may be just from the tutorial I took or a big misunderstanding, but I then tried Allegro, which I have been using for a bit now (6 months), and I like it so far, I feel most of the functions used are pretty self-explanatory. and SDL I've never even looked into, no opinion there.
closed account (Dy7SLyTq)
im like twiggy, except ive never used allegro, i used sdl and im very happy with it, except its difficult to place the window where you want it
Thanks for the replies.

Now im wondering what you guys use to actually make the graphics. Like if I wanted to add a sprite of a person, or grass. What would I use use to make that?
Something like paint? Where is a good starting point for making 2d graphics?

Keep in mind that I have like... zero creativity. The best thing I can draw on a piece of paper would be a stick figure

Any good tutorials that you guys have had success with?
closed account (Dy7SLyTq)
http://www.google.com/search?q=rpg+sprites&oq=rpg+sprites&aqs=chrome.0.69i57j0l3j69i62l2.3430j0&sourceid=chrome&ie=UTF-8

no shame in it
I found a good thing on character sprites here http://themechanicalmaniacs.com/guides/spriteguide.php

as far as other things, I've used paint many times to make the sprites, but I can't draw for shit either so I would suggest making filler sprites (just do the best you can) and later if you feel like you want to release it, have someone who can do art and have the make the sprites and promise them like 10% of profits if you plan on selling it. the hardest part about that would be re-programming the animation of the sprites, which isn't all that hard if you already have the parameters figured out
Uh, I think the advice to start with 2D first is wrong. There is no reason you can't jump straight into 3D programming.

The best place to start, IMHO, is over at
http://nehe.gamedev.net/

NeHe is all about OpenGL. The tutorials tend to be Windows-centric, but there is always code at the bottom for Linux and the like.

Hope this helps.
I do not recommend NeHe as a source for OpenGL, as it is very outdated. It even lists its tutorials as "legacy".

A better tutorial is here:

http://www.arcsynthesis.org/gltut/


And while the difficulty of 3D might be overexaggerated... it certainly is significantly more involved than 2D. So I don't think starting with 2D is necessarily a bad move. That said if you're interested in 3D... then I agree with Duoas that you should just go for it right away.


EDIT:

As a rule of thumb... if an OpenGL tutorial is telling you to use glBegin, glEnd, glVertex, etc functions... then it is not one worth reading.
Last edited on
@twiggystardust -Thank you twiggy for your link, ill definitely start there.
@ DTSCode - Ill probably use other peoples sprite until I get a little experience

@Duoas
@Disch

Kind of torn with what you both said. First off.

http://www.arcsynthesis.org/gltut/
Disch, I started with that site (as you might have read above) And I could not get the projects to build correctly. Something about setting up the environment REALLY confused me. And I cant even build the first tutorial. (I cant set up my IDE to link to the libraries)

http://nehe.gamedev.net/
As for your site Duoas, Doesn't this site teach me methods that have been removed from the newer versions of OpenGL? Im looking forward to using OpenGL 4.0 once I get a computer that has a powerful enough GPU, so wouldn't that site teach me old material, non compatible with 4.0?


For both of you:
You think its better to jump directly into OpenGL rather then learn SDL/SFML/Allegro?
Disch: is it really necessary to do get the premake thing, the SDK and use those? I've not started 3D programming yet but I'm thinking about starting it, this all seems like a little much.
@twiggy - If you have success with that website, meaning you can get the tutorials built, could you give me a hand on the set up part? Iv heard this is a great site to learn from, But the set up really throws me for a loop

-
I can get codeblocks to build the SDK libraries, and the premake thing i have down, but when i actually go to build the tutorials, i cant get codeblocks to properly include the libraries for OpenGL
Last edited on
Disch, I started with that site (as you might have read above)


Ah, whoops. No I missed that. Sorry.

And I could not get the projects to build correctly. Something about setting up the environment REALLY confused me.


OpenGL is weird because it (AFAIK) doesn't have an official SDK. So the easiest way to approach it is to use things like GLEW as he does in that tutorial. It is not as straightforward as it could be, but I haven't found any tutorial that makes it simpler than he does. All of the required files are provided via a link in the tut:

https://bitbucket.org/alfonse/gltut/downloads

You just run premake as he describes, and it spits out project files for <insert your IDE here>. Then you just load up those project files and build them like they were a normal project and you're good to go.

And I cant even build the first tutorial. (I cant set up my IDE to link to the libraries)


Are you using premake? Just grabbing the source files and trying to compile them will be more of a hassle than it's worth. You really need to auto-gen the project files.

Doesn't [NeHe] teach me methods that have been removed from the newer versions of OpenGL?


Yes. Which is why I recommend against it.

You think its better to jump directly into OpenGL rather then learn SDL/SFML/Allegro?


I'm an advocate of "learn how to do what you want to do". If what you want to do is 3D... then learning 2D is an unnecessary step towards that goal. While coding 2D first might "soften the blow" a bit... coding 2D and 3D graphics are very different both conceptually and practically.

2D can be accomplished with simple "draw this rectangle here" calls... which is basically how SDL/SFML/Allegro abstract it for you.

Whereas 3D requires a broader understanding of the rendering pipeline, 3D space, shaders, etc. It's hardly ever as simple as "draw this triangle here".



What I do, personally... is I use SFML for managing the window, doing audio, and capturing input... then use SFML to do the actual graphics rendering. So in that way... starting with something like SFML might work out because it'll introduce you to all the non-graphic parts of game programming... and then when you feel comfortable you can "re-learn" the graphics programming part.


twiggystardust wrote:
is it really necessary to do get the premake thing, the SDK and use those?


The SDK: Absolutely. You can't use a lib without an SDK. At least not reasonably.

Premake: Only if you want to compile the tutorial example programs. I certainly would recommend it... but if you just want to see the source without interacting with the generated programs, then you don't need premake.

I've not started 3D programming yet but I'm thinking about starting it, this all seems like a little much.


Any library is going to require downloading/installing its SDK. That is very typical.

Most tutorials are going to make you jump through a hoop or two to build their example programs.

So neither of these are atypical. You should probably expect this.

The reason he uses premake is so that:

1) He doesn't have to distribute binaries (which would be platform specific and would require people to download and run misc executables, which might be malware, etc)

2) The code will work for any platform/compiler. Distributing just VS project files means only people with VS will be able to compile the code. Distributing with makefiles means only people with gcc+make will be able to compile the code. Distributing with C::B project files means [etc etc].

My distributing premake files, you can build with any IDE that premake supports. Which is virtually all of them.


EDIT:

Chillieman wrote:
Iv heard of SFML, Allegro, and SDL on this site. Im just curious which one is most similar to OpenGL.


None of them are at all similar to OpenGL. They use OpenGL as their framework, but they all abstract it beyond recognition.

Do not expect to gain any insight on OpenGL by using any of those libs. You will not.

If you have success with that website, meaning you can get the tutorials built, could you give me a hand on the set up part?


I've had success and don't mind helping you through it. Give me a sec to install C::B again and see if I can't make a step-by-step thing for you.
Last edited on
Ah, it has been a long while since I've messed with it.
Disch + 1
Okay I just got it compiling in C::B. And while tedious, it is very simple.

#1) Download and extract the entire "Tutorial 0.3.8"

#2) There will be 2 'premake4.lua' files. One in the root directory, and one in the 'glsdk' directory. You will need to run premake on both of them.

#3) Run premake by making sure that premake is somewhere in PATH (or copy/paste it to each of those 2 directories) and run it via commandline as premake4 codeblocks

#4) in the glsdk directory, several *.cbp files will be created. One in each of the below directories:
- freeglut
- glimg
- glload
- glmesh
- glutil

#5) You need to open each of those projects in Code::Blocks and build them.

#6) Open up <root>/framework/framework.cbp in C::B and build that

#7) Once all above projects have been built, any of the individual tutorial projects should build without issue.



EDIT:

to clarify. You do not need to configure C::B to look for the libs in any directory. It's already looking in the right directory because of the way the .cbp files are set up. You only have to make sure the libs are built.
Last edited on
@Disch - Thank you so much for giving me a step by step guide to get these tutorials to build correctly.

One thing i remember i did not do was #6. I never built framework.cbp

i am unable to test this because i am away from home, but i cant wait to go and try to build those tutorials now!

I really appreciate you taking the time to help me ^_^ ill let you know how it goes when i get back home on friday!

On a secondary note, thank you for clearing up my concerns about SFML being anything like OpenGL, i will still dive into it, because im very interested in learning 2D graphics aswell, but its good to know that they are on different playing fields.

I'v been looking forward to learning 3D graphics through OpenGL for a few weeks now, with no luck because i didnt set up the environment correctly, and im kicking myself in the ass for not coming here, and posting my concerns sooner.

Your awesme Disch =D
I'm happy to help. =)
Disch: I'm having problems in the set-up, I'm using Visual C++ Express. When I got to step 6, there is no solution for framework, just some cpp files and a visual studio filter, any suggestions?
For VS, there's a <root>\AllTutorials.sln file which has the framework project, as well as all the individual tutorial projects.

You can fire that up and build all of them at once, rather than building framework and each tutorial separately.
Pages: 12