This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Triangle_opengl_3_1 | |
// A cross platform version of | |
// http://www.opengl.org/wiki/Tutorial:_OpenGL_3.1_The_First_Triangle_%28C%2B%2B/Win%29 | |
// with some code from http://www.lighthouse3d.com/opengl/glsl/index.php?oglexample1 | |
// and from the book OpenGL Shading Language 3rd Edition, p215-216 | |
// Daniel Livingstone, October 2010 | |
#include <GL/glew.h> | |
#define FREEGLUT_STATIC | |
#include <GL/freeglut.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// loadModelDataTest-GLTools | |
// A simple app that loads model data from a custom data format | |
// the format is a (relatively) simple one based on how an individual | |
// mesh may be saved in a Collada file - currently the easiest way | |
// to make models, is with Google Sketchup, export to Collada, then | |
// manually hack the data and save. | |
// | |
// A version of this code which only requires GLEW and freeglut is to | |
// follow | |
// Daniel Livingstone, Oct 2010 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Vertex Shader – default light | |
// This is based (very closely!) on code extracted from the GLShaderManager provided | |
// by Richard Wright for the OpenGL SuperBible, 5th Edition | |
// The SuperBible source code is available http://www.starstonesoftware.com/OpenGL/ | |
///* GLShaderManager.h | |
// | |
//Copyright (c) 2009, Richard S. Wright Jr. | |
//All rights reserved. | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uwsm0_2 | |
378 | |
48.4251968503937 0 0 0 -38.18897637795276 0 0 0 0 48.4251968503937 -38.18897637795276 0 0 0 11.81102362204724 0 -38.18897637795276 0 0 -38.18897637795276 11.81102362204724 0 0 0 0 0 11.81102362204724 48.4251968503937 0 0 0 0 0 48.4251968503937 0 11.81102362204724 48.4251968503937 0 0 48.4251968503937 -38.18897637795276 11.81102362204724 48.4251968503937 -38.18897637795276 0 48.4251968503937 -26.57597781267043 11.81102362204724 48.4251968503937 0 11.81102362204724 48.4251968503937 -38.18897637795276 11.81102362204724 0 -38.18897637795276 0 48.4251968503937 -38.18897637795276 0 0 -38.18897637795276 11.81102362204724 40.11978340741202 -38.18897637795276 11.81102362204724 31.92395467371481 -38.18897637795276 11.81102362204724 0 -38.18897637795276 11.81102362204724 27.25139183695274 -35.34645501628111 11.81102362204724 0 0 11.81102362204724 29.82020513564828 -37.31757478744946 11.81102362204724 31.92395467371481 -38.18897637795276 11.81102362204724 25.28027206578439 -32.77764171758558 11.81102362204724 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// BASS demo test | |
// A very basic OpenGL/GLUT application | |
// Create a window, load some sounds and play them. | |
// A test program for BASS - available from http://www.un4seen.com/ | |
// This program uses two sound effects - available from http://www.freesound.org/ | |
// To test this program you will need two wav sound effect files! | |
#include "bass.h" | |
#include <iostream> | |
#include <GL/glut.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <fstream> | |
// Windows specific: Uncomment the following line to open a console window for debug output | |
#if _DEBUG | |
#pragma comment(linker, "/subsystem:\"console\" /entry:\"WinMainCRTStartup\"") | |
#endif | |
// Simple OpenGL GLM/SDL demo | |
// Renders a rotating pyramid, showing 3 of 4 sides (allowing back faces to be seen) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Annotated C++ program to illustrate use of bitshift | |
// operators and bitfields | |
// CC-BY-SA Daniel Livingstone | |
// University of the West of Scotland | |
// Preprocessor directive to include the i/o library: | |
#include <iostream> | |
// i/o functions are part of the standard library | |
// & we are using the standard library 'namespace' in this program |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Simple decorator pattern example | |
// (c) Daniel Livingstone 2012 | |
// CC-BY-SA | |
#include <string> | |
#include <iostream> | |
using namespace std; | |
class AbstractNPC { | |
public: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// main.cpp | |
// A very basic OpenGL/GLUT application using the deprecated OpenGL 1.x | |
// (c) Daniel Livingstone, 2012 | |
// The structure of this program is typical of many simple OpenGL demonstration | |
// programs, but is unsuitable for larger projects: The very basic structure | |
// is useful when learning OpenGL, but very poor for building large, complex | |
// systems such as modern games |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Game Engine Design - SDL base code | |
// This sample project has a complete lack of OO design and makes use of | |
// a very large number of global variables. What it does do, is demonstrate | |
// use of SDL for window/event management with OpenGL for graphics rendering | |
// This project requires the following 3rd party libraries: | |
// - glew (GL extension wrangler, for access to OpenGL past 1.1 on Windows) | |
// - SDL (base libraries) | |
// - SDL_ttf (to render text to a surface/texture for display in OpenGL) | |
// | |
// There are MANY ways to improve this code, some of which are identified in |
OlderNewer