mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-26 05:23:26 -04:00
GL context init fixes and warning cleanup
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user