Getting started with opengl
Hi guys. I want to start doing some game programming as I've been doing c++ for quite a while now and I have a lot of spare time. So my question is, what do I need to do to start using OpenGL? I've tried a few times but it never seems to be able to do anything. I'm using dev c++ 4.9.2 as my compliler. Thanks in advance
There are a lot of tutorials "out there". Many of them are targeting legacy OpenGL (using fixed functions), which is kind of a dead end. So make sure you understand the difference before using one.
I would recommend Learning Modern 3D Graphics Programming. It is 50% about general 3D graphics and 50% about how to do this in the current OpenGL API.
I would recommend Learning Modern 3D Graphics Programming. It is 50% about general 3D graphics and 50% about how to do this in the current OpenGL API.
The first thing you need is to read this: http://www.jasonbadams.net/20081218/why-you-shouldnt-use-dev-c/
The site to bookmark is OpenGL Registry. What I did when I ported my renderer over to OpenGL from D3D was that I read through the spec to get a hang of what functionality is there, and to get a grasp of which functions to use to achieve my task at hand, and then googled using those function names for examples and sample code where necessary.
I recommend keeping away from anything that is older than OpenGL 3.0, and adopting the 3.2 Core Profile as the primary development target. That version does not contain any of the old deprecated functionality, and you'll have a better chance to stay on the 'fast path' of the API. Also, using a more recent version of OpenGL means that you'll need to query fewer things as extensions, which is a dull and messy obstacle when starting out and learning.
There are several third-party OpenGL helpers available which fix parts of the tediousness related to OpenGL extension querying, and context and window creation, e.g. GLEW, GLFW, GLUT, GLEE, SDL, .. It is worthwhile to check those out, and some samples that utilize them, since doing those from scratch can mean a ton of extra code, which has nothing to do with learning how GPUs work.
I recommend keeping away from anything that is older than OpenGL 3.0, and adopting the 3.2 Core Profile as the primary development target. That version does not contain any of the old deprecated functionality, and you'll have a better chance to stay on the 'fast path' of the API. Also, using a more recent version of OpenGL means that you'll need to query fewer things as extensions, which is a dull and messy obstacle when starting out and learning.
There are several third-party OpenGL helpers available which fix parts of the tediousness related to OpenGL extension querying, and context and window creation, e.g. GLEW, GLFW, GLUT, GLEE, SDL, .. It is worthwhile to check those out, and some samples that utilize them, since doing those from scratch can mean a ton of extra code, which has nothing to do with learning how GPUs work.
Hi Braeden,
I'd recommend taking a look at the Getting Started section of the OpenGL Wiki. There's a lot of good info and links to tutorials for both modern and fixed-function OpenGL programming.
Good luck!
I'd recommend taking a look at the Getting Started section of the OpenGL Wiki. There's a lot of good info and links to tutorials for both modern and fixed-function OpenGL programming.
Good luck!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement