summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-tv/kodi/files/kodi-16.1-GUIFontTTFGL-loses-precision.patch')
-rw-r--r--media-tv/kodi/files/kodi-16.1-GUIFontTTFGL-loses-precision.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/media-tv/kodi/files/kodi-16.1-GUIFontTTFGL-loses-precision.patch b/media-tv/kodi/files/kodi-16.1-GUIFontTTFGL-loses-precision.patch
new file mode 100644
index 000000000000..30ed1e06793c
--- /dev/null
+++ b/media-tv/kodi/files/kodi-16.1-GUIFontTTFGL-loses-precision.patch
@@ -0,0 +1,63 @@
+From fa6f5d761b600b0a8b52db18168e540b03f79ceb Mon Sep 17 00:00:00 2001
+From: Memphiz <memphis@machzwo.de>
+Date: Mon, 21 Dec 2015 11:29:23 +0100
+Subject: [PATCH] [GUIFont] - the BufferHandle is a GLUInt for gl and gles and
+ a void * for dx
+
+---
+ xbmc/guilib/GUIFontCache.h | 10 ++++++++--
+ xbmc/guilib/GUIFontTTFGL.cpp | 4 ++--
+ 2 files changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/xbmc/guilib/GUIFontCache.h b/xbmc/guilib/GUIFontCache.h
+index 7cbe91d..ab35919 100644
+--- a/xbmc/guilib/GUIFontCache.h
++++ b/xbmc/guilib/GUIFontCache.h
+@@ -37,6 +37,7 @@
+ #include <cassert>
+
+ #include "TransformMatrix.h"
++#include "system.h"
+
+ #define FONT_CACHE_TIME_LIMIT (1000)
+ #define FONT_CACHE_DIST_LIMIT (0.01f)
+@@ -231,10 +232,15 @@ struct CGUIFontCacheDynamicPosition
+
+ struct CVertexBuffer
+ {
+- void *bufferHandle;
++#if defined(HAS_GL) || defined(HAS_GLES)
++ typedef unsigned int BufferHandleType;
++#elif defined(HAS_DX)
++ typedef void* BufferHandleType;
++#endif
++ BufferHandleType bufferHandle; // this is really a GLuint
+ size_t size;
+ CVertexBuffer() : bufferHandle(NULL), size(0), m_font(NULL) {}
+- CVertexBuffer(void *bufferHandle, size_t size, const CGUIFontTTFBase *font) : bufferHandle(bufferHandle), size(size), m_font(font) {}
++ CVertexBuffer(BufferHandleType bufferHandle, size_t size, const CGUIFontTTFBase *font) : bufferHandle(bufferHandle), size(size), m_font(font) {}
+ CVertexBuffer(const CVertexBuffer &other) : bufferHandle(other.bufferHandle), size(other.size), m_font(other.m_font)
+ {
+ /* In practice, the copy constructor is only called before a vertex buffer
+diff --git a/xbmc/guilib/GUIFontTTFGL.cpp b/xbmc/guilib/GUIFontTTFGL.cpp
+index f2f3a41..c4aaa3b 100644
+--- a/xbmc/guilib/GUIFontTTFGL.cpp
++++ b/xbmc/guilib/GUIFontTTFGL.cpp
+@@ -232,7 +232,7 @@ void CGUIFontTTFGL::LastEnd()
+ glUniformMatrix4fv(modelLoc, 1, GL_FALSE, glMatrixModview.Get());
+
+ // Bind the buffer to the OpenGL context's GL_ARRAY_BUFFER binding point
+- glBindBuffer(GL_ARRAY_BUFFER, (GLuint) m_vertexTrans[i].vertexBuffer->bufferHandle);
++ glBindBuffer(GL_ARRAY_BUFFER, m_vertexTrans[i].vertexBuffer->bufferHandle);
+
+ // Do the actual drawing operation, split into groups of characters no
+ // larger than the pre-determined size of the element array
+@@ -285,7 +285,7 @@ CVertexBuffer CGUIFontTTFGL::CreateVertexBuffer(const std::vector<SVertex> &vert
+ // Unbind GL_ARRAY_BUFFER
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
+
+- return CVertexBuffer((void *) bufferHandle, vertices.size() / 4, this);
++ return CVertexBuffer(bufferHandle, vertices.size() / 4, this);
+ }
+
+ void CGUIFontTTFGL::DestroyVertexBuffer(CVertexBuffer &buffer) const