![]() |
|
No functions like render.SetScissorRect? - Printable Version +- Team Spartan Cookies & Milk Forums (https://teamscm.co.uk) +-- Forum: Garry's Mod (https://teamscm.co.uk/forum-4.html) +--- Forum: Starfall (https://teamscm.co.uk/forum-7.html) +--- Thread: No functions like render.SetScissorRect? (/thread-2418.html) |
No functions like render.SetScissorRect? - Skeleton - 16-08-2017 Hello. I've been through the library functions and I can't find functions like render.SetScissorRect even if I can use stencil this function is very useful. I may have missed it even if I looked two times but could it be implemented? Thank you for reading this small thread. RE: No functions like render.SetScissorRect? - Kosmos - 16-08-2017 Person has recently fixed the stencil methods, you can easily use them. Code: render.startStencil() -- begin creating the stencil mask
render.drawRect(0, 0, 256, 256) -- set the scissor rect (this is the top left corner of a lowres screen)
render.drawStencil() -- begin using the stencil while rendering normally
-- DRAW STUFF HERE
render.endStencil() -- stops using the stencil bufferI strongly suggest using those instead, they are much more powerful. You can limit rendering to any arbitrary shape, perfect for a UI. RE: No functions like render.SetScissorRect? - Skeleton - 16-08-2017 Ah, I see, thank you alot @Kosmos. I thought stencils would be complicated as gmod ones but this looks similar to the function I was looking for and seems much easier than what I thought. Again thank you. RE: No functions like render.SetScissorRect? - Skeleton - 17-08-2017 Well stencils seems to have some problems/bugs, Kosmos can provide more details. So I'm still requesting this function. |