-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLR.cpp
More file actions
31 lines (30 loc) · 874 Bytes
/
LR.cpp
File metadata and controls
31 lines (30 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// #include <GL/glew.h> // has to be included before gl.h, or any header that includes gl.h
#include<GL/gl.h>
#include <GL/freeglut.h>
#include<GL/glut.h>
void display(){
glClear(GL_COLOR_BUFFER_BIT);
glutSwapBuffers();
}
void reshape(int w,int h){
glViewport(0,0,w,h);
}
void initOpenGL(){
glClearColor(0.8,0.0,0.0,1.0);
}
int main(int argc,char **argv){
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH);
glutInitWindowPosition(100.0,100.0);
glutInitWindowSize(1000,500);
glutCreateWindow("Logistic Regression");
initOpenGL();
// glutFullScreen(); // making the window full screen
//Above line works but no controls given
glutDisplayFunc(display);
glutIdleFunc(display);
glutReshapeFunc(reshape); //~~Define reshape
// myinit();
glutMainLoop();
return 0;
}