@tlua/gmod 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. package/package.json +1 -1
  2. package/types/achievementicon.d.tlua +0 -1
  3. package/types/achievements.d.tlua +15 -16
  4. package/types/ai.d.tlua +5 -6
  5. package/types/ai_schedule.d.tlua +0 -1
  6. package/types/ai_task.d.tlua +0 -1
  7. package/types/angle.d.tlua +18 -19
  8. package/types/avatarimage.d.tlua +0 -1
  9. package/types/awesomium.d.tlua +0 -1
  10. package/types/baseclass.d.tlua +1 -3
  11. package/types/bf_read.d.tlua +10 -12
  12. package/types/bit.d.tlua +11 -12
  13. package/types/button.d.tlua +0 -1
  14. package/types/cam.d.tlua +16 -17
  15. package/types/ceffectdata.d.tlua +31 -33
  16. package/types/chat.d.tlua +5 -6
  17. package/types/checkbutton.d.tlua +0 -1
  18. package/types/cleanup.d.tlua +7 -8
  19. package/types/cluaemitter.d.tlua +11 -13
  20. package/types/clualocomotion.d.tlua +39 -41
  21. package/types/cluaparticle.d.tlua +43 -45
  22. package/types/cmovedata.d.tlua +46 -48
  23. package/types/cnavarea.d.tlua +76 -78
  24. package/types/cnavladder.d.tlua +21 -23
  25. package/types/cnewparticleeffect.d.tlua +25 -27
  26. package/types/color.d.tlua +28 -29
  27. package/types/concommand.d.tlua +4 -5
  28. package/types/constraint.d.tlua +28 -29
  29. package/types/construct.d.tlua +1 -2
  30. package/types/contentheader.d.tlua +1 -3
  31. package/types/contenticon.d.tlua +7 -9
  32. package/types/contentsidebar.d.tlua +2 -4
  33. package/types/contentsidebartoolbox.d.tlua +0 -1
  34. package/types/contextbase.d.tlua +2 -4
  35. package/types/controlpanel.d.tlua +11 -14
  36. package/types/controlpresets.d.tlua +11 -13
  37. package/types/convar.d.tlua +15 -17
  38. package/types/cookie.d.tlua +3 -4
  39. package/types/coroutine.d.tlua +7 -8
  40. package/types/crecipientfilter.d.tlua +15 -17
  41. package/types/csent.d.tlua +0 -1
  42. package/types/csoundpatch.d.tlua +13 -15
  43. package/types/ctakedamageinfo.d.tlua +32 -34
  44. package/types/ctrllistbox.d.tlua +0 -1
  45. package/types/ctrlnumpad.d.tlua +5 -7
  46. package/types/cusercmd.d.tlua +26 -28
  47. package/types/custom_entity_fields.d.tlua +0 -1
  48. package/types/cvars.d.tlua +6 -7
  49. package/types/dadjustablemodelpanel.d.tlua +5 -7
  50. package/types/dalphabar.d.tlua +1 -3
  51. package/types/dbinder.d.tlua +2 -4
  52. package/types/dbubblecontainer.d.tlua +0 -2
  53. package/types/dbutton.d.tlua +6 -8
  54. package/types/dcategoryheader.d.tlua +0 -1
  55. package/types/dcategorylist.d.tlua +0 -1
  56. package/types/dcheckbox.d.tlua +3 -5
  57. package/types/dcheckboxlabel.d.tlua +9 -10
  58. package/types/dcollapsiblecategory.d.tlua +21 -23
  59. package/types/dcolorbutton.d.tlua +5 -7
  60. package/types/dcolorcombo.d.tlua +3 -5
  61. package/types/dcolorcube.d.tlua +11 -13
  62. package/types/dcolormixer.d.tlua +25 -27
  63. package/types/dcolorpalette.d.tlua +21 -23
  64. package/types/dcolumnsheet.d.tlua +3 -5
  65. package/types/dcombobox.d.tlua +15 -17
  66. package/types/ddragbase.d.tlua +11 -13
  67. package/types/ddrawer.d.tlua +6 -8
  68. package/types/debug.d.tlua +16 -19
  69. package/types/debugoverlay.d.tlua +11 -12
  70. package/types/dentityproperties.d.tlua +3 -5
  71. package/types/derma.d.tlua +10 -11
  72. package/types/dexpandbutton.d.tlua +1 -3
  73. package/types/dfilebrowser.d.tlua +20 -21
  74. package/types/dform.d.tlua +16 -18
  75. package/types/dframe.d.tlua +24 -25
  76. package/types/dgrid.d.tlua +9 -11
  77. package/types/dhorizontaldivider.d.tlua +18 -20
  78. package/types/dhorizontalscroller.d.tlua +9 -11
  79. package/types/dhscrollbar.d.tlua +9 -11
  80. package/types/dhtml.d.tlua +6 -8
  81. package/types/dhtmlcontrols.d.tlua +5 -6
  82. package/types/diconbrowser.d.tlua +9 -11
  83. package/types/diconlayout.d.tlua +16 -18
  84. package/types/dimage.d.tlua +17 -20
  85. package/types/dimagebutton.d.tlua +9 -10
  86. package/types/dkillicon.d.tlua +0 -1
  87. package/types/dlabel.d.tlua +31 -33
  88. package/types/dlabeleditable.d.tlua +3 -5
  89. package/types/dlabelurl.d.tlua +8 -10
  90. package/types/dlistbox.d.tlua +6 -8
  91. package/types/dlistboxitem.d.tlua +2 -4
  92. package/types/dlistlayout.d.tlua +0 -1
  93. package/types/dlistview.d.tlua +32 -34
  94. package/types/dlistview_column.d.tlua +12 -14
  95. package/types/dlistview_columnplain.d.tlua +0 -1
  96. package/types/dlistview_draggerbar.d.tlua +0 -1
  97. package/types/dlistview_line.d.tlua +11 -13
  98. package/types/dlistviewheaderlabel.d.tlua +0 -1
  99. package/types/dlistviewlabel.d.tlua +0 -1
  100. package/types/dlistviewline.d.tlua +0 -1
  101. package/types/dmenu.d.tlua +23 -28
  102. package/types/dmenubar.d.tlua +2 -7
  103. package/types/dmenuoption.d.tlua +11 -13
  104. package/types/dmenuoptioncvar.d.tlua +4 -6
  105. package/types/dmodelpanel.d.tlua +20 -22
  106. package/types/dmodelselect.d.tlua +0 -2
  107. package/types/dmodelselectmulti.d.tlua +0 -2
  108. package/types/dnotify.d.tlua +8 -10
  109. package/types/dnumberscratch.d.tlua +24 -26
  110. package/types/dnumberwang.d.tlua +14 -16
  111. package/types/dnumpad.d.tlua +0 -1
  112. package/types/dnumslider.d.tlua +17 -18
  113. package/types/dpanel.d.tlua +12 -14
  114. package/types/dpanellist.d.tlua +11 -12
  115. package/types/dpaneloverlay.d.tlua +5 -7
  116. package/types/dpanelselect.d.tlua +0 -1
  117. package/types/dpanpanel.d.tlua +4 -6
  118. package/types/dprogress.d.tlua +1 -3
  119. package/types/dproperties.d.tlua +2 -4
  120. package/types/dproperty_boolean.d.tlua +0 -1
  121. package/types/dproperty_combo.d.tlua +1 -3
  122. package/types/dproperty_entity.d.tlua +0 -1
  123. package/types/dproperty_float.d.tlua +0 -1
  124. package/types/dproperty_generic.d.tlua +3 -5
  125. package/types/dproperty_int.d.tlua +0 -1
  126. package/types/dproperty_vectorcolor.d.tlua +0 -1
  127. package/types/dpropertysheet.d.tlua +15 -17
  128. package/types/dragndrop.d.tlua +10 -11
  129. package/types/draw.d.tlua +10 -12
  130. package/types/drgbpicker.d.tlua +2 -4
  131. package/types/drive.d.tlua +11 -13
  132. package/types/dscrollbargrip.d.tlua +0 -1
  133. package/types/dscrollpanel.d.tlua +10 -11
  134. package/types/dshape.d.tlua +5 -7
  135. package/types/dsizetocontents.d.tlua +3 -5
  136. package/types/dslider.d.tlua +26 -28
  137. package/types/dsprite.d.tlua +7 -9
  138. package/types/dtab.d.tlua +6 -8
  139. package/types/dtextentry.d.tlua +41 -43
  140. package/types/dtilelayout.d.tlua +19 -21
  141. package/types/dtooltip.d.tlua +4 -6
  142. package/types/dtree.d.tlua +14 -16
  143. package/types/dtree_node.d.tlua +66 -68
  144. package/types/dtree_node_button.d.tlua +0 -1
  145. package/types/duplicator.d.tlua +29 -31
  146. package/types/dverticaldivider.d.tlua +21 -23
  147. package/types/dvscrollbar.d.tlua +9 -11
  148. package/types/editablepanel.d.tlua +0 -1
  149. package/types/effect.d.tlua +2 -4
  150. package/types/effects.d.tlua +6 -7
  151. package/types/engine.d.tlua +21 -22
  152. package/types/entity.d.tlua +643 -674
  153. package/types/ents.d.tlua +19 -25
  154. package/types/enums.d.tlua +0 -1
  155. package/types/file.d.tlua +39 -40
  156. package/types/file_class.d.tlua +0 -1
  157. package/types/fingerposer.d.tlua +0 -1
  158. package/types/fingervar.d.tlua +0 -1
  159. package/types/frame.d.tlua +0 -1
  160. package/types/frame_blend.d.tlua +7 -8
  161. package/types/game.d.tlua +39 -40
  162. package/types/gameevent.d.tlua +0 -1
  163. package/types/gamemode.d.tlua +2 -4
  164. package/types/global.d.tlua +0 -18
  165. package/types/gm.d.tlua +266 -268
  166. package/types/gmod.d.tlua +0 -1
  167. package/types/gmsave.d.tlua +4 -5
  168. package/types/gui.d.tlua +21 -22
  169. package/types/gwen.d.tlua +3 -4
  170. package/types/halo.d.tlua +2 -3
  171. package/types/hammer.d.tlua +0 -1
  172. package/types/hook.d.tlua +4 -5
  173. package/types/html.d.tlua +0 -1
  174. package/types/http.d.tlua +1 -2
  175. package/types/iconeditor.d.tlua +9 -11
  176. package/types/igmodaudiochannel.d.tlua +40 -42
  177. package/types/imagecheckbox.d.tlua +2 -4
  178. package/types/imaterial.d.tlua +25 -27
  179. package/types/imesh.d.tlua +4 -6
  180. package/types/input.d.tlua +22 -25
  181. package/types/invalidateinternalentitycache.d.tlua +0 -1
  182. package/types/irestore.d.tlua +8 -10
  183. package/types/isave.d.tlua +8 -10
  184. package/types/itexture.d.tlua +9 -11
  185. package/types/ivideowriter.d.tlua +4 -6
  186. package/types/jit.d.tlua +16 -17
  187. package/types/killicon.d.tlua +7 -8
  188. package/types/label.d.tlua +0 -1
  189. package/types/language.d.tlua +1 -2
  190. package/types/list.d.tlua +8 -9
  191. package/types/makeballoon.d.tlua +0 -1
  192. package/types/markup.d.tlua +2 -3
  193. package/types/markupobject.d.tlua +4 -6
  194. package/types/material.d.tlua +0 -1
  195. package/types/math.d.tlua +83 -84
  196. package/types/matproxy.d.tlua +3 -4
  197. package/types/matselect.d.tlua +9 -11
  198. package/types/menu.d.tlua +0 -1
  199. package/types/menubar.d.tlua +2 -3
  200. package/types/mesh.d.tlua +19 -20
  201. package/types/modelimage.d.tlua +0 -1
  202. package/types/motionsensor.d.tlua +10 -11
  203. package/types/navmesh.d.tlua +26 -27
  204. package/types/net.d.tlua +51 -53
  205. package/types/nextbot.d.tlua +34 -37
  206. package/types/notification.d.tlua +2 -3
  207. package/types/npc.d.tlua +180 -182
  208. package/types/numpad.d.tlua +7 -8
  209. package/types/os.d.tlua +3 -5
  210. package/types/package.d.tlua +0 -1
  211. package/types/panel.d.tlua +329 -331
  212. package/types/panellist.d.tlua +0 -1
  213. package/types/pathfollower.d.tlua +30 -32
  214. package/types/permissions.d.tlua +6 -7
  215. package/types/physcollide.d.tlua +2 -4
  216. package/types/physenv.d.tlua +11 -12
  217. package/types/physobj.d.tlua +77 -79
  218. package/types/pixelvis_handle_t.d.tlua +0 -1
  219. package/types/player.d.tlua +288 -293
  220. package/types/player_manager.d.tlua +13 -14
  221. package/types/preseteditor.d.tlua +0 -1
  222. package/types/presets.d.tlua +6 -7
  223. package/types/projectedtexture.d.tlua +47 -49
  224. package/types/properties.d.tlua +5 -6
  225. package/types/propselect.d.tlua +3 -5
  226. package/types/radiobutton.d.tlua +0 -1
  227. package/types/render.d.tlua +142 -143
  228. package/types/resource.d.tlua +2 -3
  229. package/types/richtext.d.tlua +0 -1
  230. package/types/sandbox.d.tlua +52 -54
  231. package/types/saverestore.d.tlua +12 -13
  232. package/types/schedule.d.tlua +5 -7
  233. package/types/scripted_ents.d.tlua +9 -12
  234. package/types/search.d.tlua +1 -2
  235. package/types/serverlist.d.tlua +7 -8
  236. package/types/slidebar.d.tlua +0 -1
  237. package/types/slider.d.tlua +0 -1
  238. package/types/sound.d.tlua +10 -11
  239. package/types/spawnicon.d.tlua +6 -8
  240. package/types/spawnmenu.d.tlua +23 -25
  241. package/types/spawnmenucontentpanel.d.tlua +3 -5
  242. package/types/sql.d.tlua +9 -10
  243. package/types/stack.d.tlua +4 -6
  244. package/types/steamworks.d.tlua +18 -19
  245. package/types/string.d.tlua +46 -50
  246. package/types/structures.d.tlua +0 -7
  247. package/types/surface.d.tlua +34 -35
  248. package/types/surfaceinfo.d.tlua +4 -6
  249. package/types/system.d.tlua +10 -11
  250. package/types/table.d.tlua +45 -48
  251. package/types/task.d.tlua +8 -10
  252. package/types/team.d.tlua +19 -20
  253. package/types/textentry.d.tlua +0 -1
  254. package/types/tgaimage.d.tlua +0 -1
  255. package/types/timer.d.tlua +14 -15
  256. package/types/tool.d.tlua +42 -46
  257. package/types/ugcpublishwindow.d.tlua +7 -9
  258. package/types/umsg.d.tlua +12 -13
  259. package/types/undo.d.tlua +10 -11
  260. package/types/urllabel.d.tlua +0 -1
  261. package/types/usermessage.d.tlua +2 -3
  262. package/types/utf8.d.tlua +7 -8
  263. package/types/util.d.tlua +90 -95
  264. package/types/vector.d.tlua +36 -37
  265. package/types/vehicle.d.tlua +48 -51
  266. package/types/vgui.d.tlua +14 -19
  267. package/types/video.d.tlua +0 -1
  268. package/types/vmatrix.d.tlua +35 -36
  269. package/types/weapon.d.tlua +81 -84
  270. package/types/weapons.d.tlua +5 -7
  271. package/types/widgets.d.tlua +1 -2
  272. package/types/workshopfilebase.d.tlua +4 -6
