PortableCompressedTexture2D

package
v0.0.0-...-5fa07e4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package PortableCompressedTexture2D provides methods for working with PortableCompressedTexture2D object instances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsKeepingAllCompressedBuffers

func IsKeepingAllCompressedBuffers() bool

Return whether the flag is overridden for all textures of this type.

func SetKeepAllCompressedBuffers

func SetKeepAllCompressedBuffers(keep bool)

Overrides the flag globally for all textures of this type. This is used primarily by the editor.

Types

type Advanced

type Advanced = class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

type Any

type Any interface {
	gd.IsClass
	AsPortableCompressedTexture2D() Instance
}

type CompressionMode

type CompressionMode = gdclass.PortableCompressedTexture2DCompressionMode //gd:PortableCompressedTexture2D.CompressionMode
const (
	CompressionModeLossless       CompressionMode = 0
	CompressionModeLossy          CompressionMode = 1
	CompressionModeBasisUniversal CompressionMode = 2
	CompressionModeS3tc           CompressionMode = 3
	CompressionModeEtc2           CompressionMode = 4
	CompressionModeBptc           CompressionMode = 5
)

type Instance

This class allows storing compressed textures as self contained (not imported) resources. For 2D usage (compressed on disk, uncompressed on VRAM), the lossy and lossless modes are recommended. For 3D usage (compressed on VRAM) it depends on the target platform. If you intend to only use desktop, S3TC or BPTC are recommended. For only mobile, ETC2 is recommended. For portable, self contained 3D textures that work on both desktop and mobile, Basis Universal is recommended (although it has a small quality cost and longer compression time as a tradeoff). This resource is intended to be created from code.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsPortableCompressedTexture2D

func (self Instance) AsPortableCompressedTexture2D() Instance

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) AsTexture

func (self Instance) AsTexture() Texture.Instance

func (Instance) AsTexture2D

func (self Instance) AsTexture2D() Texture2D.Instance

func (Instance) CreateFromImage

func (self Instance) CreateFromImage(image [1]gdclass.Image, compression_mode gdclass.PortableCompressedTexture2DCompressionMode)

Initializes the compressed texture from a base image. The compression mode must be provided. [param normal_map] is recommended to ensure optimum quality if this image will be used as a normal map. If lossy compression is requested, the quality setting can optionally be provided. This maps to Lossy WebP compression quality.

func (Instance) GetCompressionMode

Return the compression mode used (valid after initialized).

func (Instance) GetFormat

func (self Instance) GetFormat() gdclass.ImageFormat

Return the image format used (valid after initialized).

func (Instance) KeepCompressedBuffer

func (self Instance) KeepCompressedBuffer() bool

func (Instance) SetKeepCompressedBuffer

func (self Instance) SetKeepCompressedBuffer(value bool)

func (Instance) SetSizeOverride

func (self Instance) SetSizeOverride(value Vector2.XY)

func (Instance) SizeOverride

func (self Instance) SizeOverride() Vector2.XY

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL