it doesn’t matter how I change the window size or the ortho size I can’t get it to show the points I have set up.
this is my test draw function.
#include <glut.h>
#include <cmath>
#include "point.h"
#include "Monster.h"
#ifndef DRAW_MAIN
#define DRAW_MAIN
namespace Wall{
Arm test(2,1);
static void DrawMain(){
//monsters.DrawMonster();
test.DrawArm();
glBegin(GL_QUADS);
glColor3f(0.5, 0.5, 0.5);
glVertex3f(.5,0,0);
glVertex3f(.5,.5,0);
glVertex3f(0,.5,0);
glVertex3f(0,0,0);
glEnd();
}
}
#endif
the DrawArm is the function I am trying to get it to draw but its not. So I added the other square in to see if it would even draw that and I still just get a plain white screen every time.
this is my main.cpp I don’t know if it will help you or not.
#include <iostream>
#include <vector>
#include <glut.h>
#include "Draw.h"
using namespace Wall;
void Initialize();
int main(int iArgc, char** cppArgv) {
vector<Monster> monsters;
glutInit(&iArgc, cppArgv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(1400, 775);
glutInitWindowPosition(0, 0);
glutCreateWindow("Monster");
Initialize();
glutDisplayFunc(DrawMain);
glutMainLoop();
return 0;
}
void Initialize() {
glClearColor(1.0, 1.0, 1.0, 1.0);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
}
I don’t know whats wrong.