@@ -16,6 +16,7 @@ interface RenderLib {
16
16
  * @source https://wiki.facepunch.com/gmod/render.AddBeam
17
17
  */
18
18
  AddBeam(startPos: Vector, width: number, textureEnd: number, color: Color): void;
19
+
19
20
  /**
20
21
  * Blurs the render target ( or a given texture ).
21
22
  *
@@ -26,12 +27,14 @@ interface RenderLib {
26
27
  * @source https://wiki.facepunch.com/gmod/render.BlurRenderTarget
27
28
  */
28
29
  BlurRenderTarget(rendertarget: ITexture, blurx: number, blury: number, passes: number): void;
30
+
29
31
  /**
30
32
  * This function overrides the brush material for next render operations. It can be used with [Entity:DrawModel](https://wiki.facepunch.com/gmod/Entity:DrawModel).
31
33
  * @realm client
32
34
  * @source https://wiki.facepunch.com/gmod/render.BrushMaterialOverride
33
35
  */
34
36
  BrushMaterialOverride(mat?: IMaterial): void;
37
+
35
38
  /**
36
39
  * Captures a part of the current render target and returns the data as a binary string in the given format.
37
40
  *
@@ -49,6 +52,7 @@ interface RenderLib {
49
52
  * @source https://wiki.facepunch.com/gmod/render.Capture
50
53
  */
51
54
  Capture(captureData: RenderCaptureData): string;
55
+
52
56
  /**
53
57
  * Dumps the current render target and allows the pixels to be accessed by [render.ReadPixel](https://wiki.facepunch.com/gmod/render.ReadPixel).
54
58
  *
@@ -60,6 +64,7 @@ interface RenderLib {
60
64
  * @source https://wiki.facepunch.com/gmod/render.CapturePixels
61
65
  */
62
66
  CapturePixels(): void;
67
+
63
68
  /**
64
69
  * Clears the current render target and the specified buffers.
65
70
  *
@@ -69,6 +74,7 @@ interface RenderLib {
69
74
  * @source https://wiki.facepunch.com/gmod/render.Clear
70
75
  */
71
76
  Clear(r: number, g: number, b: number, a: number, clearDepth?: boolean, clearStencil?: boolean): void;
77
+
72
78
  /**
73
79
  * Tests every pixel of the active [Render Target](https://wiki.facepunch.com/gmod/render_rendertargets) against the current Stencil configuration and sets the Color Channel values and, optionally, the Depth Buffer values for every pixel that passes.
74
80
  *
@@ -82,6 +88,7 @@ interface RenderLib {
82
88
  * @source https://wiki.facepunch.com/gmod/render.ClearBuffersObeyStencil
83
89
  */
84
90
  ClearBuffersObeyStencil(red: number, green: number, blue: number, alpha: number, clearDepth: boolean): void;
91
+
85
92
  /**
86
93
  * Resets the depth buffer.
87
94
  *
@@ -89,6 +96,7 @@ interface RenderLib {
89
96
  * @source https://wiki.facepunch.com/gmod/render.ClearDepth
90
97
  */
91
98
  ClearDepth(clearStencil?: boolean): void;
99
+
92
100
  /**
93
101
  * Clears a render target.
94
102
  *
@@ -98,6 +106,7 @@ interface RenderLib {
98
106
  * @source https://wiki.facepunch.com/gmod/render.ClearRenderTarget
99
107
  */
100
108
  ClearRenderTarget(texture: ITexture, color: Color): void;
109
+
101
110
  /**
102
111
  * Sets the Stencil Buffer value to `0` for all pixels in the currently active [Render Target](https://wiki.facepunch.com/gmod/render_rendertargets).
103
112
  *
@@ -107,6 +116,7 @@ interface RenderLib {
107
116
  * @source https://wiki.facepunch.com/gmod/render.ClearStencil
108
117
  */
109
118
  ClearStencil(): void;
119
+
110
120
  /**
111
121
  * Sets the Stencil Buffer value for every pixel in a given rectangle to a given value.
112
122
  *
@@ -118,6 +128,7 @@ interface RenderLib {
118
128
  * @source https://wiki.facepunch.com/gmod/render.ClearStencilBufferRectangle
119
129
  */
120
130
  ClearStencilBufferRectangle(startX: number, startY: number, endX: number, endY: number, stencilBufferValue: number): void;
131
+
121
132
  /**
122
133
  * Calculates the lighting caused by dynamic lights (such as [Global.DynamicLight](https://wiki.facepunch.com/gmod/Global.DynamicLight) and the Light Sandbox tool) for the specified surface. This will not include map ambient light.
123
134
  *
@@ -127,6 +138,7 @@ interface RenderLib {
127
138
  * @source https://wiki.facepunch.com/gmod/render.ComputeDynamicLighting
128
139
  */
129
140
  ComputeDynamicLighting(position: Vector, normal: Vector): Vector;
141
+
130
142
  /**
131
143
  * Calculates the light color at a certain position.
132
144
  *
@@ -140,6 +152,7 @@ interface RenderLib {
140
152
  * @source https://wiki.facepunch.com/gmod/render.ComputeLighting
141
153
  */
142
154
  ComputeLighting(position: Vector, normal: Vector): Vector;
155
+
143
156
  /**
144
157
  * Calculates diameter of a 3D sphere on a 2D screen.
145
158
  *
@@ -149,6 +162,7 @@ interface RenderLib {
149
162
  * @source https://wiki.facepunch.com/gmod/render.ComputePixelDiameterOfSphere
150
163
  */
151
164
  ComputePixelDiameterOfSphere(point: Vector, radius: number): number;
165
+
152
166
  /**
153
167
  * Copies the currently active Render Target to the specified texture.
154
168
  * **WARNING**: This does not copy the Depth buffer, no method for that is known at this moment so a common workaround is to store the source texture somewhere else, perform your drawing operations, save the result somewhere else and reapply the source texture.
@@ -158,6 +172,7 @@ interface RenderLib {
158
172
  * @source https://wiki.facepunch.com/gmod/render.CopyRenderTargetToTexture
159
173
  */
160
174
  CopyRenderTargetToTexture(Target: ITexture): void;
175
+
161
176
  /**
162
177
  * Copies the contents of one texture to another. Only works with rendertargets.
163
178
  * **WARNING**: This does not copy the Depth buffer, no method for that is known at this moment so a common workaround is to store the source texture somewhere else, perform your drawing operations, save the result somewhere else and reapply the source texture.
@@ -167,18 +182,21 @@ interface RenderLib {
167
182
  * @source https://wiki.facepunch.com/gmod/render.CopyTexture
168
183
  */
169
184
  CopyTexture(texture_from: ITexture, texture_to: ITexture): void;
185
+
170
186
  /**
171
187
  * Sets the cull mode. The culling mode defines how back faces are culled when rendering geometry.
172
188
  * @realm client and menu
173
189
  * @source https://wiki.facepunch.com/gmod/render.CullMode
174
190
  */
175
191
  CullMode(cullMode: number): void;
192
+
176
193
  /**
177
194
  * Set's the depth range of the upcoming render.
178
195
  * @realm client
179
196
  * @source https://wiki.facepunch.com/gmod/render.DepthRange
180
197
  */
181
198
  DepthRange(depthmin: number, depthmax: number): void;
199
+
182
200
  /**
183
201
  * Draws a single-segment Beam made out of a textured, billboarded quad stretching between two points.
184
202
  *
@@ -188,6 +206,7 @@ interface RenderLib {
188
206
  * @source https://wiki.facepunch.com/gmod/render.DrawBeam
189
207
  */
190
208
  DrawBeam(startPos: Vector, endPos: Vector, width: number, textureStart: number, textureEnd: number, color?: Color): void;
209
+
191
210
  /**
192
211
  * Draws a box in 3D space.
193
212
  *
@@ -197,6 +216,7 @@ interface RenderLib {
197
216
  * @source https://wiki.facepunch.com/gmod/render.DrawBox
198
217
  */
199
218
  DrawBox(position: Vector, angles: Angle, mins: Vector, maxs: Vector, color?: Color): void;
219
+
200
220
  /**
201
221
  * Draws a line in 3D space.
202
222
  *
@@ -206,6 +226,7 @@ interface RenderLib {
206
226
  * @source https://wiki.facepunch.com/gmod/render.DrawLine
207
227
  */
208
228
  DrawLine(startPos: Vector, endPos: Vector, color?: Color, writeZ?: boolean): void;
229
+
209
230
  /**
210
231
  * Draws 2 connected triangles. Expects material to be set by [render.SetMaterial](https://wiki.facepunch.com/gmod/render.SetMaterial).
211
232
  *
@@ -215,6 +236,7 @@ interface RenderLib {
215
236
  * @source https://wiki.facepunch.com/gmod/render.DrawQuad
216
237
  */
217
238
  DrawQuad(vert1: Vector, vert2: Vector, vert3: Vector, vert4: Vector, color?: Color): void;
239
+
218
240
  /**
219
241
  * Draws a quad. Expects material to be set by [render.SetMaterial](https://wiki.facepunch.com/gmod/render.SetMaterial).
220
242
  *
@@ -224,6 +246,7 @@ interface RenderLib {
224
246
  * @source https://wiki.facepunch.com/gmod/render.DrawQuadEasy
225
247
  */
226
248
  DrawQuadEasy(position: Vector, normal: Vector, width: number, height: number, color: Color, rotation?: number): void;
249
+
227
250
  /**
228
251
  * Draws the current material set by [render.SetMaterial](https://wiki.facepunch.com/gmod/render.SetMaterial) to the whole screen. The color cannot be customized.
229
252
  *
@@ -235,6 +258,7 @@ interface RenderLib {
235
258
  * @source https://wiki.facepunch.com/gmod/render.DrawScreenQuad
236
259
  */
237
260
  DrawScreenQuad(applyPoster?: boolean): void;
261
+
238
262
  /**
239
263
  * Draws the current material set by [render.SetMaterial](https://wiki.facepunch.com/gmod/render.SetMaterial) to the area specified. Color cannot be customized.
240
264
  *
@@ -246,6 +270,7 @@ interface RenderLib {
246
270
  * @source https://wiki.facepunch.com/gmod/render.DrawScreenQuadEx
247
271
  */
248
272
  DrawScreenQuadEx(startX: number, startY: number, width: number, height: number): void;
273
+
249
274
  /**
250
275
  * Draws a sphere in 3D space. The material previously set with [render.SetMaterial](https://wiki.facepunch.com/gmod/render.SetMaterial) will be applied the sphere's surface.
251
276
  *
@@ -257,6 +282,7 @@ interface RenderLib {
257
282
  * @source https://wiki.facepunch.com/gmod/render.DrawSphere
258
283
  */
259
284
  DrawSphere(position: Vector, radius: number, longitudeSteps: number, latitudeSteps: number, color?: Color): void;
285
+
260
286
  /**
261
287
  * Draws a sprite in 3D space.
262
288
  *
@@ -266,6 +292,7 @@ interface RenderLib {
266
292
  * @source https://wiki.facepunch.com/gmod/render.DrawSprite
267
293
  */
268
294
  DrawSprite(position: Vector, width: number, height: number, color?: Color): void;
295
+
269
296
  /**
270
297
  * Draws a texture over the whole screen.
271
298
  *
@@ -275,6 +302,7 @@ interface RenderLib {
275
302
  * @source https://wiki.facepunch.com/gmod/render.DrawTextureToScreen
276
303
  */
277
304
  DrawTextureToScreen(tex: ITexture): void;
305
+
278
306
  /**
279
307
  * Draws a textured rectangle.
280
308
  *
@@ -284,6 +312,7 @@ interface RenderLib {
284
312
  * @source https://wiki.facepunch.com/gmod/render.DrawTextureToScreenRect
285
313
  */
286
314
  DrawTextureToScreenRect(tex: ITexture, x: number, y: number, width: number, height: number): void;
315
+
287
316
  /**
288
317
  * Draws a wireframe box in 3D space.
289
318
  *
@@ -293,6 +322,7 @@ interface RenderLib {
293
322
  * @source https://wiki.facepunch.com/gmod/render.DrawWireframeBox
294
323
  */
295
324
  DrawWireframeBox(position: Vector, angle: Angle, mins: Vector, maxs: Vector, color?: Color, writeZ?: boolean): void;
325
+
296
326
  /**
297
327
  * Draws a wireframe sphere in 3d space.
298
328
  *
@@ -302,6 +332,7 @@ interface RenderLib {
302
332
  * @source https://wiki.facepunch.com/gmod/render.DrawWireframeSphere
303
333
  */
304
334
  DrawWireframeSphere(position: Vector, radius: number, longitudeSteps: number, latitudeSteps: number, color?: Color, writeZ?: boolean): void;
335
+
305
336
  /**
306
337
  * Sets the status of the clip renderer, returning previous state.
307
338
  *
@@ -312,6 +343,7 @@ interface RenderLib {
312
343
  * @source https://wiki.facepunch.com/gmod/render.EnableClipping
313
344
  */
314
345
  EnableClipping(state: boolean): boolean;
346
+
315
347
  /**
316
348
  * Ends the beam mesh of a beam started with [render.StartBeam](https://wiki.facepunch.com/gmod/render.StartBeam).
317
349
  *
@@ -321,36 +353,42 @@ interface RenderLib {
321
353
  * @source https://wiki.facepunch.com/gmod/render.EndBeam
322
354
  */
323
355
  EndBeam(): void;
356
+
324
357
  /**
325
358
  * Sets the color of the fog.
326
359
  * @realm client
327
360
  * @source https://wiki.facepunch.com/gmod/render.FogColor
328
361
  */
329
362
  FogColor(red: number, green: number, blue: number): void;
363
+
330
364
  /**
331
365
  * Sets the at which the fog reaches its max density.
332
366
  * @realm client
333
367
  * @source https://wiki.facepunch.com/gmod/render.FogEnd
334
368
  */
335
369
  FogEnd(distance: number): void;
370
+
336
371
  /**
337
372
  * Sets the maximum density of the fog.
338
373
  * @realm client
339
374
  * @source https://wiki.facepunch.com/gmod/render.FogMaxDensity
340
375
  */
341
376
  FogMaxDensity(maxDensity: number): void;
377
+
342
378
  /**
343
379
  * Sets the mode of fog.
344
380
  * @realm client
345
381
  * @source https://wiki.facepunch.com/gmod/render.FogMode
346
382
  */
347
383
  FogMode(fogMode: MATERIAL_FOG): void;
384
+
348
385
  /**
349
386
  * Sets the distance at which the fog starts showing up.
350
387
  * @realm client
351
388
  * @source https://wiki.facepunch.com/gmod/render.FogStart
352
389
  */
353
390
  FogStart(fogStart: number): void;
391
+
354
392
  /**
355
393
  * Returns the ambient color intensity of the map, basically the color the sky emits.
356
394
  *
@@ -362,12 +400,14 @@ interface RenderLib {
362
400
  * @source https://wiki.facepunch.com/gmod/render.GetAmbientLightColor
363
401
  */
364
402
  GetAmbientLightColor(): Vector;
403
+
365
404
  /**
366
405
  * Returns the current alpha blending.
367
406
  * @realm client
368
407
  * @source https://wiki.facepunch.com/gmod/render.GetBlend
369
408
  */
370
409
  GetBlend(): number;
410
+
371
411
  /**
372
412
  * **INTERNAL**: You can use [Global.GetRenderTargetEx](https://wiki.facepunch.com/gmod/Global.GetRenderTargetEx) if you need to create a Render Target
373
413
  *
@@ -377,6 +417,7 @@ interface RenderLib {
377
417
  * @source https://wiki.facepunch.com/gmod/render.GetBloomTex0
378
418
  */
379
419
  GetBloomTex0(): ITexture;
420
+
380
421
  /**
381
422
  * **INTERNAL**: You probably want to just use a custom render target. See [Global.GetRenderTargetEx](https://wiki.facepunch.com/gmod/Global.GetRenderTargetEx).
382
423
  *
@@ -389,36 +430,42 @@ interface RenderLib {
389
430
  * @source https://wiki.facepunch.com/gmod/render.GetBloomTex1
390
431
  */
391
432
  GetBloomTex1(): ITexture;
433
+
392
434
  /**
393
435
  * Returns the current color modulation values as normals.
394
436
  * @realm client
395
437
  * @source https://wiki.facepunch.com/gmod/render.GetColorModulation
396
438
  */
397
439
  GetColorModulation(): (number, number, number);
440
+
398
441
  /**
399
442
  * Returns the maximum available directX version.
400
443
  * @realm client and menu
401
444
  * @source https://wiki.facepunch.com/gmod/render.GetDXLevel
402
445
  */
403
446
  GetDXLevel(): number;
447
+
404
448
  /**
405
449
  * Returns the current fog color.
406
450
  * @realm client
407
451
  * @source https://wiki.facepunch.com/gmod/render.GetFogColor
408
452
  */
409
453
  GetFogColor(): (number, number, number);
454
+
410
455
  /**
411
456
  * Returns the fog start and end distance.
412
457
  * @realm client
413
458
  * @source https://wiki.facepunch.com/gmod/render.GetFogDistances
414
459
  */
415
460
  GetFogDistances(): (number, number, number);
461
+
416
462
  /**
417
463
  * Get the maximum density of the fog.
418
464
  * @realm client
419
465
  * @source https://wiki.facepunch.com/gmod/render.GetFogMaxDensity
420
466
  */
421
467
  GetFogMaxDensity(): number;
468
+
422
469
  /**
423
470
  * Returns the current fog mode.
424
471
  *
@@ -426,6 +473,7 @@ interface RenderLib {
426
473
  * @source https://wiki.facepunch.com/gmod/render.GetFogMode
427
474
  */
428
475
  GetFogMode(): number;
476
+
429
477
  /**
430
478
  * Returns the full screen depth texture.
431
479
  * @realm client
@@ -433,12 +481,14 @@ interface RenderLib {
433
481
  * @deprecated Alias of render.GetPowerOfTwoTexture in practice.
434
482
  */
435
483
  GetFullScreenDepthTexture(): ITexture;
484
+
436
485
  /**
437
486
  * Returns whether HDR is currently enabled or not. This takes into account hardware support, current map and current client settings.
438
487
  * @realm client and menu
439
488
  * @source https://wiki.facepunch.com/gmod/render.GetHDREnabled
440
489
  */
441
490
  GetHDREnabled(): boolean;
491
+
442
492
  /**
443
493
  * Gets the light exposure on the specified position.
444
494
  *
@@ -449,6 +499,7 @@ interface RenderLib {
449
499
  * @deprecated Same as render.ComputeLighting without the `normal` argument provided, so just use that
450
500
  */
451
501
  GetLightColor(position: Vector): Vector;
502
+
452
503
  /**
453
504
  * **INTERNAL**: You probably want to just use a custom render target. See [Global.GetRenderTargetEx](https://wiki.facepunch.com/gmod/Global.GetRenderTargetEx).
454
505
  *
@@ -458,6 +509,7 @@ interface RenderLib {
458
509
  * @source https://wiki.facepunch.com/gmod/render.GetMoBlurTex0
459
510
  */
460
511
  GetMoBlurTex0(): ITexture;
512
+
461
513
  /**
462
514
  * **INTERNAL**: You probably want to just use a custom render target. See [Global.GetRenderTargetEx](https://wiki.facepunch.com/gmod/Global.GetRenderTargetEx).
463
515
  *
@@ -467,6 +519,7 @@ interface RenderLib {
467
519
  * @source https://wiki.facepunch.com/gmod/render.GetMoBlurTex1
468
520
  */
469
521
  GetMoBlurTex1(): ITexture;
522
+
470
523
  /**
471
524
  * **INTERNAL**: You probably want to just use a custom render target. See [Global.GetRenderTargetEx](https://wiki.facepunch.com/gmod/Global.GetRenderTargetEx).
472
525
  *
@@ -478,6 +531,7 @@ interface RenderLib {
478
531
  * @source https://wiki.facepunch.com/gmod/render.GetMorphTex0
479
532
  */
480
533
  GetMorphTex0(): ITexture;
534
+
481
535
  /**
482
536
  * **INTERNAL**: You probably want to just use a custom render target. See [Global.GetRenderTargetEx](https://wiki.facepunch.com/gmod/Global.GetRenderTargetEx).
483
537
  *
@@ -490,12 +544,14 @@ interface RenderLib {
490
544
  * @source https://wiki.facepunch.com/gmod/render.GetMorphTex1
491
545
  */
492
546
  GetMorphTex1(): ITexture;
547
+
493
548
  /**
494
549
  * Returns the Power Of Two Frame Buffer texture.
495
550
  * @realm client
496
551
  * @source https://wiki.facepunch.com/gmod/render.GetPowerOfTwoTexture
497
552
  */
498
553
  GetPowerOfTwoTexture(): ITexture;
554
+
499
555
  /**
500
556
  * Alias of [render.GetPowerOfTwoTexture](https://wiki.facepunch.com/gmod/render.GetPowerOfTwoTexture).
501
557
  * @realm client
@@ -503,6 +559,7 @@ interface RenderLib {
503
559
  * @deprecated Alias of render.GetPowerOfTwoTexture.
504
560
  */
505
561
  GetRefractTexture(): ITexture;
562
+
506
563
  /**
507
564
  * Returns the currently active render target.
508
565
  *
@@ -512,12 +569,14 @@ interface RenderLib {
512
569
  * @source https://wiki.facepunch.com/gmod/render.GetRenderTarget
513
570
  */
514
571
  GetRenderTarget(): ITexture;
572
+
515
573
  /**
516
574
  * Returns the `_rt_ResolvedFullFrameDepth` texture for SSAO depth. It will only be updated if [GM:NeedsDepthPass](https://wiki.facepunch.com/gmod/GM:NeedsDepthPass) returns true. Depth is written using the [Shaders/DepthWrite](https://wiki.facepunch.com/gmod/Shaders/DepthWrite) by rendering scene a second time, using [SSAO_DepthPass function](https://github.com/ValveSoftware/source-sdk-2013/blob/11a677c349b149b2f77184dc903e6bb17f8df69b/src/game/client/viewrender.cpp#L5576).
517
575
  * @realm client
518
576
  * @source https://wiki.facepunch.com/gmod/render.GetResolvedFullFrameDepth
519
577
  */
520
578
  GetResolvedFullFrameDepth(): ITexture;
579
+
521
580
  /**
522
581
  * Obtain an [ITexture](https://wiki.facepunch.com/gmod/ITexture) of the screen. You must call [render.UpdateScreenEffectTexture](https://wiki.facepunch.com/gmod/render.UpdateScreenEffectTexture) in order to update this texture with the currently rendered scene.
523
582
  *
@@ -527,18 +586,21 @@ interface RenderLib {
527
586
  * @source https://wiki.facepunch.com/gmod/render.GetScreenEffectTexture
528
587
  */
529
588
  GetScreenEffectTexture(textureIndex?: number): ITexture;
589
+
530
590
  /**
531
591
  * Returns the first quarter sized frame buffer texture.
532
592
  * @realm client
533
593
  * @source https://wiki.facepunch.com/gmod/render.GetSmallTex0
534
594
  */
535
595
  GetSmallTex0(): ITexture;
596
+
536
597
  /**
537
598
  * Returns the second quarter sized frame buffer texture.
538
599
  * @realm client
539
600
  * @source https://wiki.facepunch.com/gmod/render.GetSmallTex1
540
601
  */
541
602
  GetSmallTex1(): ITexture;
603
+
542
604
  /**
543
605
  * Returns a floating point texture (RGBA16161616F format) the same resolution as the screen.
544
606
  *
@@ -549,30 +611,35 @@ interface RenderLib {
549
611
  * @source https://wiki.facepunch.com/gmod/render.GetSuperFPTex
550
612
  */
551
613
  GetSuperFPTex(): ITexture;
614
+
552
615
  /**
553
616
  * See [render.GetSuperFPTex](https://wiki.facepunch.com/gmod/render.GetSuperFPTex).
554
617
  * @realm client
555
618
  * @source https://wiki.facepunch.com/gmod/render.GetSuperFPTex2
556
619
  */
557
620
  GetSuperFPTex2(): ITexture;
621
+
558
622
  /**
559
623
  * Performs a render trace and returns the color of the surface hit, this uses a low res version of the texture.
560
624
  * @realm client
561
625
  * @source https://wiki.facepunch.com/gmod/render.GetSurfaceColor
562
626
  */
563
627
  GetSurfaceColor(startPos: Vector, endPos: Vector): Vector;
628
+
564
629
  /**
565
630
  * Returns a vector representing linear tone mapping scale. See [render.SetToneMappingScaleLinear](https://wiki.facepunch.com/gmod/render.SetToneMappingScaleLinear) for details.
566
631
  * @realm client
567
632
  * @source https://wiki.facepunch.com/gmod/render.GetToneMappingScaleLinear
568
633
  */
569
634
  GetToneMappingScaleLinear(): Vector;
635
+
570
636
  /**
571
637
  * Returns the current view setup.
572
638
  * @realm client
573
639
  * @source https://wiki.facepunch.com/gmod/render.GetViewSetup
574
640
  */
575
641
  GetViewSetup(noPlayer?: boolean): table;
642
+
576
643
  /**
577
644
  * Lets you know when a screenshot is being taken during rendering hooks.
578
645
  *
@@ -582,6 +649,7 @@ interface RenderLib {
582
649
  * @source https://wiki.facepunch.com/gmod/render.IsTakingScreenshot
583
650
  */
584
651
  IsTakingScreenshot(): boolean;
652
+
585
653
  /**
586
654
  * Sets the render material override for all next calls of [Entity:DrawModel](https://wiki.facepunch.com/gmod/Entity:DrawModel). Also overrides [render.MaterialOverrideByIndex](https://wiki.facepunch.com/gmod/render.MaterialOverrideByIndex).
587
655
  *
@@ -594,6 +662,7 @@ interface RenderLib {
594
662
  * @source https://wiki.facepunch.com/gmod/render.MaterialOverride
595
663
  */
596
664
  MaterialOverride(material?: IMaterial | nil): void;
665
+
597
666
  /**
598
667
  * Similar to [render.MaterialOverride](https://wiki.facepunch.com/gmod/render.MaterialOverride), but overrides the materials per index. For simple entities you may want to just use [Entity:SetSubMaterial](https://wiki.facepunch.com/gmod/Entity:SetSubMaterial).
599
668
  *
@@ -603,18 +672,21 @@ interface RenderLib {
603
672
  * @source https://wiki.facepunch.com/gmod/render.MaterialOverrideByIndex
604
673
  */
605
674
  MaterialOverrideByIndex(index?: number, material?: IMaterial): void;
675
+
606
676
  /**
607
677
  * Returns the maximum texture height the renderer can handle.
608
678
  * @realm client and menu
609
679
  * @source https://wiki.facepunch.com/gmod/render.MaxTextureHeight
610
680
  */
611
681
  MaxTextureHeight(): number;
682
+
612
683
  /**
613
684
  * Returns the maximum texture width the renderer can handle.
614
685
  * @realm client and menu
615
686
  * @source https://wiki.facepunch.com/gmod/render.MaxTextureWidth
616
687
  */
617
688
  MaxTextureWidth(): number;
689
+
618
690
  /**
619
691
  * Creates a new [Global.ClientsideModel](https://wiki.facepunch.com/gmod/Global.ClientsideModel), renders it at the specified pos/ang, and removes it. Can also be given an existing [CSEnt](https://wiki.facepunch.com/gmod/CSEnt) to reuse instead.
620
692
  *
@@ -627,6 +699,7 @@ interface RenderLib {
627
699
  * @source https://wiki.facepunch.com/gmod/render.Model
628
700
  */
629
701
  Model(settings: table, ent?: CSEnt): void;
702
+
630
703
  /**
631
704
  * Forces all future draw operations to use a specific [IMaterial](https://wiki.facepunch.com/gmod/IMaterial).
632
705
  *
@@ -639,6 +712,7 @@ interface RenderLib {
639
712
  * @source https://wiki.facepunch.com/gmod/render.ModelMaterialOverride
640
713
  */
641
714
  ModelMaterialOverride(material?: IMaterial): void;
715
+
642
716
  /**
643
717
  * Overrides the write behaviour of all next rendering operations towards the alpha channel of the current render target.
644
718
  *
@@ -651,6 +725,7 @@ interface RenderLib {
651
725
  * @source https://wiki.facepunch.com/gmod/render.OverrideAlphaWriteEnable
652
726
  */
653
727
  OverrideAlphaWriteEnable(enable: boolean, shouldWrite?: boolean): void;
728
+
654
729
  /**
655
730
  * Overrides the way that the final color and alpha is calculated for each pixel affected by upcoming draw operations.
656
731
  *
@@ -665,8 +740,11 @@ interface RenderLib {
665
740
  * @source https://wiki.facepunch.com/gmod/render.OverrideBlend
666
741
  */
667
742
  OverrideBlend(enabled: boolean, sourceMultiplier: BLEND, destinationMultiplier: BLEND, blendingFunction: BLENDFUNC): void;
743
+
668
744
  OverrideBlend(enabled: boolean, sourceColorMultiplier: BLEND, destinationColorMultiplier: BLEND, colorBlendingFunction: BLENDFUNC, sourceAlphaMultiplier?: BLEND, destinationAlphaMultiplier?: BLEND, alphaBlendingFunction?: BLENDFUNC): void;
745
+
669
746
  OverrideBlend(enabled: boolean): void;
747
+
670
748
  /**
671
749
  * Overrides the internal graphical functions used to determine the final color and alpha of a rendered texture.
672
750
  *
@@ -680,18 +758,21 @@ interface RenderLib {
680
758
  * @deprecated Use render.OverrideBlend instead.
681
759
  */
682
760
  OverrideBlendFunc(enabled: boolean, srcBlend: number, destBlend: number, srcBlendAlpha?: number, destBlendAlpha?: number): void;
761
+
683
762
  /**
684
763
  * Overrides the write behaviour of all next rendering operations towards the color channel of the current render target.
685
764
  * @realm client and menu
686
765
  * @source https://wiki.facepunch.com/gmod/render.OverrideColorWriteEnable
687
766
  */
688
767
  OverrideColorWriteEnable(enable: boolean, shouldWrite: boolean): void;
768
+
689
769
  /**
690
770
  * Overrides the write behaviour of all next rendering operations towards the depth buffer.
691
771
  * @realm client and menu
692
772
  * @source https://wiki.facepunch.com/gmod/render.OverrideDepthEnable
693
773
  */
694
774
  OverrideDepthEnable(enable: boolean, shouldWrite: boolean): void;
775
+
695
776
  /**
696
777
  * Performs a Stencil operation on every pixel in the active [Render Target](https://wiki.facepunch.com/gmod/render_rendertargets) without performing a draw operation.
697
778
  *
@@ -701,12 +782,14 @@ interface RenderLib {
701
782
  * @source https://wiki.facepunch.com/gmod/render.PerformFullScreenStencilOperation
702
783
  */
703
784
  PerformFullScreenStencilOperation(): void;
785
+
704
786
  /**
705
787
  * Removes the current active clipping plane from the clip plane stack.
706
788
  * @realm client and menu
707
789
  * @source https://wiki.facepunch.com/gmod/render.PopCustomClipPlane
708
790
  */
709
791
  PopCustomClipPlane(): void;
792
+
710
793
  /**
711
794
  * Pops (Removes) the texture filter most recently pushed (Added) onto the magnification texture filter stack.
712
795
  *
@@ -718,6 +801,7 @@ interface RenderLib {
718
801
  * @source https://wiki.facepunch.com/gmod/render.PopFilterMag
719
802
  */
720
803
  PopFilterMag(): void;
804
+
721
805
  /**
722
806
  * Pops (Removes) the texture filter most recently pushed (Added) onto the minification texture filter stack.
723
807
  *
@@ -729,12 +813,14 @@ interface RenderLib {
729
813
  * @source https://wiki.facepunch.com/gmod/render.PopFilterMin
730
814
  */
731
815
  PopFilterMin(): void;
816
+
732
817
  /**
733
818
  * Pops the current flashlight mode from the flashlight mode stack.
734
819
  * @realm client
735
820
  * @source https://wiki.facepunch.com/gmod/render.PopFlashlightMode
736
821
  */
737
822
  PopFlashlightMode(): void;
823
+
738
824
  /**
739
825
  * Pops the last render target and viewport from the RT stack and sets them as the current render target and viewport.
740
826
  *
@@ -744,6 +830,7 @@ interface RenderLib {
744
830
  * @source https://wiki.facepunch.com/gmod/render.PopRenderTarget
745
831
  */
746
832
  PopRenderTarget(): void;
833
+
747
834
  /**
748
835
  * Pushes a new clipping plane of the clip plane stack and sets it as active.
749
836
  *
@@ -753,6 +840,7 @@ interface RenderLib {
753
840
  * @source https://wiki.facepunch.com/gmod/render.PushCustomClipPlane
754
841
  */
755
842
  PushCustomClipPlane(normal: Vector, distance: number): void;
843
+
756
844
  /**
757
845
  * Pushes (Adds) a texture filter onto the magnification texture filter stack.
758
846
  * This will modify how textures are stretched to sizes larger than their native resolution for upcoming rendering and drawing operations.
@@ -769,6 +857,7 @@ interface RenderLib {
769
857
  * @source https://wiki.facepunch.com/gmod/render.PushFilterMag
770
858
  */
771
859
  PushFilterMag(texFilterType: number): void;
860
+
772
861
  /**
773
862
  * Pushes (Adds) a texture filter onto the minification texture filter stack.
774
863
  * This will modify how textures are compressed to a lower resolution than their native resolution for upcoming rendering and drawing operations.
@@ -783,6 +872,7 @@ interface RenderLib {
783
872
  * @source https://wiki.facepunch.com/gmod/render.PushFilterMin
784
873
  */
785
874
  PushFilterMin(texFilterType: number): void;
875
+
786
876
  /**
787
877
  * Enables the flashlight projection for the upcoming rendering.
788
878
  *
@@ -793,6 +883,7 @@ interface RenderLib {
793
883
  * @deprecated This will leave models lit under specific conditions. You should use render.RenderFlashlights which is meant as a direct replacement for this function.
794
884
  */
795
885
  PushFlashlightMode(enable?: boolean): void;
886
+
796
887
  /**
797
888
  * Pushes the current render target and viewport to the RT stack then sets a new current render target and viewport. If the viewport is not specified, the dimensions of the render target are used instead.
798
889
  *
@@ -809,30 +900,35 @@ interface RenderLib {
809
900
  * @source https://wiki.facepunch.com/gmod/render.PushRenderTarget
810
901
  */
811
902
  PushRenderTarget(texture?: ITexture, x?: number, y?: number, w?: number, h?: number): void;
903
+
812
904
  /**
813
905
  * Reads the color of the specified pixel from the RenderTarget sent by [render.CapturePixels](https://wiki.facepunch.com/gmod/render.CapturePixels)
814
906
  * @realm client
815
907
  * @source https://wiki.facepunch.com/gmod/render.ReadPixel
816
908
  */
817
909
  ReadPixel(x: number, y: number): (number, number, number, number);
910
+
818
911
  /**
819
912
  * This applies the changes made to map lighting using [engine.LightStyle](https://wiki.facepunch.com/gmod/engine.LightStyle).
820
913
  * @realm client
821
914
  * @source https://wiki.facepunch.com/gmod/render.RedownloadAllLightmaps
822
915
  */
823
916
  RedownloadAllLightmaps(DoStaticProps?: boolean, UpdateStaticLighting?: boolean): void;
917
+
824
918
  /**
825
919
  * Renders additive flashlights on an [IMesh](https://wiki.facepunch.com/gmod/IMesh), a direct replacement for [render.PushFlashlightMode](https://wiki.facepunch.com/gmod/render.PushFlashlightMode).
826
920
  * @realm client
827
921
  * @source https://wiki.facepunch.com/gmod/render.RenderFlashlights
828
922
  */
829
923
  RenderFlashlights(renderFunc: function): void;
924
+
830
925
  /**
831
926
  * Renders the HUD on the screen.
832
927
  * @realm client
833
928
  * @source https://wiki.facepunch.com/gmod/render.RenderHUD
834
929
  */
835
930
  RenderHUD(x: number, y: number, w: number, h: number): void;
931
+
836
932
  /**
837
933
  * Renders the scene with the specified viewData to the current active render target.
838
934
  *
@@ -843,6 +939,7 @@ interface RenderLib {
843
939
  * @source https://wiki.facepunch.com/gmod/render.RenderView
844
940
  */
845
941
  RenderView(view?: ViewData): void;
942
+
846
943
  /**
847
944
  * Resets the model lighting to the specified color.
848
945
  *
@@ -852,6 +949,7 @@ interface RenderLib {
852
949
  * @source https://wiki.facepunch.com/gmod/render.ResetModelLighting
853
950
  */
854
951
  ResetModelLighting(r: number, g: number, b: number): void;
952
+
855
953
  /**
856
954
  * Resets the HDR tone multiplier to the specified value.
857
955
  *
@@ -861,12 +959,14 @@ interface RenderLib {
861
959
  * @source https://wiki.facepunch.com/gmod/render.ResetToneMappingScale
862
960
  */
863
961
  ResetToneMappingScale(scale: number): void;
962
+
864
963
  /**
865
964
  * Sets the ambient lighting for any upcoming render operation.
866
965
  * @realm client
867
966
  * @source https://wiki.facepunch.com/gmod/render.SetAmbientLight
868
967
  */
869
968
  SetAmbientLight(r: number, g: number, b: number): void;
969
+
870
970
  /**
871
971
  * Sets the alpha blending (or transparency) for upcoming render operations.
872
972
  *
@@ -883,6 +983,7 @@ interface RenderLib {
883
983
  * @source https://wiki.facepunch.com/gmod/render.SetBlend
884
984
  */
885
985
  SetBlend(blending: number): void;
986
+
886
987
  /**
887
988
  * Sets the current drawing material to "color".
888
989
  *
@@ -904,6 +1005,7 @@ interface RenderLib {
904
1005
  * @source https://wiki.facepunch.com/gmod/render.SetColorMaterial
905
1006
  */
906
1007
  SetColorMaterial(): void;
1008
+
907
1009
  /**
908
1010
  * Sets the current drawing material to `color_ignorez`.
909
1011
  *
@@ -925,6 +1027,7 @@ interface RenderLib {
925
1027
  * @source https://wiki.facepunch.com/gmod/render.SetColorMaterialIgnoreZ
926
1028
  */
927
1029
  SetColorMaterialIgnoreZ(): void;
1030
+
928
1031
  /**
929
1032
  * Sets the color modulation for upcoming render operations, such as rendering models.
930
1033
  *
@@ -936,12 +1039,14 @@ interface RenderLib {
936
1039
  * @source https://wiki.facepunch.com/gmod/render.SetColorModulation
937
1040
  */
938
1041
  SetColorModulation(r: number, g: number, b: number): void;
1042
+
939
1043
  /**
940
1044
  * If the [fog mode](https://wiki.facepunch.com/gmod/render.FogMode) is set to [MATERIAL_FOG_LINEAR_BELOW_FOG_Z](https://wiki.facepunch.com/gmod/Enums/MATERIAL_FOG), the fog will only be rendered below the specified height.
941
1045
  * @realm client
942
1046
  * @source https://wiki.facepunch.com/gmod/render.SetFogZ
943
1047
  */
944
1048
  SetFogZ(fogZ: number): void;
1049
+
945
1050
  /**
946
1051
  * Sets the goal HDR tone mapping scale.
947
1052
  *
@@ -951,6 +1056,7 @@ interface RenderLib {
951
1056
  * @source https://wiki.facepunch.com/gmod/render.SetGoalToneMappingScale
952
1057
  */
953
1058
  SetGoalToneMappingScale(scale: number): void;
1059
+
954
1060
  /**
955
1061
  * Sets lighting mode when rendering something.
956
1062
  *
@@ -961,6 +1067,7 @@ interface RenderLib {
961
1067
  * @source https://wiki.facepunch.com/gmod/render.SetLightingMode
962
1068
  */
963
1069
  SetLightingMode(Mode: number): void;
1070
+
964
1071
  /**
965
1072
  * Sets lighting origin for the current model.
966
1073
  *
@@ -968,6 +1075,7 @@ interface RenderLib {
968
1075
  * @source https://wiki.facepunch.com/gmod/render.SetLightingOrigin
969
1076
  */
970
1077
  SetLightingOrigin(lightingOrigin: Vector): void;
1078
+
971
1079
  /**
972
1080
  * Sets the texture to be used as the lightmap in upcoming rendering operations. This is required when rendering meshes using a material with a lightmapped shader such as `LightmappedGeneric`.
973
1081
  *
@@ -975,6 +1083,7 @@ interface RenderLib {
975
1083
  * @source https://wiki.facepunch.com/gmod/render.SetLightmapTexture
976
1084
  */
977
1085
  SetLightmapTexture(tex: ITexture): void;
1086
+
978
1087
  /**
979
1088
  * Sets up the local lighting for any upcoming render operation. Up to 4 local lights can be defined, with one of three different types (point, directional, spot).
980
1089
  *
@@ -984,6 +1093,7 @@ interface RenderLib {
984
1093
  * @source https://wiki.facepunch.com/gmod/render.SetLocalModelLights
985
1094
  */
986
1095
  SetLocalModelLights(lights?: LocalLight): void;
1096
+
987
1097
  /**
988
1098
  * Sets the material to be used in any upcoming render operation using the [render](https://wiki.facepunch.com/gmod/render).
989
1099
  *
@@ -993,6 +1103,7 @@ interface RenderLib {
993
1103
  * @source https://wiki.facepunch.com/gmod/render.SetMaterial
994
1104
  */
995
1105
  SetMaterial(mat: IMaterial): void;
1106
+
996
1107
  /**
997
1108
  * Sets up the ambient lighting for any upcoming render operation. Ambient lighting can be seen as a cube enclosing the object to be drawn, each of its faces representing a directional light source that shines towards the object. Thus, there is a total of six different light sources that can be configured separately.
998
1109
  *
@@ -1002,12 +1113,14 @@ interface RenderLib {
1002
1113
  * @source https://wiki.facepunch.com/gmod/render.SetModelLighting
1003
1114
  */
1004
1115
  SetModelLighting(lightDirection: BOX, red: number, green: number, blue: number): void;
1116
+
1005
1117
  /**
1006
1118
  * Sets the render target to the specified rt.
1007
1119
  * @realm client
1008
1120
  * @source https://wiki.facepunch.com/gmod/render.SetRenderTarget
1009
1121
  */
1010
1122
  SetRenderTarget(texture: ITexture): void;
1123
+
1011
1124
  /**
1012
1125
  * Sets the render target with the specified index of `COLOR[n]` to the specified rt, allowing you to work with [Multiple Render Targets (MRT)](https://learn.microsoft.com/en-us/windows/win32/direct3d9/multiple-render-targets). Since standard shaders don't use MRT, you might find this useful at [Shaders/screenspace_general](https://wiki.facepunch.com/gmod/Shaders/screenspace_general).
1013
1126
  * **NOTE**: MRT doesn't work with 2D render functions like [render.DrawScreenQuad](https://wiki.facepunch.com/gmod/render.DrawScreenQuad). Instead, you can render a [render.DrawQuad](https://wiki.facepunch.com/gmod/render.DrawQuad) using [cam.Start2D](https://wiki.facepunch.com/gmod/cam.Start2D).
@@ -1025,30 +1138,35 @@ interface RenderLib {
1025
1138
  * @source https://wiki.facepunch.com/gmod/render.SetRenderTargetEx
1026
1139
  */
1027
1140
  SetRenderTargetEx(rtIndex: number, texture?: ITexture): void;
1141
+
1028
1142
  /**
1029
1143
  * Sets a scissoring rectangle which limits the drawing area. (otherwise known as clipping)
1030
1144
  * @realm client and menu
1031
1145
  * @source https://wiki.facepunch.com/gmod/render.SetScissorRect
1032
1146
  */
1033
1147
  SetScissorRect(startX: number, startY: number, endX: number, endY: number, enable: boolean): void;
1148
+
1034
1149
  /**
1035
1150
  * Sets the shadow color.
1036
1151
  * @realm client
1037
1152
  * @source https://wiki.facepunch.com/gmod/render.SetShadowColor
1038
1153
  */
1039
1154
  SetShadowColor(red: number, green: number, blue: number): void;
1155
+
1040
1156
  /**
1041
1157
  * Sets the shadow projection direction.
1042
1158
  * @realm client
1043
1159
  * @source https://wiki.facepunch.com/gmod/render.SetShadowDirection
1044
1160
  */
1045
1161
  SetShadowDirection(shadowDirections: Vector): void;
1162
+
1046
1163
  /**
1047
1164
  * Sets the maximum shadow projection range.
1048
1165
  * @realm client
1049
1166
  * @source https://wiki.facepunch.com/gmod/render.SetShadowDistance
1050
1167
  */
1051
1168
  SetShadowDistance(shadowDistance: number): void;
1169
+
1052
1170
  /**
1053
1171
  * Sets whether all shadow rendering should be disabled.
1054
1172
  *
@@ -1060,6 +1178,7 @@ interface RenderLib {
1060
1178
  * @source https://wiki.facepunch.com/gmod/render.SetShadowsDisabled
1061
1179
  */
1062
1180
  SetShadowsDisabled(disable: boolean): void;
1181
+
1063
1182
  /**
1064
1183
  * Sets the Compare Function that all pixels affected by a draw operation will have their Stencil Buffer value tested against.
1065
1184
  *
@@ -1075,6 +1194,7 @@ interface RenderLib {
1075
1194
  * @source https://wiki.facepunch.com/gmod/render.SetStencilCompareFunction
1076
1195
  */
1077
1196
  SetStencilCompareFunction(compareFunction: STENCILCOMPARISONFUNCTION): void;
1197
+
1078
1198
  /**
1079
1199
  * Enables or disables the Stencil system for future draw operations.
1080
1200
  *
@@ -1093,6 +1213,7 @@ interface RenderLib {
1093
1213
  * @source https://wiki.facepunch.com/gmod/render.SetStencilEnable
1094
1214
  */
1095
1215
  SetStencilEnable(newState: boolean): void;
1216
+
1096
1217
  /**
1097
1218
  * Sets the [Stencil Operation](https://wiki.facepunch.com/gmod/Enums/STENCILOPERATION) that will be performed on the Stencil Buffer values of pixels affected by draw operations if the [Compare Function](https://wiki.facepunch.com/gmod/render.SetStencilCompareFunction) did **not** [Pass](https://wiki.facepunch.com/gmod/render.SetStencilPassOperation) the pixel.
1098
1219
  *
@@ -1102,6 +1223,7 @@ interface RenderLib {
1102
1223
  * @source https://wiki.facepunch.com/gmod/render.SetStencilFailOperation
1103
1224
  */
1104
1225
  SetStencilFailOperation(failOperation: STENCILOPERATION): void;
1226
+
1105
1227
  /**
1106
1228
  * Sets the [Stencil Operation](https://wiki.facepunch.com/gmod/Enums/STENCILOPERATION) that will be performed on the Stencil Buffer values of pixels affected by draw operations if the [Compare Function](https://wiki.facepunch.com/gmod/render.SetStencilCompareFunction) Passes the pixel.
1107
1229
  *
@@ -1111,6 +1233,7 @@ interface RenderLib {
1111
1233
  * @source https://wiki.facepunch.com/gmod/render.SetStencilPassOperation
1112
1234
  */
1113
1235
  SetStencilPassOperation(passOperation: STENCILOPERATION): void;
1236
+
1114
1237
  /**
1115
1238
  * Sets the Stencil system's Reference Value which is compared against each pixel's corresponding Stencil Buffer value in the [Compare Function](https://wiki.facepunch.com/gmod/render.SetStencilCompareFunction) and can be used to modify the Stencil Buffer value of those same pixels in the [Pass](https://wiki.facepunch.com/gmod/render.SetStencilPassOperation), [Fail](https://wiki.facepunch.com/gmod/render.SetStencilFailOperation), and [Z Fail](https://wiki.facepunch.com/gmod/render.SetStencilZFailOperation) operations.
1116
1239
  *
@@ -1120,6 +1243,7 @@ interface RenderLib {
1120
1243
  * @source https://wiki.facepunch.com/gmod/render.SetStencilReferenceValue
1121
1244
  */
1122
1245
  SetStencilReferenceValue(referenceValue: number): void;
1246
+
1123
1247
  /**
1124
1248
  * Sets the unsigned 8-bit (`byte`) bitflag mask that will be bitwise ANDed with all values as they are read (tested) from the Stencil Buffer
1125
1249
  *
@@ -1133,6 +1257,7 @@ interface RenderLib {
1133
1257
  * @source https://wiki.facepunch.com/gmod/render.SetStencilTestMask
1134
1258
  */
1135
1259
  SetStencilTestMask(bitMask: number): void;
1260
+
1136
1261
  /**
1137
1262
  * Sets the unsigned 8-bit (`byte`) bitflag mask that will be bitwise ANDed with all values as they are written to the Stencil Buffer
1138
1263
  *
@@ -1146,6 +1271,7 @@ interface RenderLib {
1146
1271
  * @source https://wiki.facepunch.com/gmod/render.SetStencilWriteMask
1147
1272
  */
1148
1273
  SetStencilWriteMask(bitMask: number): void;
1274
+
1149
1275
  /**
1150
1276
  * Sets the [Stencil Operation](https://wiki.facepunch.com/gmod/Enums/STENCILOPERATION) that will be performed on the Stencil Buffer values of pixels affected by draw operations if the [Compare Function](https://wiki.facepunch.com/gmod/render.SetStencilCompareFunction) Passed a given pixel, but it did **not** Pass the Depth Test.
1151
1277
  *
@@ -1155,12 +1281,14 @@ interface RenderLib {
1155
1281
  * @source https://wiki.facepunch.com/gmod/render.SetStencilZFailOperation
1156
1282
  */
1157
1283
  SetStencilZFailOperation(zFailOperation: STENCILOPERATION): void;
1284
+
1158
1285
  /**
1159
1286
  * Sets the tone mapping scale for upcoming rendering operations.
1160
1287
  * @realm client
1161
1288
  * @source https://wiki.facepunch.com/gmod/render.SetToneMappingScaleLinear
1162
1289
  */
1163
1290
  SetToneMappingScaleLinear(scales: Vector): void;
1291
+
1164
1292
  /**
1165
1293
  * Changes the view port position and size. The values will be clamped to the game's screen resolution.
1166
1294
  *
@@ -1173,12 +1301,14 @@ interface RenderLib {
1173
1301
  * @source https://wiki.facepunch.com/gmod/render.SetViewPort
1174
1302
  */
1175
1303
  SetViewPort(x: number, y: number, w: number, h: number): void;
1304
+
1176
1305
  /**
1177
1306
  * Sets the internal parameter **INT_RENDERPARM_WRITE_DEPTH_TO_DESTALPHA**.
1178
1307
  * @realm client
1179
1308
  * @source https://wiki.facepunch.com/gmod/render.SetWriteDepthToDestAlpha
1180
1309
  */
1181
1310
  SetWriteDepthToDestAlpha(enable: boolean): void;
1311
+
1182
1312
  /**
1183
1313
  * Swaps the frame buffers/cycles the frame. In other words, this updates the screen.
1184
1314
  *
@@ -1188,6 +1318,7 @@ interface RenderLib {
1188
1318
  * @source https://wiki.facepunch.com/gmod/render.Spin
1189
1319
  */
1190
1320
  Spin(): void;
1321
+
1191
1322
  /**
1192
1323
  * Begin drawing a multi-segment Beam.
1193
1324
  *
@@ -1198,30 +1329,35 @@ interface RenderLib {
1198
1329
  * @source https://wiki.facepunch.com/gmod/render.StartBeam
1199
1330
  */
1200
1331
  StartBeam(segmentCount: number): void;
1332
+
1201
1333
  /**
1202
1334
  * Returns whether the player's hardware supports HDR. (High Dynamic Range) HDR can still be disabled by the `mat_hdr_level` console variable or just not be supported by the map.
1203
1335
  * @realm client and menu
1204
1336
  * @source https://wiki.facepunch.com/gmod/render.SupportsHDR
1205
1337
  */
1206
1338
  SupportsHDR(): boolean;
1339
+
1207
1340
  /**
1208
1341
  * Returns if the current settings and the system allow the usage of pixel shaders 1.4.
1209
1342
  * @realm client and menu
1210
1343
  * @source https://wiki.facepunch.com/gmod/render.SupportsPixelShaders_1_4
1211
1344
  */
1212
1345
  SupportsPixelShaders_1_4(): boolean;
1346
+
1213
1347
  /**
1214
1348
  * Returns if the current settings and the system allow the usage of pixel shaders 2.0.
1215
1349
  * @realm client and menu
1216
1350
  * @source https://wiki.facepunch.com/gmod/render.SupportsPixelShaders_2_0
1217
1351
  */
1218
1352
  SupportsPixelShaders_2_0(): boolean;
1353
+
1219
1354
  /**
1220
1355
  * Returns if the current settings and the system allow the usage of vertex shaders 2.0.
1221
1356
  * @realm client and menu
1222
1357
  * @source https://wiki.facepunch.com/gmod/render.SupportsVertexShaders_2_0
1223
1358
  */
1224
1359
  SupportsVertexShaders_2_0(): boolean;
1360
+
1225
1361
  /**
1226
1362
  * Suppresses or enables any engine lighting for any upcoming render operation.
1227
1363
  *
@@ -1231,12 +1367,14 @@ interface RenderLib {
1231
1367
  * @source https://wiki.facepunch.com/gmod/render.SuppressEngineLighting
1232
1368
  */
1233
1369
  SuppressEngineLighting(suppressLighting: boolean): void;
1370
+
1234
1371
  /**
1235
1372
  * Enables HDR tone mapping which influences the brightness.
1236
1373
  * @realm client
1237
1374
  * @source https://wiki.facepunch.com/gmod/render.TurnOnToneMapping
1238
1375
  */
1239
1376
  TurnOnToneMapping(): void;
1377
+
1240
1378
  /**
1241
1379
  * Updates the texture returned by [render.GetFullScreenDepthTexture](https://wiki.facepunch.com/gmod/render.GetFullScreenDepthTexture).
1242
1380
  *
@@ -1246,24 +1384,28 @@ interface RenderLib {
1246
1384
  * @source https://wiki.facepunch.com/gmod/render.UpdateFullScreenDepthTexture
1247
1385
  */
1248
1386
  UpdateFullScreenDepthTexture(): void;
1387
+
1249
1388
  /**
1250
1389
  * Updates the power of two texture.
1251
1390
  * @realm client
1252
1391
  * @source https://wiki.facepunch.com/gmod/render.UpdatePowerOfTwoTexture
1253
1392
  */
1254
1393
  UpdatePowerOfTwoTexture(): ITexture;
1394
+
1255
1395
  /**
1256
1396
  * Pretty much alias of [render.UpdatePowerOfTwoTexture](https://wiki.facepunch.com/gmod/render.UpdatePowerOfTwoTexture) but does not return the texture.
1257
1397
  * @realm client
1258
1398
  * @source https://wiki.facepunch.com/gmod/render.UpdateRefractTexture
1259
1399
  */
1260
1400
  UpdateRefractTexture(): void;
1401
+
1261
1402
  /**
1262
1403
  * Copies the entire screen to the screen effect texture, which can be acquired via [render.GetScreenEffectTexture](https://wiki.facepunch.com/gmod/render.GetScreenEffectTexture). This function is mainly intended to be used in [GM:RenderScreenspaceEffects](https://wiki.facepunch.com/gmod/GM:RenderScreenspaceEffects).
1263
1404
  * @realm client
1264
1405
  * @source https://wiki.facepunch.com/gmod/render.UpdateScreenEffectTexture
1265
1406
  */
1266
1407
  UpdateScreenEffectTexture(textureIndex?: number): void;
1408
+
1267
1409
  /**
1268
1410
  * This function overrides all map materials for one frame.
1269
1411
  * @realm client
@@ -1271,146 +1413,3 @@ interface RenderLib {
1271
1413
  */
1272
1414
  WorldMaterialOverride(mat?: IMaterial): void;
1273
1415
  }
