Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
textures [2020/05/25 12:28] – [Example] admintextures [2020/05/25 12:31] – [Example] admin
Line 88: Line 88:
  
 <file pascal> <file pascal>
-LTexture :TGorillaTextureBitmap.Create(1024, 1024)+var LTexture : TGorillaTextureBitmap; 
-LTexture.BeginSetup(); +begin 
-try +  // request the texture and convert to Gorilla3D texture bitmap
-    with LTexture do +  LTexture := GorillaLambertMaterialSource.Texture as TGorillaTextureBitmap
-    begin +   
-        Components := TPixelFormatEx.RGB32F+  // start manipulating properties and update them in GPU. 
-        Format := TPixelFormatEx.RGB+  LTexture.BeginSetup(); 
-        MinFilter := TTextureFilter.Linear+  try 
-        MagFilter := TTextureFilter.Linear+        LTexture.MinFilter := TTextureFilter.Nearest
-        WrapS := TGorillaTextureWrap.ClampToBorder; +        LTexture.MagFilter := TTextureFilter.Nearest
-        WrapT := TGorillaTextureWrap.ClampToBorder; +        LTexture.Style := LTexture.Style - [TTextureStyle.MipMaps]
-    end+  finally 
-finally +      LTexture.EndSetup()
-    LTexture.EndSetup();+  end; 
 +   
 +  // re-assign texture to update for shader 
 +  GorillaLambertMaterialSource.Texture := LTexture;
 end; end;
 </file> </file>