Subversion Repositories Kolibri OS

Rev

Rev 4464 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4464 Rev 4472
Line 1... Line 1...
1
#include 
1
#include 
2
#include 
2
#include 
3
#include 
3
#include 
4
#include 
4
#include 
Line -... Line 5...
-
 
5
 
-
 
6
#include 
-
 
7
#include 
-
 
8
 
5
 
9
#ifndef GLAPIENTRY
-
 
10
#define GLAPIENTRY
-
 
11
#endif
6
#define EGL_EGLEXT_PROTOTYPES
12
 
7
#include "EGL/egl.h"
-
 
8
#include "EGL/eglext.h"
-
 
9
#include "GL/gl.h"
-
 
10
#include "gbm.h"
-
 
Line 11... Line 13...
11
#include 
13
#include "EGL/egl.h"
Line 12... Line 14...
12
 
14
 
Line 46... Line 48...
46
    eglutPostRedisplay();
48
    eglutPostRedisplay();
47
}
49
}
Line 48... Line 50...
48
 
50
 
49
static void reshape(int width, int height)
51
static void reshape(int width, int height)
50
{
-
 
-
 
52
{
51
  asm volatile ("int3");
53
 
52
/*
54
/*
Line 53... Line 55...
53
    glViewport(0, 0, (GLint)width, (GLint)height);
55
    glViewport(0, 0, (GLint)width, (GLint)height);
54
 
56
 
55
    glMatrixMode(GL_PROJECTION);
57
    glMatrixMode(GL_PROJECTION);
56
    glLoadIdentity();
58
    glLoadIdentity();
57
    glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 100.0);
59
    glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 100.0);
58
    glMatrixMode(GL_MODELVIEW);
60
    glMatrixMode(GL_MODELVIEW);
59
    glLoadIdentity();
-
 
Line 60... Line 61...
60
*/
61
    glLoadIdentity();
Line -... Line 62...
-
 
62
*/
-
 
63
 
61
    glViewport(0, 0, (GLint) width, (GLint) height);
64
    GLfloat h = (GLfloat) height / (GLfloat) width;
62
 
65
 
63
    GLfloat h = (GLfloat) height / (GLfloat) width;
66
    glViewport(0, 0, (GLint) width, (GLint) height);
Line 64... Line 67...
64
 
67
 
Line 100... Line 103...
100
 
103
 
101
   eglutIdleFunc(idle);
104
   eglutIdleFunc(idle);
102
   eglutReshapeFunc(reshape);
105
   eglutReshapeFunc(reshape);
Line 103... Line 106...
103
   eglutDisplayFunc(draw);
106
   eglutDisplayFunc(draw);
Line 104... Line 107...
104
 
107
 
105
   glClearColor( 0, 0, 0, 1.0);
108
   glClearColor( 0, 0, 0, 1);
Line 106... Line 109...
106
 
109
 
Line 107... Line 110...
107
   init();
110
 //  init();
108
   glDrawBuffer(GL_BACK);
111
   glDrawBuffer(GL_BACK);
-
 
112