Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
I have a question. Do Andorra has light?
If yes, what kind of light Andorra has?
And how to realize that?
I saw the simples and find just:
with Engine.Surface.Canvas do
Brush.BlendMode := bmAdd;
Brush.Color := Ad_ARGB(round(Alpha/2),255,255,255);
Brush.GradientColor := Ad_ARGB(0,255,255,255);
Pen.Style := apNone;
Brush.BlendMode := bmAlpha;
Image.Color := Color;
old := Engine.Surface.Scene.AmbientColor;
Engine.Surface.Scene.AmbientColor := Ad_ARGB(255, 255, 255, 255);
Engine.Surface.Scene.AmbientColor := old;
How to do light better.
Also, in help I find type TAD2dLight, but I don't understand how to use that in 2d application. =( Help plz.
TAd2dLight realises per-vertex lighting and directly wraps around the corresponding 3D-API functions. If you want to use it, you might want to increae the vertex count of the TAdImage instances (there's a property for that, just don't know its name anymore) you're drawing.
If you want to use per-pixel lighting, have a look at this post (it's in german though):
igel457, Thank you very much.
I have to use StencilBuffer.
Am I understood rightly?
P.S. I would appreciate If you give demo for this lighting.
yes, you can use the stencil buffer. Just in case you want to render a "soft" light (with gradient) you should use the "bmMultiply" technique discussed in the link above.
Sorry that I can't provide a demo, I neither have a running Delphi-/Lazarus installation somwhere, nor do I have the time to setup one.
I hope this helps a bit,