Perguntas com a marcação «legacy-opengl»

1
Por que resultado diferente ao alterar a ordem de entrada em GL_LINES?
Código: #include <math.h> #include <GL/glut.h> #pragma comment(lib, "opengl32") #include <gl/gl.h> #include <gl/glu.h> //Initialize OpenGL void init(void) { glClearColor(0, 0, 0, 0); glViewport(0, 0, 500, 500); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(0, 500, 0, 500, 1, -1); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); } void drawLines(void) { glClear(GL_COLOR_BUFFER_BIT); glColor3f(1.0,1.0,1.0); glBegin(GL_LINES); glVertex3d(0.5, 0.999, 0.0f); glVertex3d(499.501, 0.999, 0.0f); glEnd(); glFlush(); …
Ao utilizar nosso site, você reconhece que leu e compreendeu nossa Política de Cookies e nossa Política de Privacidade.
Licensed under cc by-sa 3.0 with attribution required.