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

Responsible for managing the screen, which can have multiple idRenderWorld and 2D drawing done on it.
Показать файл Открыть проект

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

Свойство Тип Описание
VideoModes idTech4.Renderer.VideoMode[]

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

Метод Описание
AddDrawSurface ( Surface surface, ViewEntity space, RenderEntityComponent renderEntity, idMaterial material, idScreenRect scissor ) : void
AddDrawViewCommand ( View view ) : void

This is the main 3D rendering command. A single scene may have multiple views if a mirror, portal, or dynamic texture is present.

BeginFrame ( int windowWidth, int windowHeight ) : void
BeginLevelLoad ( ) : void
BindTexture ( idImage texture ) : void
ClearTextureUnits ( ) : void
CreateRenderWorld ( ) : idRenderWorld

Creates a new renderWorld to be used for drawing.

DebugClearLines ( int time ) : void
DebugClearPolygons ( int time ) : void
DebugClearText ( int time ) : void
DrawBigCharacter ( int x, int y, int ch, idMaterial material ) : void
DrawBigString ( int x, int y, string str, Vector4 color, bool forceColor, idMaterial material ) : void

Draws a multi-colored string with a drop shadow, optionally forcing to a fixed color. Coordinates are at 640 by 480 virtual resolution.

DrawSmallCharacter ( int x, int y, int c, idMaterial material ) : void

Small characters are drawn at native screen resolution.

DrawSmallString ( int x, int y, string str, Vector4 setColor, bool forceColor, idMaterial material ) : void

Draws a multi-colored string with a drop shadow, optionally forcing to a fixed color.

Coordinates are at 640x480 virtual resolution.

DrawStretchPicture ( Vertex vertices, int indexes, idMaterial material, bool clip = true, float minX = 0.0f, float minY = 0.0f, float maxX = 640.0f, float maxY = 0.0f ) : void
DrawStretchPicture ( float x, float y, float width, float height, float s, float t, float s2, float t2, idMaterial material ) : void
EndFrame ( ) : void
EndFrame ( int &frontendTime, int &backendTime ) : void
EndLevelLoad ( ) : void
GlobalMaterialOverride ( idMaterial material ) : idMaterial
Init ( ) : void
InitRenderer ( ) : void
Present ( ) : void
RegisterFont ( string fontName, string fileName ) : idFontFamily
RemapMaterialBySkin ( idMaterial material, idDeclSkin skin, idMaterial customMaterial ) : idMaterial
RenderView ( View parms ) : void

A view may be either the actual camera view, a mirror / remote location, or a 3D view on a gui surface.

RenderViewToViewPort ( idRenderView renderView ) : idScreenRect

Converts from SCREEN_WIDTH / SCREEN_HEIGHT coordinates to current cropped pixel coordinates

idRenderSystem ( ) : System

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

Метод Описание
AddAmbientDrawSurfaces ( ViewEntity viewEntity ) : void

Adds surfaces for the given viewEntity Walks through the viewEntitys list and creates drawSurf_t for each surface of each viewEntity that has a non-empty scissorRect.

AddModelSurfaces ( ) : void Here is where dynamic models actually get instantiated, and necessary interactions get created. This is all done on a sort-by-model basis to keep source data in cache (most likely L2) as any interactions and shadows are generated, since dynamic models will typically be lit by two or more lights.
AllocateVertexCacheFrameTemporary ( Vertex vertices ) : VertexCache
Clear ( ) : void
ClearCommandChain ( ) : void

Called after every buffer submission and by ToggleSmpFrame.

Cmd_ReloadArbPrograms ( object sender, CommandEventArgs e ) : void
ConstrainViewFrustum ( ) : void
CreateAmbientCache ( Surface geometry, bool needsLighting ) : bool
EntityDefinitionDynamicModel ( idRenderEntity def ) : idRenderModel

Issues a deferred entity callback if necessary. If the model isn't dynamic, it returns the original. Returns the cached dynamic model if present, otherwise creates it and any necessary overlays

InitCommands ( ) : void
InitCvars ( ) : void
InitMaterials ( ) : void
IssueRenderCommands ( ) : void
LoadArbProgram ( int index ) : void
SetColorMappings ( ) : void
SetGamma ( ushort red, ushort green, ushort blue ) : void

