mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 09:08:22 -05:00
GL 3.2 context.
This commit is contained in:
parent
32c82db697
commit
0d21a23ba7
3 changed files with 4 additions and 3 deletions
|
@ -264,7 +264,7 @@ namespace bgfx
|
||||||
uint8_t* rgba = mem->data;
|
uint8_t* rgba = mem->data;
|
||||||
charsetFillTexture(vga8x8, rgba, 8, pitch, bpp);
|
charsetFillTexture(vga8x8, rgba, 8, pitch, bpp);
|
||||||
charsetFillTexture(vga8x16, &rgba[8*pitch], 16, 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_MIN_POINT
|
||||||
| BGFX_TEXTURE_MAG_POINT
|
| BGFX_TEXTURE_MAG_POINT
|
||||||
| BGFX_TEXTURE_MIP_POINT
|
| BGFX_TEXTURE_MIP_POINT
|
||||||
|
|
|
@ -207,7 +207,7 @@ namespace bgfx
|
||||||
#else
|
#else
|
||||||
WGL_CONTEXT_MAJOR_VERSION_ARB, 3,
|
WGL_CONTEXT_MAJOR_VERSION_ARB, 3,
|
||||||
WGL_CONTEXT_MINOR_VERSION_ARB, 2,
|
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
|
#endif // 1
|
||||||
#if BGFX_CONFIG_DEBUG
|
#if BGFX_CONFIG_DEBUG
|
||||||
WGL_CONTEXT_FLAGS_ARB, WGL_CONTEXT_DEBUG_BIT_ARB,
|
WGL_CONTEXT_FLAGS_ARB, WGL_CONTEXT_DEBUG_BIT_ARB,
|
||||||
|
@ -216,6 +216,7 @@ namespace bgfx
|
||||||
};
|
};
|
||||||
|
|
||||||
m_context = wglCreateContextAttribsARB(m_hdc, 0, contextAttrs);
|
m_context = wglCreateContextAttribsARB(m_hdc, 0, contextAttrs);
|
||||||
|
BGFX_FATAL(NULL != m_context, Fatal::UnableToInitialize, "Failed to create context.");
|
||||||
}
|
}
|
||||||
|
|
||||||
wglMakeCurrent(NULL, NULL);
|
wglMakeCurrent(NULL, NULL);
|
||||||
|
|
|
@ -1946,7 +1946,7 @@ namespace bgfx
|
||||||
#endif // BGFX_CONFIG_DEBUG
|
#endif // BGFX_CONFIG_DEBUG
|
||||||
|
|
||||||
const char* extensions = (const char*)glGetString(GL_EXTENSIONS);
|
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)
|
if (NULL != extensions)
|
||||||
{
|
{
|
||||||
char name[1024];
|
char name[1024];
|
||||||
|
|
Loading…
Reference in a new issue