C# 클래스 idTech4.Renderer.idImageManager

파일 보기 프로젝트 열기: iainmckay/idtech4.net

공개 프로퍼티들

프로퍼티 타입 설명
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