Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

[LinuxRendererGLES] - Don't let RENDER_BYPASS clear out the whole screen #1920

Merged
merged 1 commit into from

4 participants

@mikrohard

Currently RENDER_BYPASS clears out the whole screen which results in an ugly view when video isn't in fullscreen (e.g. pvr window in confluence).

This commit uses the glScissor function to clear out the video rect only.

Example before: https://dl.dropbox.com/u/8261657/bypass_before.png
Example after: https://dl.dropbox.com/u/8261657/bypass_after.png

Tested on linux (pivos buildroot) and android (amlplayer) with different resolutions.

These are my first lines of code in OpenGL... there can be very well a better solution for this. But I didn't see any problems (not with performance or anything else).

@huceke
Collaborator

I'll also test it in the RaspberryPI.

@Memphiz
Owner

nice - @davilla - thats what i ment some days ago :D

@davilla
Collaborator

nice

@huceke
Collaborator

You should iWidth and iHeight otherwise it doesn't work with clamped gui rendering.

@mikrohard

Ok... will fix right away...

@huceke
Collaborator

Looks ok from my side. @davilla @theuni would be nice for frodo ;)

@davilla davilla merged commit d72b23b into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 11, 2012
  1. @mikrohard

    [LinuxRendererGLES] - Don't let RENDER_BYPASS clear out the whole scr…

    mikrohard authored Jernej committed
    …een (use video rect instead)
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 0 deletions.
  1. +9 −0 xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
View
9 xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
@@ -415,12 +415,21 @@ void CLinuxRendererGLES::RenderUpdate(bool clear, DWORD flags, DWORD alpha)
if (m_RenderUpdateCallBackFn)
(*m_RenderUpdateCallBackFn)(m_RenderUpdateCallBackCtx, m_sourceRect, m_destRect);
+ RESOLUTION res = GetResolution();
+ int iWidth = g_settings.m_ResInfo[res].iWidth;
+ int iHeight = g_settings.m_ResInfo[res].iHeight;
+
g_graphicsContext.BeginPaint();
+ glScissor(m_destRect.x1,
+ iHeight - m_destRect.y2,
+ m_destRect.x2 - m_destRect.x1,
+ m_destRect.y2 - m_destRect.y1);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glClearColor(0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT);
+ glScissor(0, 0, iWidth, iHeight);
g_graphicsContext.EndPaint();
return;
Something went wrong with that request. Please try again.