gl: Unify DirectConnected functions

* Partial undo of hrev43864 - 3dmov
  I was using an old GL renderer. After my indirect
  GL fix, this started working well without direct
  rendering. (sorry for the spam)
* Clean up the other GL DirectConnected functions
  Make it easy for know what to disable to toggle
  Direct Rendering.
This commit is contained in:
Alexander von Gluck IV
2012-03-16 03:39:31 +00:00
parent b2bcacdef6
commit 4f3b7115be
3 changed files with 14 additions and 2 deletions
+5 -2
View File
@@ -351,7 +351,7 @@ Flurry::StartSaver(BView* view, bool preview)
void void
Flurry::StopSaver() Flurry::StopSaver()
{ {
if (fFlurryView) if (fFlurryView != NULL)
fFlurryView->EnableDirectMode(false); fFlurryView->EnableDirectMode(false);
} }
@@ -366,10 +366,13 @@ Flurry::DirectDraw(int32 frame)
void void
Flurry::DirectConnected(direct_buffer_info* info) Flurry::DirectConnected(direct_buffer_info* info)
{ {
if (fFlurryView) { // Enable or disable direct rendering
#if 1
if (fFlurryView != NULL) {
fFlurryView->DirectConnected(info); fFlurryView->DirectConnected(info);
fFlurryView->EnableDirectMode(true); fFlurryView->EnableDirectMode(true);
} }
#endif
} }
+4
View File
@@ -200,10 +200,14 @@ bool MainWindow :: QuitRequested()
*/ */
void MainWindow :: DirectConnected(direct_buffer_info *info) void MainWindow :: DirectConnected(direct_buffer_info *info)
{ {
// TODO: Direct rendering causes mouse to flicker due to lack
// of a hardware cursor.
#if 0
if (fCurrentView != NULL) { if (fCurrentView != NULL) {
fCurrentView->DirectConnected(info); fCurrentView->DirectConnected(info);
fCurrentView->EnableDirectMode(true); fCurrentView->EnableDirectMode(true);
} }
#endif
} }
/* FUNCTION: animation_thread /* FUNCTION: animation_thread
+5
View File
@@ -213,10 +213,15 @@ TeapotWindow::QuitRequested()
void void
TeapotWindow::DirectConnected(direct_buffer_info* info) TeapotWindow::DirectConnected(direct_buffer_info* info)
{ {
// TODO: Direct rendering causes the mouse to flicker due
// to the lack of a Hardware Cursor, however without
// it the teapot freezes on mouse move. (bug?)
#if 1
if (fObjectView != NULL) { if (fObjectView != NULL) {
fObjectView->DirectConnected(info); fObjectView->DirectConnected(info);
fObjectView->EnableDirectMode(true); fObjectView->EnableDirectMode(true);
} }
#endif
} }