Menu

#193 Forest demo does not compile: uses SetupTextureCombiners

open
nobody
None
5
2011-12-18
2011-12-18
Jan Derk
No

The forsest demo in the trunc does not compile as it still uses SetupTextureCombiners which is no longer available. I have to warn you guys that I am a absolute newbie in 3D. But I did this to fix it:

// JDMOD 18 Dec 2011: SetupTextureCombiners replace with GetTextureCombiners
lStringList := TStringList.Create;
try

if enableTex2DReflection then
begin
// SetupTextureCombiners('Tex0:=Tex1*Tex0;'#13#10
// + 'Tex1:=Tex0+Col;'#13#10
// + 'Tex2:=Tex1+Tex2-0.5;');

lStringList.Add('Tex0:=Tex1*Tex0;');
lStringList.Add('Tex1:=Tex0+Col;');
lStringList.Add('Tex2:=Tex1+Tex2-0.5;');

GetTextureCombiners(lStringList);

GL.Color4f(0.0, 0.3, 0.3, 1);
end
else
begin
// SetupTextureCombiners('Tex0:=Tex1*Tex0;'#13#10
// + 'Tex1:=Tex0+Col;');

lStringList.Add('Tex0:=Tex1*Tex0;');
lStringList.Add('Tex1:=Tex0+Col;');

GetTextureCombiners(lStringList);

GL.Color4f(0.0, 0.4, 0.7, 1);
end;

finally
lStringList.Free;
end;
==============================

Discussion