• Api Documentation
  • Source Code
Search Results for

    Show / Hide Table of Contents
    • SharpAssimp
      • Animation
      • AnimationBehaviour
      • AnimationInterpolation
      • AssimpContext
      • AssimpException
      • BlendMode
      • Bone
      • BoundingBox
      • Camera
      • CompileFlags
      • ConsoleLogStream
      • DefaultLogStream
      • EmbeddedTexture
      • ExcludeComponent
      • ExportDataBlob
      • ExportFormatDescription
      • Face
      • FileIOMode
      • FileIOSystem
      • FreeNativeDelegate
      • IMarshalable<Managed, Native>
      • INativeCustomMarshaler
      • IOStream
      • IOSystem
      • ImporterDescription
      • ImporterFeatureFlags
      • Light
      • LightSourceType
      • LogStream
      • LoggingCallback
      • Material
      • Material.PBRMaterialProperties
      • Material.ShaderMaterialProperties
      • MaterialProperty
      • Matrix3x3
      • MemoryHelper
      • Mesh
      • MeshAnimationAttachment
      • MeshAnimationChannel
      • MeshKey
      • MeshMorphAnimationChannel
      • MeshMorphKey
      • MeshMorphingMethod
      • MetaDataType
      • Metadata
      • Metadata.Entry
      • NativeCustomMarshalerAttribute
      • Node
      • NodeAnimationChannel
      • NodeCollection
      • Origin
      • PostProcessPreset
      • PostProcessSteps
      • PrimitiveType
      • PropertyType
      • QuaternionKey
      • Ray
      • ReturnCode
      • Scene
      • SceneFlags
      • ShadingMode
      • Texel
      • TextureFlags
      • TextureMapping
      • TextureOperation
      • TextureSlot
      • TextureType
      • TextureWrapMode
      • UVTransform
      • UVTransformFlags
      • VectorKey
      • VertexWeight
    • SharpAssimp.Configs
      • ACEvaluateSubdivisionConfig
      • ACSeparateBackfaceCullConfig
      • ASEReconstructNormalsConfig
      • AnimationAccuracyConfig
      • AppScaleConfig
      • BooleanPropertyConfig
      • ColladaIgnoreUpDirectionConfig
      • ColladaUseColladaNamesConfig
      • DeboneAllOrNoneConfig
      • DeboneThresholdConfig
      • ExportPointCloudsConfig
      • FBXConvertToMetersConfig
      • FBXImportAllGeometryLayersConfig
      • FBXImportAllMaterialsConfig
      • FBXImportAnimationsConfig
      • FBXImportCamerasConfig
      • FBXImportEmbeddedTexturesConfig
      • FBXImportEmbeddedTexturesLegacyNamingConfig
      • FBXImportLightsConfig
      • FBXImportMaterialsConfig
      • FBXOptimizeEmptyAnimationCurvesConfig
      • FBXPreservePivotsConfig
      • FBXStrictModeConfig
      • FavorSpeedConfig
      • FloatPropertyConfig
      • GlobalKeyFrameImportConfig
      • GlobalScaleConfig
      • IFCCylindricalTessellationConfig
      • IFCSkipSpaceRepresentationsConfig
      • IFCSmoothingAngleConfig
      • IFCUseCustomTriangulationConfig
      • IRRAnimationFrameRateConfig
      • IgnoreTextureCoordinatesConfig
      • IntegerPropertyConfig
      • KeepSceneHierarchyConfig
      • LWOImportOneLayerConfig
      • LWSAnimationEndConfig
      • LWSAnimationStartConfig
      • MD2KeyFrameImportConfig
      • MD3HandleMultiPartConfig
      • MD3KeyFrameImportConfig
      • MD3ShaderSourceConfig
      • MD3SkinNameConfig
      • MD5NoAnimationAutoLoadConfig
      • MDLColorMapConfig
      • MDLKeyFrameImportConfig
      • MaterialExcludeListConfig
      • MatrixPropertyConfig
      • MaxBoneCountConfig
      • MeasureTimeConfig
      • MeshTriangleLimitConfig
      • MeshVertexLimitConfig
      • MultithreadingConfig
      • NoSkeletonMeshesConfig
      • NodeExcludeListConfig
      • NormalSmoothingAngleConfig
      • NormalizeVertexComponentsConfig
      • OgreMaterialFileConfig
      • OgreTextureTypeFromFilenameConfig
      • PropertyConfig
      • RemoveComponentConfig
      • RemoveDegeneratePrimitivesCheckAreaConfig
      • RemoveDegeneratePrimitivesConfig
      • RemoveEmptyBonesConfig
      • RootTransformationConfig
      • SMDKeyFrameImportConfig
      • SmdLoadAnimationListConfig
      • SortByPrimitiveTypeConfig
      • StringPropertyConfig
      • TangentSmoothingAngleConfig
      • TangentTextureChannelIndexConfig
      • TerragenComputeTexCoordsConfig
      • TransformUVConfig
      • UnrealHandleFlagsConfig
      • UnrealKeyFrameImportConfig
      • VertexBoneWeightLimitConfig
      • VertexCacheSizeConfig
      • XFileUseDoublesConfig
    • SharpAssimp.Unmanaged
      • AiAnimMesh
      • AiAnimation
      • AiBone
      • AiCamera
      • AiConfigs
      • AiDefines
      • AiExportDataBlob
      • AiExportFormatDesc
      • AiFace
      • AiFile
      • AiFileCloseProc
      • AiFileFlushProc
      • AiFileIO
      • AiFileOpenProc
      • AiFileReadProc
      • AiFileSeek
      • AiFileTellProc
      • AiFileWriteProc
      • AiImporterDesc
      • AiLight
      • AiLogStream
      • AiLogStreamCallback
      • AiMatKeys
      • AiMaterial
      • AiMaterialProperty
      • AiMemoryInfo
      • AiMesh
      • AiMeshAnim
      • AiMeshColorArray
      • AiMeshMorphAnim
      • AiMeshMorphKey
      • AiMeshTextureCoordinateArray
      • AiMeshUVComponentArray
      • AiMetadata
      • AiMetadataEntry
      • AiNode
      • AiNodeAnim
      • AiScene
      • AiString
      • AiTexture
      • AssimpLibrary
      • Platform
      • UnmanagedFunctionNameAttribute
      • UnmanagedLibrary
      • UnmanagedLibraryResolver

    Class EmbeddedTexture

    Represents an embedded texture. Some file formats directly embed texture assets. Embedded textures may be uncompressed, where the data is given in an uncompressed format. Or it may be compressed in a format like png or jpg. In the latter case, the raw file bytes are given so the application must utilize an image decoder (e.g. DevIL) to get access to the actual color data. This object represents both types, so some properties may or may not be valid depending if it is compressed or not.

    Inheritance
    object
    EmbeddedTexture
    Implements
    IMarshalable<EmbeddedTexture, AiTexture>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: SharpAssimp
    Assembly: SharpAssimp.dll
    Syntax
    public sealed class EmbeddedTexture : IMarshalable<EmbeddedTexture, AiTexture>

    Constructors

    | Edit this page View Source

    EmbeddedTexture()

    Constructs a new instance of the EmbeddedTexture class. Should use only if reading from a native value.

    Declaration
    public EmbeddedTexture()
    | Edit this page View Source

    EmbeddedTexture(int, int, Texel[], string)

    Constructs a new instance of the EmbeddedTexture class. This creates an uncompressed embedded texture.

    Declaration
    public EmbeddedTexture(int width, int height, Texel[] uncompressedData, string originalFileName = "")
    Parameters
    Type Name Description
    int width

    Width of the texture

    int height

    Height of the texture

    Texel[] uncompressedData

    Color data

    string originalFileName

    Optional file name for the texture.

    Exceptions
    Type Condition
    ArgumentException

    Thrown if the data size does not match width * height.

    | Edit this page View Source

    EmbeddedTexture(string, byte[], string)

    Constructs a new instance of the EmbeddedTexture class. This creates a compressed embedded texture.

    Declaration
    public EmbeddedTexture(string compressedFormatHint, byte[] compressedData, string originalFileName = "")
    Parameters
    Type Name Description
    string compressedFormatHint

    The 3 character format hint.

    byte[] compressedData

    The compressed data.

    string originalFileName

    Optional file name for the texture.

    Properties

    | Edit this page View Source

    CompressedData

    Gets the raw byte data representing the compressed texture. Only valid for compressed textures.

    Declaration
    public byte[]? CompressedData { get; }
    Property Value
    Type Description
    byte[]
    | Edit this page View Source

    CompressedDataSize

    Gets the size of the compressed data. Only valid for compressed textures.

    Declaration
    public int CompressedDataSize { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    CompressedFormatHint

    Gets the format hint to determine the type of compressed data. This hint is a three-character lower-case hint like "dds", "jpg", "png".

    Declaration
    public string? CompressedFormatHint { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Filename

    Gets or sets the texture's original filename.

    Declaration
    public string Filename { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    HasCompressedData

    Gets if the embedded texture has compressed data. Only valid for compressed textures.

    Declaration
    public bool HasCompressedData { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    HasNonCompressedData

    Gets if the texture has non-compressed texel data. Only valid for non-compressed textures.

    Declaration
    public bool HasNonCompressedData { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    Height

    Gets the height of the texture in pixels. Only valid for non-compressed textures.

    Declaration
    public int Height { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    IsCompressed

    Gets if the texture is compressed or not.

    Declaration
    public bool IsCompressed { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    NonCompressedData

    Gets the non-compressed texel data, the array is of size Width * Height. Only valid for non-compressed textures.

    Declaration
    public Texel[]? NonCompressedData { get; }
    Property Value
    Type Description
    Texel[]
    | Edit this page View Source

    NonCompressedDataSize

    Gets the size of the non-compressed texel data. Only valid for non-compressed textures.

    Declaration
    public int NonCompressedDataSize { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Width

    Gets the width of the texture in pixels. Only valid for non-compressed textures.

    Declaration
    public int Width { get; }
    Property Value
    Type Description
    int

    Methods

    | Edit this page View Source

    FreeNative(nint, bool)

    Frees unmanaged memory created by ToNative(nint, out Native).

    Declaration
    public static void FreeNative(nint nativeValue, bool freeNative)
    Parameters
    Type Name Description
    nint nativeValue

    Native value to free

    bool freeNative

    True if the unmanaged memory should be freed, false otherwise.

    Implements

    IMarshalable<Managed, Native>
    • Edit this page
    • View Source
    In this article
    Back to top Copyright (c) 2012-2020 Nicholas Woodfield, (c) 2024 Salvage, (c) 2025 Jérémy Ansel