Starting OpenGL

Started by
11 comments, last by NightCreature83 11 years, 4 months ago
Hey

I've been learning the basics of game development for some time now, and I believe that I am ready to take "the next step". So far, I've been working with XNA, but I get the feeling that Microsoft is slowly abandoning it. Therefor, I think it's time to switch to another API - I did some research, and I think that OpenGL would be good place to go, because it is supported on many platforms, and has a large enough community from which I could get help when I get stuck. My question is - which developing environment would be best to start working with C++ and OpenGL. I've been using Visual Studio for some time now, so if it's possible to use it with OpenGL it would be great.
Advertisement

Visual Studio

Yes, open gl provides a C API therefor you won't have any trouble using Visual Studio (C++) with OpenGL.
Working with OpenGL is not bound to any particular compiler. You link to the local equivalent of opengl32.lib, include GL/GL.h (both should come with any decent compiler) and you are good to go.

The only caveat is that you are stuck at OpenGL 1.1 by default on Windows. Anything newer (and you most likely don't want anything below 2.0, possibly higher) must be requested via the extension framework. That is not exactly difficult, just a lot of work to get right and sufficiently complete. Of course, libraries like glew do all the work for you here.
Hi,
I've been studying modern opengl (3.2+) lately. Like the other's have said, opengl is not tied to a compiler, you can use any compiler you like. At home I use Visual Studio 2012 Express and at work I use Code::Blocks with MinGW 4.7.2.

If you are interested in learning Modern OpenGL, I have found the following links to be very helpful:
http://www.arcsynthesis.org/gltut
http://www.opengl-tutorial.org
http://ogldev.atspace.co.uk/index.html
http://www.mbsoftworks.sk/index.php?page=tutorials&series=1
http://rastertek.com/tutgl40.html
http://open.gl

Good luck!

Hey

I've been learning the basics of game development for some time now, and I believe that I am ready to take "the next step". So far, I've been working with XNA, but I get the feeling that Microsoft is slowly abandoning it. Therefor, I think it's time to switch to another API - I did some research, and I think that OpenGL would be good place to go, because it is supported on many platforms, and has a large enough community from which I could get help when I get stuck. My question is - which developing environment would be best to start working with C++ and OpenGL. I've been using Visual Studio for some time now, so if it's possible to use it with OpenGL it would be great.

Seeing you come from XNA I think you will feel more at home with DX11. That being said there is no reason to switch away from VS for OpenGL development just switch to C++ or use OpenTK in which case you can even stick with C#. http://sourceforge.net/projects/opentk/

Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, theHunter, theHunter: Primal, Mad Max, Watch Dogs: Legion


Seeing you come from XNA I think you will feel more at home with DX11. That being said there is no reason to switch away from VS for OpenGL development just switch to C++ or use OpenTK in which case you can even stick with C#.


I've thought about it, but if I want to create a game for non-desktop platforms, C++ is more applicable . Also, I think that C++ is somewhat of industrial standard when it comes to game development, so with that in mind, I think it is better to use C++ than C#

[quote name='NightCreature83' timestamp='1354025208' post='5004515']
Seeing you come from XNA I think you will feel more at home with DX11. That being said there is no reason to switch away from VS for OpenGL development just switch to C++ or use OpenTK in which case you can even stick with C#.


I've thought about it, but if I want to create a game for non-desktop platforms, C++ is more applicable . Also, I think that C++ is somewhat of industrial standard when it comes to game development, so with that in mind, I think it is better to use C++ than C#
[/quote]

It's entirely your choice to make. But yes, with C# you may be stuck with Windows.
With good multiplatform libraries C++ can let you make builds for linux/windows/macos with little or no hassle
GLFW is a good window library that simplifies OpenGL + window + mouse/keyboard/joystick and even timing for you
Some people use GLUT (most likely freeGLUT), or SDL (Simple Directmedia Layer)
I'm sure there are others :)
But for starters, with GLFW you have the basics, they work, it's not abandoned and its multiplatform
freeGLUT i'm not sure about, other than that it's simpler.. going from freeGLUT to GLFW (or vice versa) is a simple task
SDL is a huge library that is very powerful, but I don't know very much beyond that
You don't have to use an "integrated development environment". I personally use a text editor (vim) with a build system (cmake) to write code and manage the compilation process. Any given software project is just a collection of files in a well defined directory structure, and I feel that there's no need to complicate that simple arrangement with some bulky IDE.

Regarding language choice: Yes, C++ is the industry standard, but it's not used for everything. For example, the core system would usually be written in C++, but the game logic could be written in a "scripting language". Actually, depending on the performance requirements of your game, it's usually quite possible, and recommended, to write the entire game in a very high-level language, where you can leverage "modern" features like automatic memory management.

If you're a beginner, performance and portability should be a secondary concern: Create a game worth playing first.

+---------------------------------------------------------------------+

| Game Dev video tutorials -> http://www.youtube.com/goranmilovano | +---------------------------------------------------------------------+

If you're a beginner, performance and portability should be a secondary concern: Create a game worth playing first.


This is exactly the reason I am trying to switch from XNA to another language. I think that for a beginner developer, smart phones are a good platform to get some experience, and get real users to test and evaluate your game. With that in mind, I think that XNA (or WinPhone's to be precise) has way too few users - Android and iOS are much more represented. I know that Android uses OpenGL (and Java, I think), it seemed as a good language to make the transition to (iOS and iPhone's are a bit too expensive). Can you please comment on this logic?
As far as I know, XNA is a set of tools and libraries, not a language.

In either case, I don't think that developing for a phone will be any more beneficial than developing for PC, or any other platform. If you want to "get real users to test and evaluate your game", you need to make a game that people want to play. If you can't do that, then no one will care, regardless of the platform.

But that's just my personal opinion.

+---------------------------------------------------------------------+

| Game Dev video tutorials -> http://www.youtube.com/goranmilovano | +---------------------------------------------------------------------+

This topic is closed to new replies.

Advertisement