GL_POLYGON n'est pas rempli correctement?
Pourquoi ces lignes apparaissent-elles dans ma forme?
Je suis OpenGL comme celui-ci d'initialisation:
glDisable(GL_TEXTURE_2D);
glDisable(GL_DEPTH_TEST);
glDisable(GL_COLOR_MATERIAL);
glEnable(GL_BLEND);
glEnable(GL_POLYGON_SMOOTH);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glClearColor(0, 0, 0, 0);
et le dessin de la forme comme ceci:
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1, 0, 0);
glBegin(GL_POLYGON);
glVertex2f(-5, -5); // bottom left
glVertex2f(5, -5); // bottom right...
glVertex2f(6, 0);
glVertex2f(5, 5);
glVertex2f(-5, 5);
glEnd();
Peu importe si elle est dans le sens horaire ou antihoraire.
Il m'a fallu un moment pour comprendre comment activer le multi-échantillonnage, mais je l'ai eu à travailler. Cela fonctionne bien :) Merci, – mpen