C# Класс idTech4.Renderer.idImageManager

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
ImageFilters ImageFilter>.Dictionary

Открытые методы

Метод Описание
BeginLevelLoad ( ) : void

Mark all file based images as currently unused, but don't free anything. Calls to ImageFromFile() will either mark the image as used, or create a new image without loading the actual data.

BindNullTexture ( ) : void

Disable the active texture unit.

ChangeTextureFilter ( ) : void

Resets filtering on all loaded images. New images will automatically pick up the current values.

CompleteBackgroundLoading ( ) : void
EndLevelLoad ( ) : void

Free all images marked as unused, and load all images that are necessary. This architecture prevents us from having the union of two level's worth of data present at one time.

GenerateAlphaNotchImage ( idImage image ) : void
GenerateAlphaRampImage ( idImage image ) : void

Creates a 0-255 ramp image.

GenerateAmbientNormalImage ( idImage image ) : void
GenerateBlackImage ( idImage image ) : void
GenerateBorderClampImage ( idImage image ) : void
GenerateDefaultImage ( idImage image ) : void
GenerateFlatNormalImage ( idImage image ) : void
GenerateFogEnterImage ( idImage image ) : void

Modulate the fog alpha density based on the distance of the start and end points to the terminator plane.

GenerateFogImage ( idImage image ) : void

We calculate distance correctly in two planes, but the third will still be projection based.

GenerateNoFalloffImage ( idImage image ) : void

This is a solid white texture that is zero clamped.

GenerateQuadraticImage ( idImage image ) : void
GenerateRGB8Image ( idImage image ) : void
GenerateRGBA8Image ( idImage image ) : void
GenerateRampImage ( idImage image ) : void

Creates a 0-255 ramp image.

GenerateSpecular2DTableImage ( idImage image ) : void

Create a 2D table that calculates (reflection dot , specularity).

GenerateSpecularTableImage ( idImage image ) : void

Creates a ramp that matches our fudged specular calculation.

GenerateWhiteImage ( idImage image ) : void
ImageFromFile ( string name, TextureFilter filter, bool allowDownSize, TextureRepeat repeat, TextureDepth depth ) : idImage

Finds or loads the given image, always returning a valid image pointer. Loading of the image may be deferred for dynamic loading.

ImageFromFile ( string name, TextureFilter filter, bool allowDownSize, TextureRepeat repeat, TextureDepth depth, CubeFiles cubeMap ) : idImage

Finds or loads the given image, always returning a valid image pointer. Loading of the image may be deferred for dynamic loading.

ImageProgramStringToCompressedFileName ( string program ) : string
Init ( ) : void
LoadFromCallback ( string name, ImageLoadCallback generator ) : idImage

Images that are procedurally generated are allways specified with a callback which must work at any time, allowing the render system to be completely regenerated if needed.

LoadImage ( string name, System.DateTime &timeStamp, bool makePowerOf2 ) : Microsoft.Xna.Framework.Graphics.Texture2D

Loads any of the supported image types into a cannonical 32 bit format.

Automatically attempts to load .jpg files if .tga files fail to load.

Anything that is going to make this into a texture would use makePowerOf2 = true, but something loading an image as a lookup table of some sort would leave it in identity form.

It is important to do this at image load time instead of texture load time for bump maps.

timestamp may be NULL if the value is going to be ignored

If data is NULL, the image won't actually be loaded, it will just find the timestamp.

LoadImageProgram ( string name, System.DateTime &timeStamp, TextureDepth &depth ) : Microsoft.Xna.Framework.Graphics.Texture2D
ParseImageProgram ( string source, System.DateTime &timeStamp, TextureDepth &depth ) : Microsoft.Xna.Framework.Graphics.Texture2D

If data is NULL, the timestamps will be filled in, but no image will be generated If both data and timeStamp are NULL, it will just advance past it, which can be used to parse an image program from a text stream.

