New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RetroPlayer: Update OpenGL/ES Renderers and use RGB565 #13497
Conversation
All green! @garbear for final review |
@@ -33,6 +41,22 @@ class CRenderSystemBase; | |||
class CWinSystemBase; | |||
class TransformMatrix; | |||
|
|||
enum GL_SHADER_METHOD |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
{ | ||
#if defined(HAS_GL) | ||
CRenderSystemGL *rendering = dynamic_cast<CRenderSystemGL*>(m_rendering); | ||
if (rendering != nullptr) | ||
rendering->EnableShader(SM_TEXTURE); | ||
rendering->EnableShader(ESHADERMETHOD(method)); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
#include "rendering/gles/RenderSystemGLES.h" | ||
#elif defined(TARGET_WINDOWS) | ||
#include "rendering/dx/RenderSystemDX.h" | ||
#endif |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
#include <cstring> | ||
|
||
using namespace KODI; | ||
using namespace RETRO; | ||
|
||
#define BUFFER_OFFSET(i) (static_cast<char*>(NULL) + (i)) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
||
glBindTexture(m_textureTarget, 0); | ||
int stride = GetFrameSize() / m_height; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
||
glBindTexture(m_textureTarget, 0); | ||
int stride = GetFrameSize() / m_height; | ||
uint8_t* src = m_data.data(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
||
glBindTexture(m_textureTarget, renderBuffer->TextureID()); | ||
|
||
GLint filter = (GetRenderSettings().VideoSettings().GetScalingMethod() == VS_SCALINGMETHOD_NEAREST ? GL_NEAREST : GL_LINEAR); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
CRenderBufferOpenGLES *renderBuffer = static_cast<CRenderBufferOpenGLES*>(m_renderBuffer); | ||
struct Svertex | ||
{ | ||
float x,y,z; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
I believe I corrected all the issues |
@@ -21,13 +21,10 @@ | |||
#include "RPRendererOpenGLES.h" | |||
#include "cores/RetroPlayer/rendering/RenderContext.h" | |||
#include "cores/RetroPlayer/rendering/RenderVideoSettings.h" | |||
#include "guilib/GraphicContext.h" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
TEXTURE_RGBA_BLENDCOLOR, | ||
TEXTURE_RGBA_BOB, | ||
TEXTURE_RGBA_BOB_OES, | ||
MAX |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -120,119 +59,3 @@ CRPRendererOpenGL::CRPRendererOpenGL(const CRenderSettings &renderSettings, CRen | |||
// Initialize CRPRendererOpenGLES | |||
m_clearColour = m_context.UseLimitedColor() ? (16.0f / 0xff) : 0.0f; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
if (m_pixelformat == GL_RGBA) | ||
{ | ||
// XOR Swap RGBA -> BGRA | ||
unsigned char* pixels = (unsigned char*)m_data.data(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Dropped the last commit and the GL(ES) Renderer enabling commits. Rebased and pushed. @garbear for final review |
Good to go |
{ | ||
switch (method) | ||
{ | ||
case GL_SHADER_METHOD::DEFAULT: return SM_DEFAULT; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
AFAIK libretro gives us frames in RGB565 format. I have only tested this with snes9x2010 so far.
I have build and runtime tested OpenGL and OpenGLES on X11 and GBM respectively.
I'm not sure if this will break the RPi or windows rendering methods but jenkins will tell us.
In the future I want to make it possible to use the 3 different pixel formats that libretro uses, aka: