diff --git a/src/bgfx.cpp b/src/bgfx.cpp index f8c85e20..8898eaa1 100755 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -264,7 +264,7 @@ namespace bgfx uint8_t* rgba = mem->data; charsetFillTexture(vga8x8, rgba, 8, pitch, bpp); charsetFillTexture(vga8x16, &rgba[8*pitch], 16, pitch, bpp); - m_texture = createTexture2D(2048, 24, 1, TextureFormat::L8 + m_texture = createTexture2D(width, height, 1, TextureFormat::L8 , BGFX_TEXTURE_MIN_POINT | BGFX_TEXTURE_MAG_POINT | BGFX_TEXTURE_MIP_POINT diff --git a/src/glcontext_wgl.cpp b/src/glcontext_wgl.cpp index 7454a5cd..96fc84cf 100644 --- a/src/glcontext_wgl.cpp +++ b/src/glcontext_wgl.cpp @@ -207,7 +207,7 @@ namespace bgfx #else WGL_CONTEXT_MAJOR_VERSION_ARB, 3, WGL_CONTEXT_MINOR_VERSION_ARB, 2, - WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB, + WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB, #endif // 1 #if BGFX_CONFIG_DEBUG WGL_CONTEXT_FLAGS_ARB, WGL_CONTEXT_DEBUG_BIT_ARB, @@ -216,6 +216,7 @@ namespace bgfx }; m_context = wglCreateContextAttribsARB(m_hdc, 0, contextAttrs); + BGFX_FATAL(NULL != m_context, Fatal::UnableToInitialize, "Failed to create context."); } wglMakeCurrent(NULL, NULL); diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index 96b08538..645de1ff 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -1946,7 +1946,7 @@ namespace bgfx #endif // BGFX_CONFIG_DEBUG const char* extensions = (const char*)glGetString(GL_EXTENSIONS); - GL_CHECK(;); // check if error is generated by glGetString. + glGetError(); // ignore error if glGetString returns NULL. if (NULL != extensions) { char name[1024];