QueueBackgroundLoad ( idImage image ) : void
ReloadImages ( ) : void
idImageManager ( ) : System

Приватные методы

Метод Описание
Cmd_ReloadImages ( object sender, CommandEventArgs e ) : void

Regenerate all images that came directly from files that have changed, so any saved changes will show up in place.

New r_texturesize/r_texturedepth variables will take effect on reload.

CreateImage ( string name, ImageLoadCallback generator ) : idImage
CreateImage ( string name, TextureType type, TextureFilter filter, TextureRepeat repeat, TextureDepth depth, CubeFiles cubeMap, bool allowDownSize ) : idImage
FogFraction ( float viewHeight, float targetHeight ) : float
InitCvars ( ) : void
InitFilters ( ) : void
SetNormalPalette ( ) : void
SetSamplers ( ) : void

Описание методов

BeginLevelLoad() публичный Метод

Mark all file based images as currently unused, but don't free anything. Calls to ImageFromFile() will either mark the image as used, or create a new image without loading the actual data.
public BeginLevelLoad ( ) : void
Результат void

BindNullTexture() публичный Метод

Disable the active texture unit.
public BindNullTexture ( ) : void
Результат void

ChangeTextureFilter() публичный Метод

Resets filtering on all loaded images. New images will automatically pick up the current values.
public ChangeTextureFilter ( ) : void
Результат void

CompleteBackgroundLoading() публичный Метод

public CompleteBackgroundLoading ( ) : void
Результат void

EndLevelLoad() публичный Метод

Free all images marked as unused, and load all images that are necessary. This architecture prevents us from having the union of two level's worth of data present at one time.
public EndLevelLoad ( ) : void
Результат void

GenerateAlphaNotchImage() публичный статический Метод

public static GenerateAlphaNotchImage ( idImage image ) : void
image idImage
Результат void

GenerateAlphaRampImage() публичный статический Метод

Creates a 0-255 ramp image.
public static GenerateAlphaRampImage ( idImage image ) : void
image idImage
Результат void

GenerateAmbientNormalImage() публичный статический Метод

public static GenerateAmbientNormalImage ( idImage image ) : void
image idImage
Результат void

GenerateBlackImage() публичный статический Метод

public static GenerateBlackImage ( idImage image ) : void
image idImage
Результат void

GenerateBorderClampImage() публичный статический Метод

public static GenerateBorderClampImage ( idImage image ) : void
image idImage
Результат void

GenerateDefaultImage() публичный статический Метод

public static GenerateDefaultImage ( idImage image ) : void
image idImage
Результат void

GenerateFlatNormalImage() публичный статический Метод

public static GenerateFlatNormalImage ( idImage image ) : void
image idImage
Результат void

GenerateFogEnterImage() публичный статический Метод

Modulate the fog alpha density based on the distance of the start and end points to the terminator plane.
public static GenerateFogEnterImage ( idImage image ) : void
image idImage
Результат void

GenerateFogImage() публичный статический Метод

We calculate distance correctly in two planes, but the third will still be projection based.
public static GenerateFogImage ( idImage image ) : void
image idImage
Результат void

GenerateNoFalloffImage() публичный статический Метод

This is a solid white texture that is zero clamped.
public static GenerateNoFalloffImage ( idImage image ) : void
image idImage
Результат void

GenerateQuadraticImage() публичный статический Метод

public static GenerateQuadraticImage ( idImage image ) : void
image idImage
Результат void

GenerateRGB8Image() публичный статический Метод

public static GenerateRGB8Image ( idImage image ) : void
image idImage
Результат void

GenerateRGBA8Image() публичный статический Метод

public static GenerateRGBA8Image ( idImage image ) : void
image idImage
Результат void

GenerateRampImage() публичный статический Метод

Creates a 0-255 ramp image.
public static GenerateRampImage ( idImage image ) : void
image idImage
Результат void

GenerateSpecular2DTableImage() публичный статический Метод

