Registriert: Di Jul 01, 2003 18:59 Beiträge: 887 Wohnort: (The Netherlands)
Programmiersprache: fpc/delphi/java/c#
Who can provide me with extra info on the glcolormask?
For my vector graphics project i need 2 different fills one with color and one on the alpha channel.
So i thought i could do:
Code:
//draw fill
glColorMask(TRUE,TRUE, TRUE, FALSE); //but not yet alpha
fStyle.DrawFill(fBoundBoxRadius);
//draw fill alpha
glColorMask(FALSE,FALSE,FALSE, TRUE);
fStyle.DrawAlphaFill(fBoundBoxRadius);
But the alpha channel does not get set. Only if i enable the colors in the second part i get the alpha channel working. But then the collors are all wrong... as i blend white over other colors.
Thanks in advance for your ideas on how to solve this.
[EDIT]
Meanwhile i have been playing around with using different blend modes together with the colormask settings
on drawing the fill i use glBlendFunc(GL_DST_COLOR, GL_ZERO) and on the alpha glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) and the result looks ok'ish.
Registriert: Di Jul 01, 2003 18:59 Beiträge: 887 Wohnort: (The Netherlands)
Programmiersprache: fpc/delphi/java/c#
The current status (with quads for simplicity):
Renders 2 quads (red and blue) on a green quad. The 2 quads have a linear gradient on the alpha.
Seems ok'ish.
Mitglieder in diesem Forum: 0 Mitglieder und 6 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.