Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

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

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2012
    Posts
    16

    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

  2. #2
    Intern Contributor
    Join Date
    Jul 2009
    Posts
    53
    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.

  3. #3
    Junior Member Newbie
    Join Date
    Jun 2012
    Posts
    16
    Quote Originally Posted by mark ds View Post
    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.
    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/ ?

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,217
    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.

  5. #5
    Junior Member Newbie dimension314's Avatar
    Join Date
    Jul 2012
    Posts
    1
    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

  6. #6
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,264
    Quote Originally Posted by vedaviz View Post
    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/ ?
    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".
    http://nehe.gamedev.net/tutorial/you...polygon/13002/
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •