In the SGL library there is a function defined
------------
void slWindow(left, top, right, bottom, Zlimit, ctx, cty)
------------
Which allows you to set the clipping area, and determine the screen origin (centerx, centery) of all 3D objects drawn.
Questions.
1. In all SGL demos, there is terrible clipping on all polygons that approach the edge of the screen. If a polygon's vertex goes off the screen, then the SGL will interpolate the coordinates until they are onscreen. The only problem is that this technically alters both the polygon and the distortion, resulting in some horrible texture warp. How can you turn this clipping off? SGL provides functions to set the Z-clip distance and user window clipping, but not to disable it. Whereas the VDP1 does have instructions to disable clipping. Is there an SGL function I'm missing--I haven't gone through the whole Reference, but I have searched it for "clip", "center", and "screen", found nothing like what I was looking for. I don't want to disable all clipping (if a polygon is completely off screen, fine, don't draw it) but I do want to disable the pre-clipping that the SGL tells VDP1 to do. And I know this can be done, but I'm not quite sure how...
Z-clipping is not an issue because that's good stuff. I only want to alter clipping to the projection surface so that only polygons fully beyond the surface rectangle are clipped. SGL Manual Tutorials discuss setting the clipping area with slWindow on pages 78-83 but don't mention how to alter clipping behavior.
2. The User window clipping can only be set twice each frame. This is not an SGL limitation but apparently a VDP1 one (I just figured this stuff out). Thus, slWindow() can only be called twice each frame, and all other calls will fail. But. VDP1 Docs make a clear distinction between changing the User clipping window (VDP1 Manual pg113) and changing the local coordinates of the screen's centerx, centery (pg 117). Thus you can change Local coordinates more than twice during draw. But. There is no SGL command to do this other than slWindow(). ...Is it possible that I could create my own function to post a command to VDP1 that would change this?
So, in a nutshell, if SGL can't help me set this stuff up right, how difficult will it be to manually send the VDP1 a command to do so?
------------
void slWindow(left, top, right, bottom, Zlimit, ctx, cty)
------------
Which allows you to set the clipping area, and determine the screen origin (centerx, centery) of all 3D objects drawn.
Questions.
1. In all SGL demos, there is terrible clipping on all polygons that approach the edge of the screen. If a polygon's vertex goes off the screen, then the SGL will interpolate the coordinates until they are onscreen. The only problem is that this technically alters both the polygon and the distortion, resulting in some horrible texture warp. How can you turn this clipping off? SGL provides functions to set the Z-clip distance and user window clipping, but not to disable it. Whereas the VDP1 does have instructions to disable clipping. Is there an SGL function I'm missing--I haven't gone through the whole Reference, but I have searched it for "clip", "center", and "screen", found nothing like what I was looking for. I don't want to disable all clipping (if a polygon is completely off screen, fine, don't draw it) but I do want to disable the pre-clipping that the SGL tells VDP1 to do. And I know this can be done, but I'm not quite sure how...
Z-clipping is not an issue because that's good stuff. I only want to alter clipping to the projection surface so that only polygons fully beyond the surface rectangle are clipped. SGL Manual Tutorials discuss setting the clipping area with slWindow on pages 78-83 but don't mention how to alter clipping behavior.
2. The User window clipping can only be set twice each frame. This is not an SGL limitation but apparently a VDP1 one (I just figured this stuff out). Thus, slWindow() can only be called twice each frame, and all other calls will fail. But. VDP1 Docs make a clear distinction between changing the User clipping window (VDP1 Manual pg113) and changing the local coordinates of the screen's centerx, centery (pg 117). Thus you can change Local coordinates more than twice during draw. But. There is no SGL command to do this other than slWindow(). ...Is it possible that I could create my own function to post a command to VDP1 that would change this?
So, in a nutshell, if SGL can't help me set this stuff up right, how difficult will it be to manually send the VDP1 a command to do so?