Author Topic: Clipping  (Read 26529 times)

MrTAToad

  • Guest
Clipping
« on: 2015-Oct-14 »
What would be useful is the ability to select a clipping area, so that anything outside this area isn't displayed.  This is somewhat different to viewports as a clipping area doesn't modify the current origin of graphics.

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4176
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: Clipping
« Reply #1 on: 2015-Oct-14 »
You can do this with POLYVECTOR. OK, it' not as easy as selecting a rect (or other shaped) area, but it's not that much harder.
I came. I saw. I played.

Online spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4083
    • View Profile
    • Space Fractal
Re: Clipping
« Reply #2 on: 2015-Oct-14 »
VIEWPORT cant been used. Yes its does move x/y to its top corner on that VIEWPORT, but you can easy calculcate that.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

MrTAToad

  • Guest
Re: Clipping
« Reply #3 on: 2015-Oct-14 »
Indeed, VIEWPORTS cant always be used as multiple overlapping viewports arent always allowed (OpenGL is very weird about that, although DirectX can be fine with it)

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5117
  • O Rly?
    • View Profile
Re: Clipping
« Reply #4 on: 2015-Oct-14 »
On a Tilemap?

You can draw a 1.000.000 tiles map with a simpl trick:
(btw. Old Code)

http://www.glbasic.com/forum/index.php?topic=966.msg5005#msg5005


simply draw things on the Screen not the outside one!
« Last Edit: 2015-Oct-14 by Schranz0r »
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

MrTAToad

  • Guest
Re: Clipping
« Reply #5 on: 2015-Oct-14 »
No, this is for objects on a pseudo 3d track, where multiple objects can overlay each other (which is why VIEWPORT wouldn't work).

I have been testing VIEWPORT, and another problem has cropped up with it, namely fractional parts (or rather a width or height < 1), mess up the positioning
« Last Edit: 2015-Oct-15 by MrTAToad »