OpenGL Learning Record (0)

Source: Internet
Author: User

Start learning OpenGL from today.

First, the environment is built, VS2013 Community Edition +freeglut 3.0.0.

Freeglut Introduction is not necessary, Google itself. Address: http://sourceforge.net/projects/freeglut/

Unzip after download, build the environment according to the readme.

Installation
============

See Readme.cmake as a starting point, as well as the other README
Files for further info.

----------------------------------------------------------------

Cmake Installation:

How to build Freeglut with CMake on Windows (MS Visual Studio)
--------------------------------------------------------------
1. Download CMake (http://www.cmake.org/cmake/resources/software.html).
Get one of the releases from the binary Distribution section.
2. Run the CMake installer, install wherever.
3. Launch CMake via Start > Program Files > CMake 2.8 > CMake (GUI)
(Note that the shortcut put by the installer on your desktop does not
Point to the CMake GUI program!)
4. In the ' Where is the source code ' box, type or browse to the root
Directory of your Freeglut source (so's ' s/freeglut, not
/FREEGLUT/SRC).
5. In the ' Where to build the binaries ' box, type or browse to any
Folder you like-this'll be where the Visual Studio solution would be
Generated. This folder does not has to exist yet.
6. Hit the Configure button near the bottom of the window.
7. Pick your target compiler, make sure, it installed on your
System of course!
8. Answer Ok When asked if-want to create the build directory.
9. Wait for the Configure process to finish.
The screen'll now has some configuration options on it
Instance specifying whether you want to build static and/or shared
Libraries (see below for a complete list). When you ' ve selected your
Options, click the Configure button again.
The Generate button at the bottom is now enabled. Click Generate.
The build files are now being generated in the location of you picked.

You can now navigate to the build directory your specified in step 5.Open the Freeglut.sln file that is generated in your Build Directory,andcompile as usual.

You will then need to copy the head files, DLLs, and Lib to the VS directory.

Installing the Libraries with MSVC
==================================

To install the "Freeglut" on your system so, your and other projects would see it,
You'll need to copy various files to various locations.

-The header Files "freeglut.h", "Freeglut_ext.h", "Freeglut_std.h", and
"Glut.h" (Distributed in the directory "FREEGLUT\FREEGLUT\INCLUDE\GL")
Need to is copied to a "GL" directory under the MSVC include directory.
The MSVC include directory generally have a path similar to
"C:\Program Files\Microsoft Visual Studio\vc98\include"
The "GL" subdirectory under that would probably already have the header
Files "gl.h", "glaux.h", and "glu.h".
-The library file "Freeglut.lib" or "Freeglut_static.lib" (from the
Corresponding debug or Release directory) needs to is copied into the
MSVC Library directory. This usually have a path similar to:
"%ProgramFiles%\Microsoft Sdks\windows\v7.0a\lib"-x86, bits Lib ' s
"%programfiles (x86)%\microsoft Sdks\windows\v7.0a\lib"-x64 + bits Lib ' s
"%programfiles (x86)%\microsoft sdks\windows\v7.0a\lib\x64"-x64 bits Lib ' s
Note that there are no "GL" subdirectory here. This directory should
Already has the files "Opengl32.lib", "Glu32.lib", and "Glaux.lib".
-If you are using the DLL version of "Freeglut", the file "Freeglut.dll"
Needs to is copied from the Debug or the Release directory into the
DLL directory. This usually have a path similar to
"%systemroot%\system32\"-x86-bits DLL ' s
"%systemroot%\syswow64\"-x64-bits DLL ' s
"%systemroot%\system32\"-x64 the bits DLL ' s
And would probably already have the files "Opengl32.dll" and "Glu32.dll".

The Include directory (include directory), library file directory (LIB directory) can be used to know the specific directory through the project properties.

Click Edit-"macro

Then copy the DLL files to the corresponding directory according to the system.

The first time you write a blog, please correct me.

OpenGL Learning Record (0)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.