mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-29 01:12:45 +00:00
Moves default GL state setup to GL device.
This was SVN commit r26187.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user