diff options
| author | Thales Lima <thaleslima.ufu@gmail.com> | 2017-10-25 19:17:00 -0200 |
|---|---|---|
| committer | Thales Lima <thaleslima.ufu@gmail.com> | 2017-10-25 19:17:00 -0200 |
| commit | 7043bf93567689f3b1304cc998c1fb09b7e0e357 (patch) | |
| tree | 4d6ca5dd407d0f729e7413ddd62d26b25beabfca /Project/OpenGLText.cpp | |
| parent | c53fc819fe6dfe15dc3083b71e0161a68c8b32b5 (diff) | |
| download | PSP.git-7043bf93567689f3b1304cc998c1fb09b7e0e357.tar.gz PSP.git-7043bf93567689f3b1304cc998c1fb09b7e0e357.tar.xz PSP.git-7043bf93567689f3b1304cc998c1fb09b7e0e357.zip | |
Fixed textures bug on linux
Diffstat (limited to 'Project/OpenGLText.cpp')
| -rw-r--r-- | Project/OpenGLText.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Project/OpenGLText.cpp b/Project/OpenGLText.cpp index ebbc763..e71578a 100644 --- a/Project/OpenGLText.cpp +++ b/Project/OpenGLText.cpp @@ -16,6 +16,7 @@ */ #include "OpenGLText.h" +#include <wx/log.h> OpenGLText::OpenGLText() { Init(); } OpenGLText::OpenGLText(wxString text) @@ -27,7 +28,7 @@ OpenGLText::OpenGLText(wxString text) OpenGLText::~OpenGLText() { if(m_textureID) { - glDeleteTextures(1, m_textureID); + glDeleteTextures(1, &m_textureID[0]); } } @@ -108,7 +109,7 @@ void OpenGLText::TextToBitmap() void OpenGLText::LoadTextTexture() { - if(m_textureID) glDeleteTextures(1, m_textureID); + if(m_textureID) glDeleteTextures(1, &m_textureID[0]); m_textureID = new GLuint[1]; glGenTextures(1, &m_textureID[0]); @@ -156,3 +157,11 @@ OpenGLText* OpenGLText::GetCopy() copy->SetText(copy->m_text); return copy; } + +bool OpenGLText::IsTextureOK() +{ + if(m_textureID) { + if(glIsTexture(m_textureID[0]) == GL_TRUE) return true; + } + return false; +} |
