Class TPixelTextureNode

Unit

Declaration

type TPixelTextureNode = class(TAbstractX3DTexture2DNode)

Description

Texture specified as an explicit array of pixel values (see FdImage field).

This is useful when authoring X3D, as you can place texture contents directly inside the X3D file (without the need for any external file).

PixelTexture is also comfortable when using Object Pascal to construct the X3D graph. In this case, it allows to provide an image as a ready TCastleImage instance, by changing the value of the TPixelTextrueNode.FdImage.Value.

An alternative to PixelTexture is to use "data URI". With "data URI", you can embed any file contents inside an URL. This way, you can use ImageTexture, and inside ImageTexture.url field you can place an embedded image contents (instead of a normal URL or filename). To convert your image file to a "data URI", you can our tool "to_data_uri". The image contents stay compressed this way (although expressed in base64), so it may be more compact than PixelTexture.

Hierarchy

Overview

Methods

Public procedure CreateNode; override;
Public class function ClassX3DType: string; override;
Public function TextureDescription: string; override;

Properties

Public property FdImage: TSFImage read FFdImage;

Description

Methods

Public procedure CreateNode; override;
 
Public class function ClassX3DType: string; override;
 
Public function TextureDescription: string; override;
 

Properties

Public property FdImage: TSFImage read FFdImage;
 

Generated by PasDoc 0.16.0.