C# Class OpenBve.Renderer

Afficher le fichier Open project: leezer3/OpenBVE Class Usage Examples

Private Methods

Méthode Description
ApplyBackgroundColor ( ) : void
ApplyBackgroundColor ( byte red, byte green, byte blue ) : void
CreateBackColor ( Color32 Original, MessageColor SystemColor, float &R, float &G, float &B, float &A ) : void

Creates the background color for anti-aliasing text

CreateTextColor ( Color32 Original, MessageColor SystemColor, float &R, float &G, float &B, float &A ) : void

Creates the foreground color for anti-aliasing text

DrawLoadingScreen ( ) : void

Draws on OpenGL canvas the route/train loading screen

DrawRectangle ( Textures texture, Point point, Size size, Color128 color ) : void

Draws a rectangle.

DrawRectangle ( int texture, Point point, Size size, Color128 color ) : void

Draws a rectangle.

DrawString ( Fonts font, string text, Point location, TextAlignment alignment, Color128 color ) : void

Renders a string to the screen.

This function sets the OpenGL blend function to glBlendFunc(Gl.GL_SRC_ALPHA, Gl.GL_ONE_MINUS_SRC_ALPHA).

DrawString ( Fonts font, string text, Point location, TextAlignment alignment, Color128 color, bool shadow ) : void

Renders a string to the screen.

This function sets the OpenGL blend function to glBlendFunc(Gl.GL_SRC_ALPHA, Gl.GL_ONE_MINUS_SRC_ALPHA).

GetBackgroundColorName ( ) : string
GetDistanceFactor ( World Vertices, World &Face, ushort GlowAttenuationData, double CameraX, double CameraY, double CameraZ ) : double
GetLengthString ( double Value ) : string
GetTime ( double Time ) : string
HideObject ( int ObjectIndex ) : void
InitLoading ( ) : void

Initializes the textures used for the loading screen

Initialize ( ) : void
InitializeLamps ( ) : void
InitializeLighting ( ) : void

Initializes the lighting

MeasureString ( Fonts font, string text ) : Size

Measures the size of a string as it would be rendered using the specified font.

ReAddObjects ( ) : void
RenderBackground ( BackgroundManager Object ) : void
RenderBackground ( BackgroundManager Data, float scale ) : void

Renders a dynamic frustrum based background

RenderBackground ( BackgroundManager Data, float Alpha, float scale ) : void

Renders a static frustrum based background

RenderBackground ( World Data, double dx, double dy, double dz, float Alpha ) : void
RenderBackground ( double dx, double dy, double dz, double TimeElapsed ) : void
RenderBox ( World Position, World Direction, World Up, World Side, World Size, double CameraX, double CameraY, double CameraZ ) : void
RenderCube ( World Position, World Direction, World Up, World Side, double Size, double CameraX, double CameraY, double CameraZ, int TextureIndex ) : void
RenderEvents ( double CameraX, double CameraY, double CameraZ ) : void
RenderFace ( ObjectFace &Face, double CameraX, double CameraY, double CameraZ ) : void
RenderFace ( World &Material, World Vertices, Textures wrap, World &Face, double CameraX, double CameraY, double CameraZ ) : void
RenderFace ( World &Material, World Vertices, World &Face, double CameraX, double CameraY, double CameraZ ) : void
RenderFullscreenMotionBlur ( ) : void

This function renderers full-screen motion blur if selected

RenderKeys ( double Left, double Top, double Width, string Keys ) : void
RenderKeys ( int Left, int Top, int Width, string Keys ) : void
RenderOverlaySolid ( double ax, double ay, double bx, double by ) : void
RenderOverlayTexture ( Textures texture, double left, double top, double right, double bottom ) : void

Renders an overlay texture

RenderOverlayTexture ( int TextureIndex, double ax, double ay, double bx, double by ) : void
RenderOverlays ( ) : void
RenderOverlays ( double TimeElapsed ) : void

Is called once by the main renderer loop, in order to render all overlays shown on the screen

RenderScene ( ) : void
RenderScene ( double TimeElapsed ) : void
RenderString ( double PixelLeft, double PixelTop, Fonts FontType, string Text, int Orientation, float R, float G, float B, bool Shadow ) : void
RenderString ( double PixelLeft, double PixelTop, Fonts FontType, string Text, int Orientation, float R, float G, float B, float A, bool Shadow ) : void
Reset ( ) : void
SetAlphaFunc ( AlphaFunction Comparison, float Value ) : void
SetLoadingBkg ( string fileName ) : void

Sets the loading screen background to a custom image

ShowObject ( int ObjectIndex, ObjectType Type ) : void
SortPolygons ( ObjectFace List, int ListCount, double ListDistance, int ListOffset, double TimeElapsed ) : void
SortPolygons ( ObjectList List ) : void
UnloadUnusedTextures ( double TimeElapsed ) : void
UpdateBackground ( double TimeElapsed ) : void

Updates the currently displayed background

UpdateLighting ( ) : void

Updates the lighting model on a per frame basis