Главная » Статьи » Basic4GL |
dim x, y, a1#,a2#, b# while true glClear (GL_DEPTH_BUFFER_BIT or GL_COLOR_BUFFER_BIT) glLoadIdentity () glTranslatef (0, 0, -16) glRotatef (a1#, 1,0, 0) glRotatef (a2#, 0, 1, 0) for y = -5 to 5: for x = -5 to 5 glPushMatrix () glTranslatef (x * 3, y * 3, 0) glBegin (GL_QUADS) glColor3f (1, 0, 0): glVertex2f ( 1, 1) glColor3f (0, 1, 0): glVertex2f (-1, 1) glColor3f (0, 0, 1): glVertex2f (-1,-1) glColor3f (1, 1, 1): glVertex2f ( 1,-1) glEnd () glPopMatrix () Next: Next glRotatef (a1#, 1,0, 0) glRotatef (a2#, 0, 1, 0) for y = -5 to 5: for x = -5 to 5 glPushMatrix () glTranslatef (x * 3, y * 3, 0) glBegin (GL_QUADS) glColor3f (1, 0, 0): glVertex2f ( 1, 1) glColor3f (0, 1, 0): glVertex2f (-1, 1) glColor3f (0, 0, 1): glVertex2f (-1,-1) glColor3f (1, 1, 1): glVertex2f ( 1,-1) glEnd () glPopMatrix () Next: Next glRotatef (a1#, 1,0, 0) glRotatef (a2#, 0, 1, 0) for y = -5 to 5: for x = -5 to 5 glPushMatrix () glTranslatef (x * 3, y * 3, 0) glBegin (GL_QUADS) glColor3f (1, 0, 0): glVertex2f ( 1, 1) glColor3f (0, 1, 0): glVertex2f (-1, 1) glColor3f (0, 0, 1): glVertex2f (-1,-1) glColor3f (1, 1, 1): glVertex2f ( 1,-1) glEnd () glPopMatrix () Next: Next
SwapBuffers () a1# = a1# + Mouse_XD() *100 a2# = a2# + Mouse_YD() *100 wend | |
Просмотров: 302 | Рейтинг: 0.0/0 |
Меню сайта |
---|
Категории раздела | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Мини-чат |
---|
Статистика |
---|
Онлайн всего: 4 Гостей: 4 Пользователей: 0 |
Форма входа |
---|
Друзья сайта |
---|
Поиск |
---|