The renderer calls this when the user adjusts r_gamma or r_brightness.

SetViewMatrix ( View view ) : void
SetupProjection ( ) : void
SetupViewFrustum ( ) : void
ToggleSmpFrame ( ) : void

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

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

public AddDrawSurface ( Surface surface, ViewEntity space, RenderEntityComponent renderEntity, idMaterial material, idScreenRect scissor ) : void
surface Surface
space ViewEntity
renderEntity RenderEntityComponent
material idMaterial
scissor idScreenRect
Результат void

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

This is the main 3D rendering command. A single scene may have multiple views if a mirror, portal, or dynamic texture is present.
public AddDrawViewCommand ( View view ) : void
view View
Результат void

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

public BeginFrame ( int windowWidth, int windowHeight ) : void
windowWidth int
windowHeight int
Результат void

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

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

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

public BindTexture ( idImage texture ) : void
texture idImage
Результат void

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

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

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

Creates a new renderWorld to be used for drawing.
public CreateRenderWorld ( ) : idRenderWorld
Результат idRenderWorld

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

public DebugClearLines ( int time ) : void
time int
Результат void

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

public DebugClearPolygons ( int time ) : void
time int
Результат void

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

public DebugClearText ( int time ) : void
time int
Результат void

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

public DrawBigCharacter ( int x, int y, int ch, idMaterial material ) : void
x int
y int
ch int
material idMaterial
Результат void

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

Draws a multi-colored string with a drop shadow, optionally forcing to a fixed color. Coordinates are at 640 by 480 virtual resolution.
public DrawBigString ( int x, int y, string str, Vector4 color, bool forceColor, idMaterial material ) : void
x int
y int
str string
color Vector4
forceColor bool
material idMaterial
Результат void

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

Small characters are drawn at native screen resolution.
public DrawSmallCharacter ( int x, int y, int c, idMaterial material ) : void
x int
y int
c int
material idMaterial
Результат void

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

Draws a multi-colored string with a drop shadow, optionally forcing to a fixed color.
Coordinates are at 640x480 virtual resolution.
public DrawSmallString ( int x, int y, string str, Vector4 setColor, bool forceColor, idMaterial material ) : void
x int
y int
str string
setColor Vector4
forceColor bool
material idMaterial
Результат void

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

public DrawStretchPicture ( Vertex vertices, int indexes, idMaterial material, bool clip = true, float minX = 0.0f, float minY = 0.0f, float maxX = 640.0f, float maxY = 0.0f ) : void
vertices Vertex
indexes int
material idMaterial
clip bool
minX float
minY float
maxX float
maxY float
Результат void

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

public DrawStretchPicture ( float x, float y, float width, float height, float s, float t, float s2, float t2, idMaterial material ) : void
x float
y float
width float
height float
s float
t float
s2 float
t2 float
material idMaterial
Результат void

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

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

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

public EndFrame ( int &frontendTime, int &backendTime ) : void
frontendTime int
backendTime int
Результат void

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

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

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

public GlobalMaterialOverride ( idMaterial material ) : idMaterial
material idMaterial
Результат idMaterial

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

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

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

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

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

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

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

public RegisterFont ( string fontName, string fileName ) : idFontFamily
fontName string
fileName string
Результат idFontFamily

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

public RemapMaterialBySkin ( idMaterial material, idDeclSkin skin, idMaterial customMaterial ) : idMaterial
material idMaterial
skin idTech4.Text.Decl.idDeclSkin
customMaterial idMaterial
Результат idMaterial

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

A view may be either the actual camera view, a mirror / remote location, or a 3D view on a gui surface.
public RenderView ( View parms ) : void
parms View
Результат void

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

Converts from SCREEN_WIDTH / SCREEN_HEIGHT coordinates to current cropped pixel coordinates
public RenderViewToViewPort ( idRenderView renderView ) : idScreenRect
renderView idRenderView
Результат idScreenRect

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

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

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

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

public static VideoMode[],idTech4.Renderer VideoModes
Результат idTech4.Renderer.VideoMode[]