1274
-
1275
-
1276
-
1277
-
1278
-
1279
-
1280
-
1281
-
1282
-
1283
-
1284
-
1285
-
1286
-
1287
-
1288
-
1289
-
1290
-
1291
-
1292
-
1293
-
1294
-
1295
-
1296
-
1297
-
1298
-
1299
-
1300
-
1301
-
1302
-
1303
-
1304
-
1305
-
1306
-
1307
-
1308
-
1309
-
1310
-
1311
-
1312
-
1313
-
1314
-
1315
-
1316
-
1317
-
1318
-
1319
-
1320
-
1321
-
1322
-
1323
-
1324
-
1325
-
1326
-
1327
-
1328
-
1329
-
1330
-
1331
-
1332
-
1333
-
1334
-
1335
-
1336
-
1337
-
1338
-
1339
-
1340
-
1341
-
1342
-
1343
-
1344
-
1345
-
1346
-
1347
-
1348
-
1349
-
1350
-
1351
-
1352
-
1353
-
1354
-
1355
-
1356
-
1357
-
1358
-
1359
-
1360
-
1361
-
1362
-
1363
-
1364
-
1365
-
1366
-
1367
-
1368
-
1369
-
1370
-
1371
-
1372
-
1373
-
1374
-
1375
-
1376
-
1377
-
1378
-
1379
-
1380
-
1381
-
1382
-
1383
-
1384
-
1385
-
1386
-
1387
-
1388
-
1389
-
1390
-
1391
-
1392
-
1393
-
1394
-
1395
-
1396
-
1397
-
1398
-
1399
-
1400
-
1401
-
1402
-
1403
-
1404
-
1405
-
1406
-
1407
-
1408
-
1409
-
1410
-
1411
-
1412
-
1413
-
1414
-
1415
-
1416
-