summaryrefslogtreecommitdiffstats
path: root/Project/OpenGLText.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Project/OpenGLText.cpp')
-rw-r--r--Project/OpenGLText.cpp13
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;
+}