Commit 9e087c6d authored by hybrid's avatar hybrid

Introduce OpenGL 3 context creation, still using legacy profiles only.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2562 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 2d9b118e
......@@ -194,6 +194,7 @@ bool COpenGLDriver::initDriver(irr::SIrrlichtCreationParameters params)
return false;
}
#ifdef WGL_ARB_pixel_format
PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormat_ARB = (PFNWGLCHOOSEPIXELFORMATARBPROC)wglGetProcAddress("wglChoosePixelFormatARB");
if (wglChoosePixelFormat_ARB)
{
......@@ -242,6 +243,7 @@ bool COpenGLDriver::initDriver(irr::SIrrlichtCreationParameters params)
}
}
else
#endif
AntiAlias=0;
wglMakeCurrent(HDc, NULL);
......@@ -308,7 +310,14 @@ bool COpenGLDriver::initDriver(irr::SIrrlichtCreationParameters params)
}
// create rendering context
#ifdef WGL_ARB_create_context
PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribs_ARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC)wglGetProcAddress("wglCreateContextAttribsARB");
if (wglCreateContextAttribs_ARB)
HRc=wglCreateContextAttribs_ARB(HDc, 0, NULL);
else
#endif
HRc=wglCreateContext(HDc);
if (!HRc)
{
os::Printer::log("Cannot create a GL rendering context.", ELL_ERROR);
......@@ -515,10 +524,6 @@ bool COpenGLDriver::genericDriverInit(const core::dimension2d<u32>& screenSize,
// Reset The Current Viewport
glViewport(0, 0, screenSize.Width, screenSize.Height);
// This needs an SMaterial flag to enable/disable later on, but should become default sometimes
// glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
// glEnable(GL_COLOR_MATERIAL);
setAmbientLight(SColorf(0.0f,0.0f,0.0f,0.0f));
#ifdef GL_EXT_separate_specular_color
if (FeatureAvailable[IRR_EXT_separate_specular_color])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment