Author Topic: Clipping  (Read 3617 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: 4055
  • 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.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3187
    • 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.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

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: 4936
  • 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 1700 @3.9Ghz, 16GB HyperX Fury 2600Mhz Ram, HIS 7970 GHz Edition @3GB, Windows 10 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 »