More formatting...

This commit is contained in:
wayo 2013-04-01 20:21:25 -06:00 committed by espes
parent b7a51d7d2d
commit 320cbc8b56
3 changed files with 16 additions and 11 deletions

View File

@ -1501,19 +1501,24 @@ static void pgraph_context_init(GraphicsContext *context)
const GLubyte *extensions;
extensions = glGetString (GL_EXTENSIONS);
assert(glo_check_extension(const GLubyte *)"GL_EXT_texture_compression_s3tc",
assert(glo_check_extension((const GLubyte *)
"GL_EXT_texture_compression_s3tc",
extensions));
assert(glo_check_extension(const GLubyte *)"GL_EXT_framebuffer_object",
assert(glo_check_extension((const GLubyte *)
"GL_EXT_framebuffer_object",
extensions));
assert(glo_check_extension(const GLubyte *)"GL_ARB_vertex_program",
assert(glo_check_extension((const GLubyte *)
"GL_ARB_vertex_program",
extensions));
assert(glo_check_extension(const GLubyte *)"GL_ARB_fragment_program",
assert(glo_check_extension((const GLubyte *)
"GL_ARB_fragment_program",
extensions));
assert(glo_check_extension(const GLubyte *)"GL_ARB_texture_rectangle",
assert(glo_check_extension((const GLubyte *)
"GL_ARB_texture_rectangle",
extensions));
GLint max_vertex_attributes;

View File

@ -82,10 +82,10 @@ GloContext *glo_context_create(int formatFlags)
{
GloContext *context;
context = (GloContext*)malloc(sizeof(GloContext));
context = (GloContext *)malloc(sizeof(GloContext));
memset(context, 0, sizeof(GloContext));
// pixel format attributes
/* pixel format attributes */
CGLPixelFormatAttribute attributes[] = {
kCGLPFAAccelerated,
(CGLPixelFormatAttribute)0
@ -106,7 +106,7 @@ GloContext *glo_context_create(int formatFlags)
}
/* Check if an extension is available. */
GLboolean glo_check_extension(const GLubyte *extName,
GLboolean glo_check_extension(const GLubyte *extName,
const GLubyte *extString)
{
return gluCheckExtension(extName, extString);
@ -115,7 +115,7 @@ GLboolean glo_check_extension(const GLubyte *extName,
/* Set current context */
void glo_set_current(GloContext *context)
{
if(context == NULL)
if (context == NULL)
CGLSetCurrentContext(NULL);
else
CGLSetCurrentContext(context->cglContext);

View File

@ -281,9 +281,9 @@ void glo_context_destroy(GloContext *context)
}
/* Check extension implementation for Windows.
/* Check extension implementation for Windows.
* The Glu 1.2 framework in Windows doesn't include them... */
GLboolean glo_check_extension(const GLubyte *extName,
GLboolean glo_check_extension(const GLubyte *extName,
const GLubyte *extString)
{
char *p = (char *) glGetString(GL_EXTENSIONS);