GL context init fixes and warning cleanup

This commit is contained in:
Charles J. Cliffe
2015-01-20 19:13:49 -05:00
parent 3b23813e7b
commit 4dad30e9bd
12 changed files with 33 additions and 20 deletions
+11 -8
View File
@@ -53,14 +53,14 @@ void PrimaryGLContext::CheckGLError() {
PrimaryGLContext::PrimaryGLContext(wxGLCanvas *canvas, wxGLContext *sharedContext) :
wxGLContext(canvas, sharedContext) {
SetCurrent(*canvas);
#ifndef __linux__
// Pre-load fonts
for (int i = 0; i < GLFONT_MAX; i++) {
getFont((GLFontSize) i);
}
CheckGLError();
#endif
//#ifndef __linux__
// SetCurrent(*canvas);
// // Pre-load fonts
// for (int i = 0; i < GLFONT_MAX; i++) {
// getFont((GLFontSize) i);
// }
// CheckGLError();
//#endif
}
GLFont &PrimaryGLContext::getFont(GLFontSize esize) {
@@ -86,6 +86,9 @@ GLFont &PrimaryGLContext::getFont(GLFontSize esize) {
case GLFONT_SIZE48:
fontName = "vera_sans_mono48.fnt";
break;
default:
fontName = "vera_sans_mono12.fnt";
break;
}
fonts[esize].loadFont(fontName);