Files |  Tutorials |  Articles |  Links |  Home |  Team |  Forum |  Wiki |  Impressum

Aktuelle Zeit: Di Mai 14, 2024 04:33

Foren-Übersicht » English » English Programming Forum
Unbeantwortete Themen | Aktive Themen



Ein neues Thema erstellen Auf das Thema antworten  [ 2 Beiträge ] 
Autor Nachricht
 Betreff des Beitrags: rotating a fill (2d)
BeitragVerfasst: So Okt 04, 2009 13:06 
Offline
DGL Member
Benutzeravatar

Registriert: Di Jul 01, 2003 18:59
Beiträge: 887
Wohnort: (The Netherlands)
Programmiersprache: fpc/delphi/java/c#
For my glvg project i use gradient fills. Fills are applied using the stencil buffer e.g. first the shape is drawn in the stencil buffer next the fill is drawn over that.
Now that goes ok for not rotated fills on square shapes. But goes wrong with a rotated shape on a rectangular shape. (with and height are different).
So if i rotate a fill 90 degrees with and height will 'swap' making the fill not fill the entire shape. So somehow i need adjust sizes of the rotated fill so that it overlaps the shape again.
I have been puzzling with this for a while and so far i have not found a 'good enough' solution. If you have ideas on this let me know...

_________________
http://3das.noeska.com - create adventure games without programming


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mo Okt 05, 2009 09:27 
Offline
DGL Member
Benutzeravatar

Registriert: Di Jul 01, 2003 18:59
Beiträge: 887
Wohnort: (The Netherlands)
Programmiersprache: fpc/delphi/java/c#
solved...

it also involved rotating around a point.
i use gltranslatef and glrotatef also i do a manual rotatation around a point to get the correct new x point. Both methods were a bit out of sync and i had some nasty left over code in the box drawing that overruled the outcome coords partly, next i 'fixed' a part that was correct in the first place and i got some chaos :-( .

Lessons learned. Keep your code clean and simple as possible ...

_________________
http://3das.noeska.com - create adventure games without programming


Nach oben
 Profil  
Mit Zitat antworten  
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 2 Beiträge ] 
Foren-Übersicht » English » English Programming Forum


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast


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.

Suche nach:
Gehe zu:  
cron
  Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de
[ Time : 0.046s | 17 Queries | GZIP : On ]