All Projects → TransmissionZero → Hello-GLUT

TransmissionZero / Hello-GLUT

Licence: Unlicense License
A very simple "Hello World!" GLUT application demonstrating how to write OpenGL applications in C with MinGW and MSVC.

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to Hello-GLUT

ci playground
Playground for Cloud CI development for C++
Stars: ✭ 23 (-14.81%)
Mutual labels:  gcc, mingw, msvc
Nos
RTOS for microcontrollers
Stars: ✭ 160 (+492.59%)
Mutual labels:  gcc, win32
Tiny-OpenGL-Shadow-Mapping-Examples
Compact OpenGL Shadow Mapping Examples in a single compilation unit
Stars: ✭ 21 (-22.22%)
Mutual labels:  glut, freeglut
build-scripts
Utility scripts for building of 3rd-party libraries
Stars: ✭ 33 (+22.22%)
Mutual labels:  mingw, msvc
Header-Only-GL-Helpers
A collection of header files that can ease OpenGL programming
Stars: ✭ 25 (-7.41%)
Mutual labels:  glut, freeglut
wsock-trace
Tracing library for Winsock calls.
Stars: ✭ 15 (-44.44%)
Mutual labels:  mingw, msvc
STM32-Bare-Metal
STM32F103C8 bare metal template
Stars: ✭ 26 (-3.7%)
Mutual labels:  gcc
scenic asteroids
A toy Asteroids clone written in Elixir with the Scenic UI library
Stars: ✭ 42 (+55.56%)
Mutual labels:  example
example-orbitdb-todomvc
TodoMVC with OrbitDB
Stars: ✭ 17 (-37.04%)
Mutual labels:  example
rooki
A stupid simple script runner supporting c, c++, rust, haskell and virtually anything
Stars: ✭ 26 (-3.7%)
Mutual labels:  gcc
haxe
Qt binding for Haxe | Showcase example for https://github.com/therecipe/qt
Stars: ✭ 21 (-22.22%)
Mutual labels:  example
hugo-bare-min-theme
A bare minimum theme for Hugo (https://gohugo.io) to help develop and debug Hugo sites -- https://hugo-bare-min.netlify.com/,
Stars: ✭ 71 (+162.96%)
Mutual labels:  example
SeatLayout
A seat selection library for Android with an example for selecting seats for flights, sports venue, theatres, etc
Stars: ✭ 30 (+11.11%)
Mutual labels:  example
Hello-World
Hello World in different languages !
Stars: ✭ 118 (+337.04%)
Mutual labels:  hello-world
db2-samples
Db2 application code, configuration samples, and other examples
Stars: ✭ 56 (+107.41%)
Mutual labels:  example
ksonnet-cheat-sheet
No description or website provided.
Stars: ✭ 18 (-33.33%)
Mutual labels:  example
stlkrn
C++ STL in the Windows Kernel with C++ Exception Support
Stars: ✭ 216 (+700%)
Mutual labels:  msvc
play-scala-chatroom-example
Play chatroom with Scala API
Stars: ✭ 43 (+59.26%)
Mutual labels:  example
Discord-Bot-TypeScript-Template
Discord bot - A discord.js bot template written with TypeScript.
Stars: ✭ 86 (+218.52%)
Mutual labels:  example
iOS ARkit2 Multiusers
An example implemented multiplayer experience in ARKit2
Stars: ✭ 19 (-29.63%)
Mutual labels:  example

Hello GLUT

Table of Contents

Introduction

This application is an example Windows GUI application, written to demonstrate how to build freeglut applications with MinGW and MSVC. It accompanies the Using freeglut or GLUT with MinGW article on Transmission Zero.

The application demonstrates how to process key presses and how to display a basic shape in a window. It doesn't attempt to do anything fancy, as it's really just a "Hello world!" example.

Although the application targets freeglut, there's no reason why it can't use a compatible alternative GLUT implementation, e.g. Nate Robins' GLUT for Win32. Similarly, it should be possible to cross-compile the application on a non-Windows machine, compile the application to target a non-Windows machine, or build with tools other than MinGW and MSVC. However, some changes to the Makefile will likely be needed.

Building with MinGW

Before you start, changes to the Makefile may be needed. Firstly, the "INCLUDE_DIRS" and "LIB_DIRS" may need to be updated if your GLUT header files and import libraries are in a different location. Secondly, the "LDFLAGS" flags may need to be changed if you're not using freeglut. For example, if you're using GLUT for Win32, change "-lfreeglut" to "-lglut32".

To build the application on a Windows machine, open a command prompt, change to the directory containing the Makefile, and type "mingw32-make". The application should be compiled, linked, and output as "bin/HelloGLUT.exe". The appropriate GLUT DLL will either need to be in the same directory as the executable, or will need to be in a directory referenced in your "%PATH%" environment variable.

Building with MSVC

Before you start, changes to the project may be needed. Firstly, the "Include Directories" and "Library Directories" settings under "VC++ Directories", and the "Environment" setting under "Debugging" may need to be updated if your GLUT header files, import libraries, and DLLs are in a different location. Secondly, the "Additional Dependencies" under "Linker" -> "Input" may need to be changed if you're not using freeglut. For example, if you're using GLUT for Win32, change "freeglut.lib" to "glut32.lib".

To build the application in Visual Studio, select the configuration and platform from the drop-down menu, and use "Build Solution" from the "Build" menu.

The solution was created in Visual Studio 2017, but it should open in any version of Visual Studio from 2010 SP1 onwards.

Note: The project has precompiled headers disabled. This was done to ensure the project can be built with both MinGW and MSVC. There is no reason why you can't use precompiled headers with freeglut in MSVC.

Terms of Use

Refer to "License.txt" for terms of use.

Problems?

If you have any problems or questions, please ensure you have read this readme file and the Using freeglut or GLUT with MinGW article. If you are still having trouble, you can get in contact.

Changelog

  1. 2016-08-28: Version 1.0
  • Initial release.

Transmission Zero 2016-08-28

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].