• Draw/Surface Library Question
    2 replies, posted
Why do we have both? Draw library description: [quote=http://wiki.garrysmod.com/?title=Draw]"draw" is a library of functions used to draw HUD objects on the client's screen.[/quote] Surface library description: [quote=http://wiki.garrysmod.com/?title=Surface]"surface" is a library of functions used to draw HUD objects on the client's screen.[/quote] So why not have them just be one library? Is draw using the surface library?
surface is an interface to the raw Source drawing library, draw is something Garry wrote (in Lua using surface) to automate certain tasks and make them easier. They are separate modules because it's far easier to make a new module than to bolt things on to another, and less messy. [[url=http://luabin.foszor.com/code/lua/includes/modules/draw.lua]Source for draw[/url]]
[QUOTE=Lexic;19288734]surface is an interface to the raw Source drawing library, draw is something Garry wrote (in Lua using surface) to automate certain tasks and make them easier. They are separate modules because it's far easier to make a new module than to bolt things on to another, and less messy. [[url=http://luabin.foszor.com/code/lua/includes/modules/draw.lua]Source for draw[/url]][/QUOTE] Yeah, I was just thinking that because it finally occurred to me that draw uses arguments and surface is just a bunch of sequenced commands. I'm having a Lua off-day. :xd:
Sorry, you need to Log In to post a reply to this thread.