Added support for OpenGL debug mode
When NzContextParameters.debugMode is true, Nazara will receive OpenGL's debug message and send them to Nazara's log NzString::Pointer now have the "0x" prefix Added support for ARB_texture_storage extension Nazara now try to load core texture 3D before trying to load EXT_texture3D Added NazaraNotice macro, writing raw text into Nazara's log Added NzContext::Destroy (called in Create)
This commit is contained in:
@@ -153,6 +153,8 @@ bool NzContextImpl::Create(NzContextParameters& parameters)
|
||||
*attrib++ = WGL_CONTEXT_MINOR_VERSION_ARB;
|
||||
*attrib++ = parameters.minorVersion;
|
||||
|
||||
int flags = 0;
|
||||
|
||||
if (parameters.majorVersion >= 3)
|
||||
{
|
||||
*attrib++ = WGL_CONTEXT_PROFILE_MASK_ARB;
|
||||
@@ -162,11 +164,19 @@ bool NzContextImpl::Create(NzContextParameters& parameters)
|
||||
{
|
||||
*attrib++ = WGL_CONTEXT_CORE_PROFILE_BIT_ARB;
|
||||
|
||||
*attrib++ = WGL_CONTEXT_FLAGS_ARB;
|
||||
*attrib++ = WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
|
||||
flags |= WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
|
||||
}
|
||||
}
|
||||
|
||||
if (parameters.debugMode)
|
||||
flags |= WGL_CONTEXT_DEBUG_BIT_ARB;
|
||||
|
||||
if (flags)
|
||||
{
|
||||
*attrib++ = WGL_CONTEXT_FLAGS_ARB;
|
||||
*attrib++ = flags;
|
||||
}
|
||||
|
||||
*attrib++ = 0;
|
||||
|
||||
m_context = wglCreateContextAttribs(m_deviceContext, shareContext, attributes);
|
||||
|
||||
Reference in New Issue
Block a user