dungeon_crawler

view prototype/src/tile.cc @ 1:96de911d05d4

started a rough prototype
author John Tsiombikas <nuclear@mutantstargoat.com>
date Thu, 28 Jun 2012 06:05:50 +0300
parents
children 31e53fd79c2d
line source
1 #include <stdio.h>
2 #include "opengl.h"
3 #include "tile.h"
5 bool Tile::load(const char *fname)
6 {
7 return true;
8 }
10 void Tile::draw() const
11 {
12 float color[] = {1, 0, 0, 1};
13 float white[] = {1, 1, 1, 1};
15 glPushAttrib(GL_LIGHTING_BIT);
17 glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, color);
18 glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, white);
19 glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 60.0);
20 glutSolidSphere(0.5, 16, 8);
22 glPopAttrib();
23 }