C# Class idTech4.Renderer.idImage

Inheritance: IDisposable
显示文件 Open project: iainmckay/idtech4.net Class Usage Examples

Public Methods

Method Description
ActuallyLoadImage ( bool checkForPrecompressed, bool fromBackEnd ) : void

Absolutely every image goes through this path. On exit, the idImage will have a valid OpenGL texture number that can be bound.

AddReference ( ) : void
Bind ( ) : void

Automatically enables 2D mapping, cube mapping, or 3D texturing if needed.

Dispose ( ) : void
Generate ( byte data, int width, int height, TextureFilter filter, bool allowDownSize, TextureRepeat repeat, TextureDepth depth ) : void

Used by callback functions to specify the actual data data goes from the bottom to the top line of the image, as OpenGL expects it These perform an implicit Bind() on the current texture unit.

The alpha channel bytes should be 255 if you don't want the channel. We need a material characteristic to ask for specific texture modes. Designed limitations of flexibility: No support for texture borders. No support for texture border color. No support for texture environment colors or GL_BLEND or GL_DECAL texture environments, because the automatic optimization to single or dual component textures makes those modes potentially undefined. No non-power-of-two images. No palettized textures. There is no way to specify separate wrap/clamp values for S and T. There is no way to specify explicit mip map levels.

MakeDefault ( ) : void
Purge ( ) : void

Frees the texture object, but leaves the structure so it can be reloaded.

Reload ( bool checkPrecompressed, bool force ) : void
idImage ( string name, ImageLoadCallback generator ) : System
idImage ( string name, TextureType type, TextureFilter filter, TextureRepeat repeat, TextureDepth depth, CubeFiles cubeMap, bool allowDownSize ) : System

Private Methods

Method Description
Dispose ( bool disposing ) : void
StartBackgroundLoad ( ) : void

Method Details

ActuallyLoadImage() public method

Absolutely every image goes through this path. On exit, the idImage will have a valid OpenGL texture number that can be bound.
public ActuallyLoadImage ( bool checkForPrecompressed, bool fromBackEnd ) : void
checkForPrecompressed bool
fromBackEnd bool
return void

AddReference() public method

public AddReference ( ) : void
return void

Bind() public method

Automatically enables 2D mapping, cube mapping, or 3D texturing if needed.
public Bind ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

Generate() public method

Used by callback functions to specify the actual data data goes from the bottom to the top line of the image, as OpenGL expects it These perform an implicit Bind() on the current texture unit.
The alpha channel bytes should be 255 if you don't want the channel. We need a material characteristic to ask for specific texture modes. Designed limitations of flexibility: No support for texture borders. No support for texture border color. No support for texture environment colors or GL_BLEND or GL_DECAL texture environments, because the automatic optimization to single or dual component textures makes those modes potentially undefined. No non-power-of-two images. No palettized textures. There is no way to specify separate wrap/clamp values for S and T. There is no way to specify explicit mip map levels.
public Generate ( byte data, int width, int height, TextureFilter filter, bool allowDownSize, TextureRepeat repeat, TextureDepth depth ) : void
data byte
width int
height int
filter TextureFilter
allowDownSize bool
repeat TextureRepeat
depth TextureDepth
return void

MakeDefault() public method

public MakeDefault ( ) : void
return void

Purge() public method

Frees the texture object, but leaves the structure so it can be reloaded.
public Purge ( ) : void
return void

Reload() public method

public Reload ( bool checkPrecompressed, bool force ) : void
checkPrecompressed bool
force bool
return void

idImage() public method

public idImage ( string name, ImageLoadCallback generator ) : System
name string
generator ImageLoadCallback
return System

idImage() public method

public idImage ( string name, TextureType type, TextureFilter filter, TextureRepeat repeat, TextureDepth depth, CubeFiles cubeMap, bool allowDownSize ) : System
name string
type TextureType
filter TextureFilter
repeat TextureRepeat
depth TextureDepth
cubeMap CubeFiles
allowDownSize bool
return System