Breve tabella di colori base in OpenGL
glColor3f(0.0, 0.0, 0.0); /* black */
glColor3f(1.0, 0.0, 0.0); /* red */
glColor3f(0.0, 1.0, 0.0); /* green */
glColor3f(1.0, 1.0, 0.0); /* yellow */
glColor3f(0.0, 0.0, 1.0); /* blue */
glColor3f(1.0, 0.0, 1.0); /* magenta */
glColor3f(0.0, 1.0, 1.0); /* cyan */
glColor3f(1.0, 1.0, 1.0); /* white */
Riferimento:
OpenGL Guide (Libro Rosso)
Black glColor3f(0.0, 0.0, 0.0)
Red glColor3f(1.0, 0.0, 0.0)
Green glColor3f(0.0, 1.0, 0.0)
Yellow glColor3f(1.0, 1.0, 0.0)
Blue glColor3f(0.0, 0.0, 1.0)
Magenta glColor3f(1.0, 0.0, 1.0)
Cyan glColor3f(0.0, 1.0, 1.0)
Dark gray glColor3f(0.25, 0.25, 0.25)
Light gray glColor3f(0.75, 0.75, 0.75)
Brown glColor3f(0.60, 0.40, 0.12)
Pumpkin orange glColor3f(0.98, 0.625, 0.12)
Pastel pink glColor3f(0.98, 0.04, 0.7)
Barney purple glColor3f(0.60, 0.40, 0.70)
White glColor3f(1.0, 1.0, 1.0)
Riferiemnto:
Libro Blu
Visualizzazione post con etichetta opengl. Mostra tutti i post
Visualizzazione post con etichetta opengl. Mostra tutti i post
venerdì 3 maggio 2013
venerdì 7 dicembre 2012
OpenGL su windows 7
alcuni appunti per installare OpenGL su windows 7
il mio pc è un po' datato quindi supporta fino alla 2.1
1. ricordarsi che con windows opengl sono supportate a livello driver e dovrebbero esser già nel sistema operativo, meglio comunque aggiornare i driver della propria scheda grafica.
2. per esser sicuro si può installare opengl extension viewer che testa quali opengl si possono utilizzare con i driver grafici installati.
3. preso da internet alcuni appunti sulle opengl
il mio pc è un po' datato quindi supporta fino alla 2.1
1. ricordarsi che con windows opengl sono supportate a livello driver e dovrebbero esser già nel sistema operativo, meglio comunque aggiornare i driver della propria scheda grafica.
2. per esser sicuro si può installare opengl extension viewer che testa quali opengl si possono utilizzare con i driver grafici installati.
3. preso da internet alcuni appunti sulle opengl
We need the following sets of libraries in programming OpenGL:
- Core OpenGL (GL): consists of hundreds of functions, which begin with a prefix "gl" (e.g., glColor, glVertex, glTranslate, glRotate). The Core OpenGL models an object via a set of geometric primitives, such as point, line, and polygon.
- OpenGL Utility Library (GLU): built on-top of the core OpenGL to provide important utilities and more building models (such as qradric surfaces). GLU functions start with a prefix "glu" (e.g., gluLookAt, gluPerspective)
- OpenGL Utilities Toolkit (GLUT): provides support to interact with the Operating System (such as creating a window, handling key and mouse inputs); and more building models (such as sphere and torus). GLUT functions start with a prefix of "glut" (e.g., glutCreatewindow, glutMouseFunc).
- Quoting from the opengl.org: "GLUT is designed for constructing small to medium sized OpenGL programs. While GLUT is well-suited to learning OpenGL and developing simple OpenGL applications, GLUT is not a full-featured toolkit so large applications requiring sophisticated user interfaces are better off using native window system toolkits. GLUT is simple, easy, and small."
- Alternative of GLUT includes SDL, ....
- OpenGL Extension Wrangler Library (GLEW): "GLEW is a cross-platform open-source C/C++ extension loading library. GLEW provides efficient run-time mechanisms for determining which OpenGL extensions are supported on the target platform." Source and pre-build binary available at http://glew.sourceforge.net/.
- installazione di glut per la parte grafica.
Reference
http://www.hackorama.com/opengl/
http://www.opengl.org/resources/libraries/glut/
http://www3.ntu.edu.sg/home/ehchua/programming/opengl/HowTo_OpenGL_C.html
http://web.eecs.umich.edu/~sugih/courses/eecs487/glut-howto/
Iscriviti a:
Post (Atom)