MS Visual Studio 2010 .NET Express + OpenGL... How to set up everything? 1st run

I 've got Visual Studio .NET express 2010 installed- C++, C#, but I can’t find good easy examples how to make opengl work in visual studio. there are either many files in different examples (which is ok, but I want simplest program - say something like hello world using opengl 3d text or program to show a triangle at least).

so which include files I have to use? where to get them? how to connect to those headers .h, .c for opengl? should I use some special dlls? where to get them? or special libs?

probably you can suggest something for simpler programming like glut or how is that called so I can write less code, and get faster results using that additional libraries…

So what kind of program I have to create when I start visual studio, and how to connect all those files, libraries etc, and where to get them (any links? I would like youtube direct video link with links to download examples which are openable in Visual studio .net express 2010)…

if there are some examples to use simple animation - that is even better. say, animated triangle at least, animated text.

I would like best if I get as little code as possible, but as much as possible explanations and visual illustrations with images, video etc…

anyone help in this please

well yes if you know some commands in opengl to show some images directly on screen - that would also do very well (I know opengl seem to support targa textures, so maybe you have an example for me to draw some triangle/square with applied texture).

for beginning this would do thank you

Be warned, opengl has moved on a long way since the tutorials at that site were written, and most of what is there is simply out-of-date (although it will still work). However, it is still useful because it will introduce you to the ‘essence’ of opengl.

[QUOTE=mark ds;1239126]http://nehe.gamedev.net/

Be warned, opengl has moved on a long way since the tutorials at that site were written, and most of what is there is simply out-of-date (although it will still work). However, it is still useful because it will introduce you to the ‘essence’ of opengl.[/QUOTE]

hm, this doesn’t work - I mean I try to open files and convert them, but they give some errors and cannot run (nor compile).

anything else except this http://nehe.gamedev.net/ ?

I’d really hesitate before recommending NeHe to anyone - a prime source of bad habits, even back when the tutorials were current.

To set up OpenGL with MSVC you need to do … precisely nothing. Everything you need to create basic OpenGL programs is already installed on your machine. All headers, all libs, all DLLs, everything. Just create a new project, #include <gl/gl.h>, link to opengl32.lib and you can start writing code.

That will give you basic - and I do mean basic - OpenGL support for a program, which amounts to OpenGL 1.1 functionality. If you want to use more recent functionality from higher versions then you need to either (a) use the extension loading mechanism to load everything manually during program startup (not recommended), or, (b) use an extension loading library, of which GLEW is the more frequently recommended option (there are others but you’re more likely to find help for GLEW).

Finally, do ensure that your 3D card and driver are actually capable of supporting OpenGL at the level you want to run at.

There are many resources for getting started with OpenGL on this course website:

http://homepage.cs.uiowa.edu/~cwyman/classes/fall11-22C151/

The section “Win Compilation” will answer most of your questions about setting up a project. Also, some of the homework assignments have sample code-- very helpful when getting started.

You listed C++ and C# so I’d just add that if you want to use C# I’d recommend using OpenTK, especially for starting out. It takes care of all the complex stuff for you so you can jump right in. Its the best library I’ve found for working with OpenGL in Visual Studio / C#, and even though its not updated often anymore, it still works great.

The site has all kinds of great examples as well. http://www.opentk.com

You can create a empty Win32 project first. Then create a .cpp file in your project and copy over one of the codes from nehe. Use their “draw a single triangle example”.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.