Wenn ich eine Linie ziehe im Orthosystem, von 0 nach 100 , werden die Kanten(enden) senkrecht nach Unten gezeichnet, sieht bei dicken Linien aus wie ein Parallelogramm. Wie kann man das vermeiden.
Ne Idee wäre: Schreib dir eine eigene Linienfunktion, die ein Quad als Linie zeichnet. Dann kannst du die Enden auch mit Kreisen abrunden, wenn du willst.
_________________ Denn wer nur schweigt, weil er Konflikte scheut, der macht Sachen, die er hinterher bereut. Und das ist verkehrt, denn es ist nicht so schwer, jeden Tag zu tun als ob's der letzte wär’. Und du schaust mich an und fragst ob ich das kann. Und ich denk, ich werd' mich ändern irgendwann. _________________Farin Urlaub - Bewegungslos
Registriert: Do Sep 25, 2003 15:56 Beiträge: 7810 Wohnort: Sachsen - ERZ / C
Programmiersprache: Java (, Pascal)
Das hier hab ich per Google gefunden:
Zitat:
The most consistent and portable way to draw think lines using OpenGL is to use camera aligned (otherwise know as billboarded) polygons. Different implementations of the OpenGL API handle the end points of the lines differently and GL_LINE_SMOOTH produces drastically different results depending on the platform. Some implementations consider lines of thickness greater then 1 to be ill-defined. As stated in the glLineWidth manpages: [For anti-aliased lines] only width 1 is guaranteed to be supported; others depend on the implementation.
That being said, I have used a simple 2 pass hack to address this very problem.
1. Disable writing to the depth buffer glDepthMask(GL_FALSE) 2. Draw smoothed lines of desired thickness 3. Draw smoothed points at the endpoints of all the lines that are the same size at the lines. (this step may not be needed to fill the gap, however it should round out the points where the lines meet and make everything look a little smoother) 4. Re-enable the depth buffer for writing glDepthMask(GL_TRUE)
You may also want to play around with the depth buffer settings. The "gap" between the lines may be due to the 2nd line failing a depth test on pixels that have been alpha blended with the background.
_________________ Blog: kevin-fleischer.de und fbaingermany.com
Mitglieder in diesem Forum: 0 Mitglieder und 4 Gäste
Du darfst keine neuen Themen in diesem Forum erstellen. Du darfst keine Antworten zu Themen in diesem Forum erstellen. Du darfst deine Beiträge in diesem Forum nicht ändern. Du darfst deine Beiträge in diesem Forum nicht löschen. Du darfst keine Dateianhänge in diesem Forum erstellen.