Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 2 3 4 5 6 … 18 Next »
render.drawBeam() and textures
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linear Mode
render.drawBeam() and textures
22-08-2020, 09:42 PM,
#1
The17thDoctor Offline
TSCM Average Enjoyer
****
Posts: 1,100
Threads: 249
Joined: Oct 2015
render.drawBeam() and textures
When drawing any textured element ( either Wireframe Box or Textured Rect ) the beam takes the last registered texture. But if nothing is drawn and we just use render.setTexture(),
the beam isnt affected at all.
Perhaps could drawBeam() be used alongside setTexture() without having to do some hacky rectangle drawing ?

Example of code :
--@name
--@author

Keeper_Beam = render.getTextureID("tscm/beam_keeper2.png")

hook("render", "draw it nao", function()
local plys = find.allPlayers()
render.clear()
render.setColor(255,255,255)
render.setTexture(Keeper_Beam)
render.drawTexturedRect(0,0,100,100) --Comment me !

render.start3D()
for i = 1,#plys do
local ply = plys[i]
render.drawBeam(ents.self():pos(), ply:pos(), 2, 1, 0,Color(255,255,255))
end
render.end3D()
end)

The17thDoctor: Server take me to the most handsome person
srcds_linux: I cant send people to themselves...
Website Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
render.drawBeam() and textures - by The17thDoctor - 22-08-2020, 09:42 PM
RE: render.drawBeam() and textures - by Person8880 - 23-08-2020, 10:07 AM
RE: render.drawBeam() and textures - by The17thDoctor - 23-08-2020, 02:20 PM

  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.