We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3363 - Renderer viewport doesn't clip when opengles renderer uses glDrawTexfOES
Summary: Renderer viewport doesn't clip when opengles renderer uses glDrawTexfOES
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: render (show other bugs)
Version: HG 2.0
Hardware: All All
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-17 14:56 UTC by Simon Hug
Modified: 2016-10-01 17:47 UTC (History)
0 users

See Also:


Attachments
Test case for viewport clipping with the opengles renderer. (3.71 KB, text/x-csrc)
2016-06-17 14:56 UTC, Simon Hug
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Hug 2016-06-17 14:56:35 UTC
Created attachment 2498 [details]
Test case for viewport clipping with the opengles renderer.

The description of the renderer viewport implies that everything outside the viewport rectangle gets clipped and all renderers implement it that way. There's an exception with the opengles renderer when it uses glDrawTexfOES. This operation does not use the vertex stage of the OpenGL pipeline where the vertices would get clipped to the view frustum and directly produces fragments.

Textures that overlap the viewport rectangle and get drawn with glDrawTexfOES do not get properly clipped.

Attached is a test case that shows this issue. The viewport is marked with a white rectangle and the overlapping textures with a yellow rectangle.
Comment 1 Simon Hug 2016-06-23 13:30:22 UTC
Mentioning bug 3373. It's not directly related, but be aware that the Raspberry Pi may do something unexpected with glDrawTexfOES.
Comment 2 Sam Lantinga 2016-10-01 17:47:25 UTC
I opted to remove that code path. Thanks!
https://hg.libsdl.org/SDL/rev/8e4a030053c2