Skip to content
This repository has been archived by the owner on Dec 24, 2024. It is now read-only.

Commit

Permalink
FIX: [64bits] int <-> void* conversion in fontTTF
Browse files Browse the repository at this point in the history
  • Loading branch information
koying committed Apr 7, 2016
1 parent 2ee00a8 commit 103e72d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions xbmc/guilib/GUIFontCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@ struct CGUIFontCacheDynamicPosition

struct CVertexBuffer
{
void *bufferHandle;
int bufferHandle;
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() : bufferHandle(0), size(0), m_font(NULL) {}
CVertexBuffer(int bufferHandle, size_t size, const CGUIFontTTFBase *font) : bufferHandle(bufferHandle), size(size), m_font(font) {}

This comment has been minimized.

Copy link
@fritsch

fritsch Apr 12, 2016

Contributor

uintptr_t?

This comment has been minimized.

Copy link
@koying

koying Apr 13, 2016

Author Owner

Actually trickier than that.
DX wants an actual pointer, while GL wants a GLuint to do a glBindBuffer :(

This comment has been minimized.

Copy link
@koying

koying Apr 13, 2016

Author Owner

7105864 will do (after revert) ;)

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
Expand Down
2 changes: 1 addition & 1 deletion xbmc/guilib/GUIFontTTFGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 103e72d

Please sign in to comment.