preparation to replace glew by glad

This commit is contained in:
Erwin Coumans
2018-02-20 19:44:02 -08:00
parent 8bb40b632b
commit b0984de046
21 changed files with 151 additions and 41375 deletions

View File

@@ -170,17 +170,19 @@ void dumpInfo(void)
if (m_resizeCallback)
{
(*m_resizeCallback)(width,height);
}
#ifndef NO_OPENGL3
NSRect backingBounds = [self convertRectToBacking:[self bounds]];
GLsizei backingPixelWidth = (GLsizei)(backingBounds.size.width),
backingPixelHeight = (GLsizei)(backingBounds.size.height);
// Set viewport
glViewport(0, 0, backingPixelWidth, backingPixelHeight);
#else
glViewport(0,0,(GLsizei)width,(GLsizei)height);
#ifndef NO_OPENGL3
NSRect backingBounds = [self convertRectToBacking:[self bounds]];
GLsizei backingPixelWidth = (GLsizei)(backingBounds.size.width),
backingPixelHeight = (GLsizei)(backingBounds.size.height);
// Set viewport
glViewport(0, 0, backingPixelWidth, backingPixelHeight);
#else
glViewport(0,0,(GLsizei)width,(GLsizei)height);
#endif
}
}
[m_context setView: self];
@@ -236,7 +238,7 @@ void dumpInfo(void)
[fmt release];
[m_context makeCurrentContext];
checkError("makeCurrentContext");
//checkError("makeCurrentContext");
}
-(void) MakeCurrent
@@ -420,7 +422,7 @@ int Mac_createWindow(struct MacOpenGLWindowInternalData* m_internalData,struct M
// float newBackingScaleFactor = [m_internalData->m_window backingScaleFactor];
dumpInfo();
//dumpInfo();