GLContext: Remove bpp parameter from create()
Hardcode to 32 bits for now.
This commit is contained in:
parent
8675018522
commit
2da2601149
4 changed files with 11 additions and 11 deletions
|
|
@ -36,7 +36,7 @@ Win32GLContext::~Win32GLContext()
|
|||
destroy();
|
||||
}
|
||||
|
||||
bool Win32GLContext::create(const PlatformDisplay* display, unsigned int bpp)
|
||||
bool Win32GLContext::create(const PlatformDisplay* display)
|
||||
{
|
||||
// If created. destroy old handles.
|
||||
destroy();
|
||||
|
|
@ -51,7 +51,7 @@ bool Win32GLContext::create(const PlatformDisplay* display, unsigned int bpp)
|
|||
|
||||
m_deviceContext = ::GetDC(m_wnd);
|
||||
|
||||
createGLContext(bpp);
|
||||
createGLContext();
|
||||
|
||||
if (!m_deviceContext || !m_renderContext) {
|
||||
|
||||
|
|
@ -78,10 +78,10 @@ void Win32GLContext::destroy()
|
|||
}
|
||||
}
|
||||
|
||||
void Win32GLContext::createGLContext(unsigned int bpp)
|
||||
void Win32GLContext::createGLContext()
|
||||
{
|
||||
// First set pixel format.
|
||||
if (!setPixelFormat(bpp)) {
|
||||
if (!setPixelFormat()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -132,7 +132,7 @@ void Win32GLContext::swapBuffers()
|
|||
}
|
||||
}
|
||||
|
||||
bool Win32GLContext::setPixelFormat(unsigned int bpp)
|
||||
bool Win32GLContext::setPixelFormat()
|
||||
{
|
||||
PIXELFORMATDESCRIPTOR pfd;
|
||||
int format;
|
||||
|
|
@ -144,7 +144,7 @@ bool Win32GLContext::setPixelFormat(unsigned int bpp)
|
|||
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL |
|
||||
PFD_DOUBLEBUFFER;
|
||||
pfd.iPixelType = PFD_TYPE_RGBA;
|
||||
pfd.cColorBits = bpp;
|
||||
pfd.cColorBits = 32;
|
||||
pfd.cDepthBits = 16;
|
||||
pfd.iLayerType = PFD_MAIN_PLANE;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue