-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
70 lines (57 loc) · 1.22 KB
/
main.c
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#include "GL/gl.h"
#include "SDL/SDL.h"
void _start()
{
SDL_Event event;
SDL_SetVideoMode(640,480,0,SDL_OPENGL|SDL_FULLSCREEN);
SDL_ShowCursor(SDL_DISABLE);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-1.33,1.33,-1,1,1.5,100);
glMatrixMode(GL_MODELVIEW);
glEnable(GL_DEPTH_TEST);
glClear(GL_DEPTH_BUFFER_BIT|GL_COLOR_BUFFER_BIT);
glLoadIdentity();
glBegin(GL_TRIANGLES);
glVertex3i(1,1,-10);
glVertex3i(1,-1,-10);
glVertex3i(-1,1,-10);
glEnd();
SDL_GL_SwapBuffers();
do
{
SDL_PollEvent(&event);
} while (event.type!=SDL_KEYDOWN);
SDL_Quit();
asm ( \
"movl $1,%eax\n" \
"xor %ebx,%ebx\n" \
"int $128\n" \
);
}
/*
int main()
{
SDL_Event event;
SDL_SetVideoMode(640,480,0,SDL_OPENGL|SDL_FULLSCREEN);
SDL_ShowCursor(SDL_DISABLE);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-1.33,1.33,-1,1,1.5,100);
glMatrixMode(GL_MODELVIEW);
glEnable(GL_DEPTH_TEST);
glClear(GL_DEPTH_BUFFER_BIT|GL_COLOR_BUFFER_BIT);
glLoadIdentity();
glBegin(GL_TRIANGLES);
glVertex3i(1,1,-10);
glVertex3i(1,-1,-10);
glVertex3i(-1,1,-10);
glEnd();
SDL_GL_SwapBuffers();
do
{
SDL_PollEvent(&event);
} while (event.type!=SDL_KEYDOWN);
SDL_Quit();
}
*/