Moves default GL state setup to GL device.
This was SVN commit r26187.
This commit is contained in:
parent
5610c71fc6
commit
9924450d36
@ -382,17 +382,6 @@ bool CRenderer::Open(int width, int height)
|
||||
m_Width = width;
|
||||
m_Height = height;
|
||||
|
||||
// set packing parameters
|
||||
glPixelStorei(GL_PACK_ALIGNMENT,1);
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT,1);
|
||||
|
||||
// setup default state
|
||||
glDepthFunc(GL_LEQUAL);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glCullFace(GL_BACK);
|
||||
glFrontFace(GL_CCW);
|
||||
glEnable(GL_CULL_FACE);
|
||||
|
||||
// Validate the currently selected render path
|
||||
SetRenderPath(g_RenderingOptions.GetRenderPath());
|
||||
|
||||
|
@ -192,6 +192,17 @@ std::unique_ptr<CDevice> CDevice::Create(SDL_Window* window, const bool arb)
|
||||
device->m_DriverInformation = GetDriverInformationImpl();
|
||||
device->m_Extensions = GetExtensionsImpl();
|
||||
|
||||
// Set packing parameters for uploading and downloading data.
|
||||
glPixelStorei(GL_PACK_ALIGNMENT, 1);
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
|
||||
// Setup default state.
|
||||
glDepthFunc(GL_LEQUAL);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glCullFace(GL_BACK);
|
||||
glFrontFace(GL_CCW);
|
||||
glEnable(GL_CULL_FACE);
|
||||
|
||||
return device;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user