Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void RysujTekstRastrowy(void* font, char* tekst)
- {
- int i;
- for (i = 0; i < (int)strlen(tekst); i++)
- glutBitmapCharacter(font, tekst[i]);
- }
- void RysujNakladke(void) {
- char buf[255];
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadIdentity();
- glOrtho(0.0, szerokoscOkna, 0.0, wysokoscOkna, -100.0, 100.0);
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glLoadIdentity();
- glDisable(GL_LIGHTING);
- int x = 140, y = 550;
- sprintf(buf, "Szymon Grzesiukiewicz");
- glRasterPos2i(x, y);
- RysujTekstRastrowy(GLUT_BITMAP_8_BY_13, buf);
- y = y - 15;
- sprintf(buf, "Grupa: I8Y6S1");
- glRasterPos2i(x, y);
- RysujTekstRastrowy(GLUT_BITMAP_8_BY_13, buf);
- y = y - 15;
- sprintf(buf, "Parametry bryly:");
- glRasterPos2i(x, y);
- RysujTekstRastrowy(GLUT_BITMAP_8_BY_13, buf);
- y = y - 15;
- sprintf(buf, "R=1; H=3");
- glRasterPos2i(x, y);
- RysujTekstRastrowy(GLUT_BITMAP_8_BY_13, buf);
- y = y - 15;
- sprintf(buf, "przyciski:");
- glRasterPos2i(x, y);
- RysujTekstRastrowy(GLUT_BITMAP_8_BY_13, buf);
- y = y - 15;
- sprintf(buf, "Strzalki oraz [] - poruszanie perspektywa");
- glRasterPos2i(x, y);
- RysujTekstRastrowy(GLUT_BITMAP_8_BY_13, buf);
- y = y - 15;
- sprintf(buf, "s,S ; d,D - wlaczanie i wylaczanie swiatel 1,2");
- glRasterPos2i(x, y);
- RysujTekstRastrowy(GLUT_BITMAP_8_BY_13, buf);
- y = y - 15;
- sprintf(buf, "3-5 - materialy");
- glRasterPos2i(x, y);
- RysujTekstRastrowy(GLUT_BITMAP_8_BY_13, buf);
- y = y - 15;
- sprintf(buf, "b,B - zobrazowanie wektorow");
- glRasterPos2i(x, y);
- RysujTekstRastrowy(GLUT_BITMAP_8_BY_13, buf);
- y = y - 15;
- sprintf(buf, "n,N - Tryby cieniowania");
- glRasterPos2i(x, y);
- RysujTekstRastrowy(GLUT_BITMAP_8_BY_13, buf);
- y = y - 15;
- sprintf(buf, "m - Fill/Lines");
- glRasterPos2i(x, y);
- RysujTekstRastrowy(GLUT_BITMAP_8_BY_13, buf);
- y = y - 15;
- sprintf(buf, "O,P - odleglosc obserwatora");
- glRasterPos2i(x, y);
- RysujTekstRastrowy(GLUT_BITMAP_8_BY_13, buf);
- y = y - 15;
- sprintf(buf, "1,2 - zmiany podzialow poziomych i pionowych");
- glRasterPos2i(x, y);
- RysujTekstRastrowy(GLUT_BITMAP_8_BY_13, buf);
- y = y - 15;
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
- glEnable(GL_LIGHTING);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement