#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <GL/glut.h>
#include "drawPlant.h"

/* GLOBAL VARAIBLES */
/* (storage is actually allocated here) */
int W=1000;  /* window width */
int H=800;  /* window height */

/* local function declarations */
void display(void);
void init(void);

int main (int argc, char** argv) {
  int win;

  glutInit(&argc,argv);
  glutInitWindowSize(W,H);
  glutInitWindowPosition(100,100);
  glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
  win = glutCreateWindow("plant");
  glutSetWindow(win);
  init();
  glutDisplayFunc(display);
  glutMainLoop();
  return 0;
}

void init() {
  glClearColor(0.0, 0.0, 0.0, 0.0);  
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  glOrtho(-50.0, 50.0, 0.0, 80.0, -1.0, 1.0);
}


void display() {

  glClear(GL_COLOR_BUFFER_BIT);

  /* put plant drawing code here */

  drawPlant();

  /* end drawing code */

  glFlush();
}









