opengl add-ons: Style cleanup

This commit is contained in:
Alexander von Gluck IV
2012-01-29 09:59:39 -06:00
parent 40ea55295d
commit 9fabc0f6da
2 changed files with 30 additions and 25 deletions
@@ -1,15 +1,17 @@
/* /*
* Copyright 2006, Haiku. All rights reserved. * Copyright 2006-2012 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#include <stdio.h> #include <stdio.h>
#include <Screen.h> #include <Screen.h>
#include <GLRenderer.h> #include <GLRenderer.h>
extern "C" _EXPORT BGLRenderer *
instanciate_gl_renderer(BGLView *view, ulong options, BGLDispatcher *dispatcher) extern "C" _EXPORT BGLRenderer*
instanciate_gl_renderer(BGLView* view, ulong options, BGLDispatcher* dispatcher)
{ {
if (!view) if (!view)
return NULL; return NULL;
@@ -27,10 +29,11 @@ instanciate_gl_renderer(BGLView *view, ulong options, BGLDispatcher *dispatcher)
return NULL; return NULL;
fprintf(stderr, "Accelerant device info:\n" fprintf(stderr, "Accelerant device info:\n"
" version: %ud\n" " version: %ud\n"
" name: %s\n" " name: %s\n"
" chipset: %s\n" " chipset: %s\n"
" serial#: %s\n", (unsigned int) adi.version, adi.name, adi.chipset, adi.serial_no); " serial#: %s\n",
(unsigned int) adi.version, adi.name, adi.chipset, adi.serial_no);
flush(stderr); flush(stderr);
// Check the view is attached to a screen driven by a NVidia chip: // Check the view is attached to a screen driven by a NVidia chip:
@@ -1,5 +1,5 @@
/* /*
* Copyright 2006, Haiku. All rights reserved. * Copyright 2006-2012 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
@@ -9,15 +9,16 @@
#include <Screen.h> #include <Screen.h>
#include <GLRenderer.h> #include <GLRenderer.h>
extern "C" _EXPORT BGLRenderer *
instanciate_gl_renderer(BGLView *view, ulong options, BGLDispatcher *dispatcher) extern "C" _EXPORT BGLRenderer*
instanciate_gl_renderer(BGLView* view, ulong options, BGLDispatcher* dispatcher)
{ {
if (!view) { if (!view) {
printf("view = NULL!\n"); printf("view = NULL!\n");
return NULL; return NULL;
} }
BWindow *window = view->Window(); BWindow* window = view->Window();
if (!window) { if (!window) {
printf("view's window = NULL!\n"); printf("view's window = NULL!\n");
return NULL; return NULL;
@@ -36,10 +37,11 @@ instanciate_gl_renderer(BGLView *view, ulong options, BGLDispatcher *dispatcher)
} }
printf("Accelerant device info:\n" printf("Accelerant device info:\n"
" version: %ud\n" " version: %ud\n"
" name: %s\n" " name: %s\n"
" chipset: %s\n" " chipset: %s\n"
" serial#: %s\n", (unsigned int) adi.version, adi.name, adi.chipset, adi.serial_no); " serial#: %s\n",
(unsigned int) adi.version, adi.name, adi.chipset, adi.serial_no);
// Check the view is attached to a screen driven by a Radeon chip: // Check the view is attached to a screen driven by a Radeon chip:
if (strcasecmp(adi.chipset, "radeon") == 0 || if (strcasecmp(adi.chipset, "radeon") == 0 ||