/*	
 *	nosolomac.com
 *  basado en un programa de Jon McCormack http://www.csse.monash.edu.au/~jonmc/CSE3313/
 */
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
#include <GLUT/glut.h>
#include <OpenGL/glext.h>
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>

#define MESSAGE		"Nosolomac"

static GLfloat g_rotate = 45;

void drawText(const char * message)
{

	glRasterPos2f((GLfloat)0, (GLfloat)-400);

	while (*message) {
		glutStrokeCharacter(GLUT_STROKE_ROMAN,*message++);
	}
}

void display(void)
{
    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();

    glScalef(0.001, 0.001, 0.001);
    glRotatef(g_rotate, 0, 0, 1.0);

    glClear( GL_COLOR_BUFFER_BIT );
 	drawText(MESSAGE);

 	glFlush(); /* force OpenGL output */
}

int main(int argc, char **argv)
{
    glutInit(&argc, argv);

    glutInitDisplayMode(GLUT_RGB);
    glutInitWindowSize(300, 300);
    glutCreateWindow("Nosolomac");

	// Funciones de rellamada
    glutDisplayFunc(display);
	glutIdleFunc(NULL);

	// Color de fondo
	glClearColor(0.0, 0.3, 1.0, 1.0);

	// Seleccionar color de la fuente
	glColor3f(1.0, 1.0, 1.0);

    glutMainLoop();

	return 0;
}

