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

View File

@ -351,7 +351,7 @@ Flurry::StartSaver(BView* view, bool preview)
void
Flurry::StopSaver()
{
if (fFlurryView)
if (fFlurryView != NULL)
fFlurryView->EnableDirectMode(false);
}
@ -366,10 +366,13 @@ Flurry::DirectDraw(int32 frame)
void
Flurry::DirectConnected(direct_buffer_info* info)
{
if (fFlurryView) {
// Enable or disable direct rendering
#if 1
if (fFlurryView != NULL) {
fFlurryView->DirectConnected(info);
fFlurryView->EnableDirectMode(true);
}
#endif
}

View File

@ -200,10 +200,14 @@ bool MainWindow :: QuitRequested()
*/
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) {
fCurrentView->DirectConnected(info);
fCurrentView->EnableDirectMode(true);
}
#endif
}
/* FUNCTION: animation_thread

View File

@ -213,10 +213,15 @@ TeapotWindow::QuitRequested()
void
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) {
fObjectView->DirectConnected(info);
fObjectView->EnableDirectMode(true);
}
#endif
}