LẬP TRÌNH OPENGL VỚI THƯ VIỆN AUX - Trang 6

Bùi Minh Trường

Lập trình Opengl với thư viện AUX

(Tài liệu tham khảo của trường đại học wakayama Nhật)

2

2-Theo dõi Window
/*file name: hello1s.cpp*/
#ifdef unix
#include <GL/gl.h>
#include "aux.h"
#define CALLBACK
#else
#include<windows.h>
#include<GL/gl.h>
#include<GL/glaux.h>
#endif
int main(int argc, char *argv[])
{
auxInitWindow(argv[0]);
/*dòng lệnh mới , window sẽ hiện trong vòng 1 giây*/
Sleep(1000);
/*dòng lệnh mới*/
return 0;
}
Trong phần source code mã nguồn này nằm trong file hello1s.cpp.
3-Xoá màn hình trong opengl
Tiếp theo tôi sẽ giới thiệu với các bạn cách xoá màn hình trong
opengl.Dưới đây là mã nguồn:
/*filename: clear.cpp*/
#ifdef unix
#include <GL/gl.h>
#include "aux.h"
#define CALLBACK