View Full Version : Aspyhre Sphinx 4.0 Open GL Cliprect Problem

27-01-2014, 10:53 PM
Hi there.

I am currently running in a problem with gamecanvas.cliprect while using the OpenGL provider.

Once i set a cliprect all images disappear. It works as it should when i change it to DirectX. So i took a look into it and found in apshyre.canvas.gl2 :

procedure TGLCanvas.SetViewport(x, y, Width, Height: Integer);
ViewPos: Integer;

ViewPos:= (ViewportRect.Bottom - ViewportRect.Top) - (y + Height);

glScissor(x, Viewpos, Width, Height);
ClippingRect:= Bounds(x, y, Width, Height);

I have to admit i have no idea what this ViewPos is for, but it was the only value that was far away from my cliprect setting so i just tried to change it to y and at first this seemed to work. Cliprect was working as it should, but later i noticed some strange behaviour. With certain cliprect settings images disappear again although they should still be visible. Again, it works as it should with DirectX.

Any idea how i can fix that? Inb4 Thank you.

30-01-2014, 02:25 PM
I worked around the problem by simply not using any cliprects.. a little inconvienient but it will work.