diff Renderer/Engine/viewerFB.cc @ 728:4f77768d7a7f

add Engine/ViewerDevice , SgRootChange not work
author aaa
date Sat, 19 Dec 2009 20:32:02 +0900
parents 735f76483bb2
children bed529c55eda
line wrap: on
line diff
--- a/Renderer/Engine/viewerFB.cc	Sat Dec 19 17:11:43 2009 +0900
+++ b/Renderer/Engine/viewerFB.cc	Sat Dec 19 20:32:02 2009 +0900
@@ -1,11 +1,13 @@
 #include "viewerFB.h"
-#include "Func.h"
 #include "fb.h"
 
+#define default_sdl_flag SDL_INIT_TIMER | SDL_INIT_JOYSTICK
 //extern void post2runLoop(void *);
+ViewerFB::ViewerFB() {}
+ViewerFB::~ViewerFB() {}
 
-void
-ViewerFB::video_init(TaskManager *manager)
+Uint32 *
+ViewerFB::video_init(TaskManager *manager, int bpp, int width, int height)
 {
     Uint32 sdl_flag = default_sdl_flag | SDL_INIT_VIDEO;
 
@@ -14,11 +16,13 @@
 	exit(1);
     }
 
-    pixels = (Uint32*)get_fbdev_addr();
+    Uint32 *pixels = (Uint32*)get_fbdev_addr();
 
     if (pixels == 0) {
-	pixels = (new Uint32[width*height*32/8]);
+    	pixels = (new Uint32[width*height*32/8]);
     }
+
+    return pixels;
 }
 
 void
@@ -27,3 +31,16 @@
     //bzero(pixels, sizeof(int)*width*height);
     //memset(pixels, 0xFF, sizeof(int)*width*height);
 }
+
+void
+ViewerFB::clear_screen()
+{
+}
+
+
+void
+ViewerFB::free_device()
+{
+}
+
+