C# Class idTech4.Renderer.idRenderSystem

Responsible for managing the screen, which can have multiple idRenderWorld and 2D drawing done on it.
Afficher le fichier Open project: iainmckay/idtech4.net

Méthodes publiques

Свойство Type Description
VideoModes idTech4.Renderer.VideoMode[]

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
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

Method Details

AddDrawSurface() public méthode

public AddDrawSurface ( Surface surface, ViewEntity space, RenderEntityComponent renderEntity, idMaterial material, idScreenRect scissor ) : void
surface Surface
space ViewEntity
renderEntity RenderEntityComponent
material idMaterial
scissor idScreenRect
Résultat void

AddDrawViewCommand() public méthode

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
Résultat void

BeginFrame() public méthode

public BeginFrame ( int windowWidth, int windowHeight ) : void
windowWidth int
windowHeight int
Résultat void

BeginLevelLoad() public méthode

public BeginLevelLoad ( ) : void
Résultat void

BindTexture() public méthode

public BindTexture ( idImage texture ) : void
texture idImage
Résultat void

ClearTextureUnits() public méthode

public ClearTextureUnits ( ) : void
Résultat void

CreateRenderWorld() public méthode

Creates a new renderWorld to be used for drawing.
public CreateRenderWorld ( ) : idRenderWorld
Résultat idRenderWorld

DebugClearLines() public méthode

public DebugClearLines ( int time ) : void
time int
Résultat void

DebugClearPolygons() public méthode

public DebugClearPolygons ( int time ) : void
time int
Résultat void

DebugClearText() public méthode

public DebugClearText ( int time ) : void
time int
Résultat void

DrawBigCharacter() public méthode

public DrawBigCharacter ( int x, int y, int ch, idMaterial material ) : void
x int
y int
ch int
material idMaterial
Résultat void

DrawBigString() public méthode

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
Résultat void

DrawSmallCharacter() public méthode

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
Résultat void

DrawSmallString() public méthode

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
Résultat void

DrawStretchPicture() public méthode

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
Résultat void

DrawStretchPicture() public méthode

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
Résultat void

EndFrame() public méthode

public EndFrame ( ) : void
Résultat void

EndFrame() public méthode

public EndFrame ( int &frontendTime, int &backendTime ) : void
frontendTime int
backendTime int
Résultat void

EndLevelLoad() public méthode

public EndLevelLoad ( ) : void
Résultat void

GlobalMaterialOverride() public méthode

public GlobalMaterialOverride ( idMaterial material ) : idMaterial
material idMaterial
Résultat idMaterial

Init() public méthode

public Init ( ) : void
Résultat void

InitRenderer() public méthode

public InitRenderer ( ) : void
Résultat void

Present() public méthode

public Present ( ) : void
Résultat void

RegisterFont() public méthode

public RegisterFont ( string fontName, string fileName ) : idFontFamily
fontName string
fileName string
Résultat idFontFamily

RemapMaterialBySkin() public méthode

public RemapMaterialBySkin ( idMaterial material, idDeclSkin skin, idMaterial customMaterial ) : idMaterial
material idMaterial
skin idTech4.Text.Decl.idDeclSkin
customMaterial idMaterial
Résultat idMaterial

RenderView() public méthode

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
Résultat void

RenderViewToViewPort() public méthode

Converts from SCREEN_WIDTH / SCREEN_HEIGHT coordinates to current cropped pixel coordinates
public RenderViewToViewPort ( idRenderView renderView ) : idScreenRect
renderView idRenderView
Résultat idScreenRect

idRenderSystem() public méthode

public idRenderSystem ( ) : System
Résultat System

Property Details

VideoModes public_oe static_oe property

public static VideoMode[],idTech4.Renderer VideoModes
Résultat idTech4.Renderer.VideoMode[]