Friday, January 29, 2021

OPENGL configuration in Visual Studio

OPENGL configuration in Visual Studio

    OpenGL Kronos group authoritive information

  1. Setup OpenGL with Visual Studio 2017 on Windows 10
  2. this paper talks about glut library from Mark J. Kilgard.

    GLUT is distributed in source code form; compiled libraries for Win32 are also available. The current version, 3.7, is in late beta. The programs and associated files contained in the distrbution were developed by Mark J. Kilgard (unless otherwise noted). The programs are not in the public domain, but they are freely distributable without licensing fees. These programs are provided without gurantee or warrantee expressed or implied.

    Download the GLUT 3.7 beta source distribution (shift Left in Netscape) (Unix tar format) (Windows ZIP format).

  3. Khronos OpenGL® Registry
  4. The OpenGL Registry contains specifications of the core API and shading language; specifications of Khronos- and vendor-approved OpenGL extensions; header files corresponding to the specifications; and related documentation including specifications, extensions, and headers for the GLX, WGL, and GLU APIs.

    API and Extension Header Files Because extensions vary from platform to platform and driver to driver, OpenGL developers can't expect interfaces for all extensions to be defined in the standard gl.h, glx.h, and wgl.h header files supplied with the OS / graphics drivers. Additional header files are provided here, including:

    Almost all of the headers described below depend on a platform header file common to multiple Khronos APIs called <KHR/khrplatform.h >.

    1. < GL/glext.h > - OpenGL 1.2 and above compatibility profile and extension interfaces.
    2. <GL/glcorearb.h > - OpenGL core profile and ARB extension interfaces, as described in appendix G.2 of the OpenGL 4.3 Specification. Does not include interfaces found only in the compatibility profile.
    3. <GL/glxext.h > - GLX 1.3 and above API and GLX extension interfaces.
    4. < GL/wglext.h > - WGL extension interfaces.

    These headers define interfaces including enumerants; prototypes; and, for platforms supporting dynamic runtime extension queries, such as Linux and Microsoft Windows, function pointer typedefs. Please report problems as Issues in the OpenGL-Registry repository.

    Khronos Shared Platform Header (<KHR/khrplatform.h >) The OpenGL headers all depend on the shared <KHR/khrplatform.h > header from the EGL Registry . This is a new dependency, introduced in OpenGL-Registry pull request 183 for increased compatibility between OpenGL and OpenGL ES headers.

  5. OpenGL Overview
  6. this overview contains architecture birdview and greate flow chart:

    The OpenGL Visualization Programming Pipeline flowchart:

    API Hierarchy: flow chart

    Architected for Flexibility and Differentiation: Extensions Although the OpenGL specification defines a particular graphics processing pipeline, platform vendors have the freedom to tailor a particular OpenGL implementation to meet unique system cost and performance objectives. Individual calls can be executed on dedicated hardware, run as software routines on the standard system CPU, or implemented as a combination of both dedicated hardware and software routines. This implementation flexibility means that OpenGL hardware acceleration can range from simple rendering to full geometry and is widely available on everything from low-cost PCs to high-end workstations and supercomputers. Application developers are assured consistent display results regardless of the platform implementation of the OpenGL environment.

    Using the OpenGL extension mechanism, hardware developers can differentiate their products by developing extensions that allow software developers to access additional performance and technological innovations.

    Many OpenGL extensions, as well as extensions to related APIs like GLU, GLX, and WGL, have been defined by vendors and groups of vendors. The OpenGL Extension Registry is maintained by SGI and contains specifications for all known extensions, written as modifications to the appropriate specification documents. The registry also defines naming conventions, guidelines for creating new extensions and writing suitable extension specifications, and other related documentation.

  7. GLUT and OpenGL Utility Libraries
  8. this summarizes the GLU library. opengl registry link is good to explore for more details:

    GLUT is the OpenGL Utility Toolkit, a window system independent toolkit for writing OpenGL programs. It implements a simple windowing application programming interface (API) for OpenGL. GLUT makes it considerably easier to learn about and explore OpenGL Programming.

    GLU Library GLU is the OpenGL Utility Library. This is a set of functions to create texture mipmaps from a base image, map coordinates between screen and object space, and draw quadric surfaces and NURBS. GLU 1.2 is the version of GLU that goes with OpenGL 1.1. GLU 1.3 is available and includes new capabilities corresponding to new OpenGL 1.2 features.

    Please refer to the OpenGL Registry for more information and links.

    Open Source GLUT projects

  9. GLUT in open source
  10. freeglut is a free-software/open-source alternative to the OpenGL Utility Toolkit (GLUT) library. GLUT was originally written by Mark Kilgard to support the sample programs in the second edition OpenGL 'RedBook'. Since then, GLUT has been used in a wide variety of practical applications because it is simple, widely available and highly portable.

    GLUT (and hence freeglut) takes care of all the system-specific chores required for creating windows, initializing OpenGL contexts, and handling input events, to allow for trully portable OpenGL programs.

    freeglut is released under the X-Consortium license.

  11. freeglut 3.0.0 MSVC Package
  12. This package contains 32 and 64 bit Windows DLLs, import libraries, and header files, allowing freeglut applications to be written using Microsoft’s Visual C++. The package was built from source code using Visual Studio 2013. The DLL is binary compatible with both my MinGW DLL, and the GLUT for Win32 DLL provided by Nate Robins. The DLL has been tested on Windows 98 SE, Windows ME, Windows 2000, Windows XP, Windows Vista, Windows 7 (64 bit), and Windows 8 (64 bit).

    Download freeglut 3.0.0 for MSVC (with PGP signature and PGP key)

  13. Using OpenGL & GLUT in Visual Studio .NET 2003
  14. This is a paragraph.

  15. Programming OpenGL in C/C++ How To Setup and Get Started
  16. We need the following sets of libraries in programming OpenGL:

    1. Core OpenGL (GL): consists of hundreds of functions, which begin with a prefix "gl" (e.g., glColor, glVertex, glTranslate, glRotate). The Core OpenGL models an object via a set of geometric primitives, such as point, line, and polygon.
    2. OpenGL Utility Library (GLU): built on-top of the core OpenGL to provide important utilities and more building models (such as qradric surfaces). GLU functions start with a prefix "glu" (e.g., gluLookAt, gluPerspective)
    3. OpenGL Utilities Toolkit (GLUT): provides support to interact with the Operating System (such as creating a window, handling key and mouse inputs); and more building models (such as sphere and torus). GLUT functions start with a prefix of "glut" (e.g., glutCreatewindow, glutMouseFunc).  
      Quoting from the opengl.org: "GLUT is designed for constructing small to medium sized OpenGL programs. While GLUT is well-suited to learning OpenGL and developing simple OpenGL applications, GLUT is not a full-featured toolkit so large applications requiring sophisticated user interfaces are better off using native window system toolkits. GLUT is simple, easy, and small." Alternative of GLUT includes SDL, ....
    4. OpenGL Extension Wrangler Library (GLEW): "GLEW is a cross-platform open-source C/C++ extension loading library. GLEW provides efficient run-time mechanisms for determining which OpenGL extensions are supported on the target platform." Source and pre-build binary available at http://glew.sourceforge.net/.

    Each of the software package consists of:

    1. A header file: "gl.h" for core OpenGL, "glu.h" for GLU, and "glut.h" (or "freeglut.h") for GLUT, typically kept under "include\GL" directory.
    2. A static library: for example, in Win32, "libopengl32.a" for core OpenGL, "libglu32.a" for GLU, "libglut32.a" (or "libfreeglut.a" or "glut32.lib") for GLUT, typically kept under "lib" directory. An optional shared library: for example, "glut32.dll" (for "freeglut.dll") for GLUT under Win32, typically kept under "bin" or "c:\windows\system32".
    3. It is important to locate the directory path and the actual filename of these header files and libraries in your operating platform in order to properly setup the OpenGL programming environment.

    Good Configuration of OpenGL

  17. [OpenGL] Installation of OpenGL with Visual Studio 2017 (GLFW, GLEW, GLUT)
  18. all GLUT packages, most recent

  19. Installing OpenGL and Running OpenGL Programs on Microsoft Windows 7 and Higher
  20. this is my current installtion. my configuration is local install. no need to install into system folders.

  21. 3. How to set up the OpenGL programming environment?
  22. This page describes the process of setting up the OpenGL Programming environment on Windows. For information on setting up OpenGL on Linux, please visit this page. For Mac computers, please visit this page. GSU students can access Lynda.com through this page and watch the online video tutorial "Up and Running with OpenGL", which contains a short tutorial on how to set up OpenGL and Cmake in OS X.

    To develop OpenGL programs you need opengl32.dll, opengl32.lib, and OpenGL header files. opengl32.dll comes with your graphics driver. openg32.lib and OpenGL header files come with Visual Studio. However, in this class, you also need the following supporting libraries.

    • Freeglut (for window management and user interactions).
      1. You need Freeglut to run many OpenGL samples. I also recommend you use Freeglut to write your own OpenGL programs.
      2. To compile Freeglut, you also need to install Cmake.
    • Glew (for OpenGL extension management)
      1. You need this library to build OpenGL programs on Windows. On Linux and Mac, it'll be different libraries.
    • glm (OpenGL Mathematics) (for math functions)
      1. You need this library for transformations, view, and projections.
    • SOIL (for loading images)
    • Assimp (for loading 3D models)
      1. You need Assimp to load complicated 3D models into your program.
      2. To compile Assimp, you also need to install Cmake.
  23. g-truc / glm
  24. OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specifications.

    GLM provides classes and functions designed and implemented with the same naming conventions and functionality than GLSL so that anyone who knows GLSL, can use GLM as well in C++.

    This project isn't limited to GLSL features. An extension system, based on the GLSL extension conventions, provides extended capabilities: matrix transformations, quaternions, data packing, random numbers, noise, etc...

    This library works perfectly with OpenGL but it also ensures interoperability with other third party libraries and SDK. It is a good candidate for software rendering (raytracing / rasterisation), image processing, physics simulations and any development context that requires a simple and convenient mathematics library.

    GLM is written in C++98 but can take advantage of C++11 when supported by the compiler. It is a platform independent library with no dependence and it officially supports the following compilers:

  25. OPENGL book: Chapter 1: Getting Started
  26. Setting up OpenGL, GLEW, and FreeGLUT in Visual C++

    This post walks you through setting up OpenGL, GLEW, and FreeGLUT support in Visual C++ in order to compile the samples properly. My original thought was to put this in an appendix after all of the chapters were completed, but there's need for it now, so here's the extremely verbose step-by-step explanation:

    I'm assuming that you have Visual Studio installed or at least Visual C++ Express, which you can get for free right here, and and install the Windows SDK as well if you get the Visual C++ Express version, which you can get here.

  27. this contains good configuration tips...

No comments:

Post a Comment