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 … 18 Next »
rendertarget issue when drawing text before polys / lines
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linear Mode
rendertarget issue when drawing text before polys / lines
11-06-2021, 04:03 PM,
#2
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: rendertarget issue when drawing text before polys / lines
You need to reset the texture before rendering a polygon. It's trying to use the last set texture which internally will be the texture used for the text rendering.
-- Reset the current texture to the default.
render.setTexture()
for x = 0, 10 do
    for y = 5, 10 do
        render.drawRegPoly(x*102.4 - 51.2, y*102.4 - 51.2, 40, 5, 0)
    end
end

Also as a side note, drawToTexture() doesn't need to be in a render hook. It's an asynchronous operation that renders separately (hence the function argument).
Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
rendertarget issue when drawing text before polys / lines - by The17thDoctor - 11-06-2021, 10:30 AM
RE: rendertarget issue when drawing text before polys / lines - by Person8880 - 11-06-2021, 04:03 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.