Presentation is loading. Please wait.

Presentation is loading. Please wait.

Install and Setup VC++ and OpenGL Introduction to Computer Graphics and Animation (Principle of Computer Graphics) Rattapoom Waranusast.

Similar presentations


Presentation on theme: "Install and Setup VC++ and OpenGL Introduction to Computer Graphics and Animation (Principle of Computer Graphics) Rattapoom Waranusast."— Presentation transcript:

1 Install and Setup VC++ and OpenGL Introduction to Computer Graphics and Animation (Principle of Computer Graphics) Rattapoom Waranusast

2 Installing OpenGL for Windows with VC++ 2010 Express Install Visual C++ 2010 Express –Go to http://www.microsoft.com/express/ and download the VC++ 2010 Expresshttp://www.microsoft.com/express/ –Install and Register the product Install GLUT Library –Go to http://www.xmission.com/~nate/glut.html and download glut-3.7.6-bin.zip (117 KB)http://www.xmission.com/~nate/glut.htmlglut-3.7.6-bin.zip (117 KB) –Copy glut32.dll to “C:\Windows\System32” –Copy glut32.lib to “C:\Program Files\Microsoft Visual Studio 10.0\VC\lib” –Copy glut.h to “C:\Program Files\Microsoft Visual Studio 10.0\VC\Include\gl” Note that you may have to create the gl directory. –Note that for newer and more active version of GLUT, try freeglut at http://freeglut.sourceforge.net and http://www.transmissionzero.co.uk/software/freeglut-devel/ http://freeglut.sourceforge.net http://www.transmissionzero.co.uk/software/freeglut-devel/ Done!!

3 Using OpenGL in VC++ 2010 Start VC++ 2010 Express Edition Under the File menu select New -> Project In the New Project Types window, select Visual C++ - Win32 on the left hand side and select Win32 Console Application on the right hand side, and uncheck “Create directory for solution” box. Specify name and location of the project In the Win32 Application Wizard window, select the Application Settings; then select the Application type as Console application, and tick the check box in front of Empty Project. Click Finish. Now the project is open; go to Project menu; select Add New Item. Select Visual C++ Code, and a C++ file (.cpp); name the file and click Add. Code whatever you want to this file or copy from existing.cpp file. Save and build your project by going to Debug -> Build Solution. Then execute the program with Debug -> Start Debugging. If the program has been built successfully, then you should see no error in the output window. Congratulations!

4 Glut & stdlib conflict 'exit' For.net, GLUT may have a conflict with stdlib.h. –If so, try the following change in glut.h: extern _CRTIMP void __cdecl exit(int); to extern _CRTIMP __declspec(noreturn) void __cdecl exit(int); –Or change sequence of #include to #include

5 OpenGL for Borland C++ Please visit web site for detail: –http://www.gantless.com/borland.htmlhttp://www.gantless.com/borland.html –http://members.cox.net/scottheiman/opengl.htmhttp://members.cox.net/scottheiman/opengl.htm –http://www.it.uu.se/edu/course/homepage/grafik1/vt05 /assignments/opengl_borland.shtmlhttp://www.it.uu.se/edu/course/homepage/grafik1/vt05 /assignments/opengl_borland.shtml –http://sbenavides.tripod.com/OpenGL.htmlhttp://sbenavides.tripod.com/OpenGL.html –http://dn.codegear.com/article/10528http://dn.codegear.com/article/10528

6 Installing OGL for Java Install Java Development Kit –Go to http://java.sun.com,and follow the instruction to download and install Java SDK.http://java.sun.com Install JOGL –Go to https://jogl.dev.java.net/, and down load the softwarehttps://jogl.dev.java.net/ Install a Java IDE –You might want to use Eclipse, jGRASP, JBuilder, or etc. For more detail –go to http://www.cs.gmu.edu/%7Ejchen/graphics/jogl/notes/setup2007. html http://www.cs.gmu.edu/%7Ejchen/graphics/jogl/notes/setup2007. html

7 OpenGL and Linux Linux –GLUT uses XWindows libraries –Check for /usr/include/gl/glut.h and gl.h –GCC is generally used to compile –OpenGL is either MESA (Software) or provided by your graphics card (Hardware) Implementations of open specs –Program using any editor you like –Include and gcc filename.c -o outputname -I/usr/X11R6/include/ -L/usr/X11R6/lib -lX11 -lXi -lXmu -lglut -lGL -lGLU -lm

8 More on Installing OpenGL for Linux and Other OS’s Please refer to –http://www.opengl.org/wiki/index.php/Getting_startedhttp://www.opengl.org/wiki/index.php/Getting_started –http://www.opengl.org/resources/libraries/glut/glut_do wnloads.phphttp://www.opengl.org/resources/libraries/glut/glut_do wnloads.php –http://wiki.linuxquestions.org/wiki/OpenGLhttp://wiki.linuxquestions.org/wiki/OpenGL –http://pubpages.unh.edu/~cs770/a1/libraries.htmlhttp://pubpages.unh.edu/~cs770/a1/libraries.html –http://www.talisman.org/opengl- 1.1/ImpGuide/02_Install.htmlhttp://www.talisman.org/opengl- 1.1/ImpGuide/02_Install.html


Download ppt "Install and Setup VC++ and OpenGL Introduction to Computer Graphics and Animation (Principle of Computer Graphics) Rattapoom Waranusast."

Similar presentations


Ads by Google