DGL
https://delphigl.com/forum/

blending with a constant color on low spec graphic cards?
https://delphigl.com/forum/viewtopic.php?f=19&t=2476
Seite 1 von 1

Autor:  noeska [ Sa Feb 07, 2004 20:10 ]
Betreff des Beitrags:  blending with a constant color on low spec graphic cards?

i want to create a transparent surface with emboss bumpmapping.
for the emboss bumpmapping is use the alpha channel.
so i cannot use it anymore for controlling how transparent the surface will be.
I figured out it is possible to use the following with opengl 1.4:
Code:
  1.   glblendcolor(1,1,1,0.1); //0.0 = solid 1.0 = transparent
  2.   glBlendFunc(GL_SRC_ALPHA, GL_CONSTANT_ALPHA); //now object is not affected by alpha channel of texture

This seems to do the trick. But only on high end graphics cards as a test on a TNT graphics card gives a 0-1 fps framerate.
Using only:
Code:
  1. glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);

Gives me back 33fps. But without the control on how transparent the surface is.
Is there a way do both on a TNT?[/code]

Autor:  Sascha Willems [ So Feb 08, 2004 12:16 ]
Betreff des Beitrags: 

AFAIK, there is no other way of blending with a constant color on older cards if you already use the alpha channel. The problem is the fact that for example GL_CONSTANT_ALPHA is part of the GL_EXT_Blend_Color-Extension and that is only supported on TNT-Cards since the 43.45 driver release, which most likeley means that it's done in software on that cards (that should explain why it's so slow. And I'm also quite shure that there's no other way to do blending with a constant alpha.
So you have two possibilites : Either forget about users with such old hardware as the RivaTNT(2), which is in my eyes the best option. Or you'll have to write two renderpaths and use GL_SRC_ALPHA / GL_ONE_MINUS_SRC_ALPHA on TNT-Cards.

Seite 1 von 1 Alle Zeiten sind UTC + 1 Stunde
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/