Create a 2D table that calculates (reflection dot , specularity).
public static GenerateSpecular2DTableImage ( idImage image ) : void
image idImage
Результат void

GenerateSpecularTableImage() публичный статический Метод

Creates a ramp that matches our fudged specular calculation.
public static GenerateSpecularTableImage ( idImage image ) : void
image idImage
Результат void

GenerateWhiteImage() публичный статический Метод

public static GenerateWhiteImage ( idImage image ) : void
image idImage
Результат void

ImageFromFile() публичный Метод

Finds or loads the given image, always returning a valid image pointer. Loading of the image may be deferred for dynamic loading.
public ImageFromFile ( string name, TextureFilter filter, bool allowDownSize, TextureRepeat repeat, TextureDepth depth ) : idImage
name string
filter TextureFilter
allowDownSize bool
repeat TextureRepeat
depth TextureDepth
Результат idImage

ImageFromFile() публичный Метод

Finds or loads the given image, always returning a valid image pointer. Loading of the image may be deferred for dynamic loading.
public ImageFromFile ( string name, TextureFilter filter, bool allowDownSize, TextureRepeat repeat, TextureDepth depth, CubeFiles cubeMap ) : idImage
name string
filter TextureFilter
allowDownSize bool
repeat TextureRepeat
depth TextureDepth
cubeMap CubeFiles
Результат idImage

ImageProgramStringToCompressedFileName() публичный Метод

public ImageProgramStringToCompressedFileName ( string program ) : string
program string
Результат string

Init() публичный Метод

public Init ( ) : void
Результат void

LoadFromCallback() публичный Метод

Images that are procedurally generated are allways specified with a callback which must work at any time, allowing the render system to be completely regenerated if needed.
public LoadFromCallback ( string name, ImageLoadCallback generator ) : idImage
name string
generator ImageLoadCallback
Результат idImage

LoadImage() публичный Метод

Loads any of the supported image types into a cannonical 32 bit format.
Automatically attempts to load .jpg files if .tga files fail to load.

Anything that is going to make this into a texture would use makePowerOf2 = true, but something loading an image as a lookup table of some sort would leave it in identity form.

It is important to do this at image load time instead of texture load time for bump maps.

timestamp may be NULL if the value is going to be ignored

If data is NULL, the image won't actually be loaded, it will just find the timestamp.

public LoadImage ( string name, System.DateTime &timeStamp, bool makePowerOf2 ) : Microsoft.Xna.Framework.Graphics.Texture2D
name string
timeStamp System.DateTime
makePowerOf2 bool
Результат Microsoft.Xna.Framework.Graphics.Texture2D

LoadImageProgram() публичный Метод

public LoadImageProgram ( string name, System.DateTime &timeStamp, TextureDepth &depth ) : Microsoft.Xna.Framework.Graphics.Texture2D
name string
timeStamp System.DateTime
depth TextureDepth
Результат Microsoft.Xna.Framework.Graphics.Texture2D

ParseImageProgram() публичный Метод

If data is NULL, the timestamps will be filled in, but no image will be generated If both data and timeStamp are NULL, it will just advance past it, which can be used to parse an image program from a text stream.
public ParseImageProgram ( string source, System.DateTime &timeStamp, TextureDepth &depth ) : Microsoft.Xna.Framework.Graphics.Texture2D
source string
timeStamp System.DateTime
depth TextureDepth
Результат Microsoft.Xna.Framework.Graphics.Texture2D

QueueBackgroundLoad() публичный Метод

public QueueBackgroundLoad ( idImage image ) : void
image idImage
Результат void

ReloadImages() публичный Метод

public ReloadImages ( ) : void
Результат void

idImageManager() публичный Метод

public idImageManager ( ) : System
Результат System

Описание свойств

ImageFilters публичное статическое свойство

public static Dictionary ImageFilters
Результат ImageFilter>.Dictionary