Garry's Mod Wiki

render.RenderView

render.RenderView( table view = nil )

Description

Renders the scene with the specified viewData to the current active render target.

Static props and LODs are rendered improperly due to incorrectly perceived distance.

Issue Tracker: 1330

Arguments

1 table view = nil
The view data to be used in the rendering. See Structures/ViewData. Any missing value is assumed to be that of the current view. Similarly, you can make a normal render by simply not passing this table at all.

Example

How you could use this to draw the view on a derma panel.

local frame = vgui.Create( "DFrame" ) frame:SetSize( ScrW() - 100, ScrH() - 100 ) frame:Center() frame:MakePopup() function frame:Paint( w, h ) local x, y = self:GetPos() render.RenderView( { origin = Vector( 0, 0, 0 ), angles = Angle( 0, 0, 0 ), x = x, y = y, w = w, h = h } ) end
Output:

Page Links


Special Pages


Wikis

?

Render Time: 78ms

DB GetPage 43
Generate Html 9
SaveChanges (1) 11
Render Body 0
Render Sidebar 12