diff old/simple_pack/viewer.h @ 507:735f76483bb2

Reorganization..
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 12 Oct 2009 09:39:35 +0900
parents TaskManager/Test/simple_pack/viewer.h@35a6cf176c38
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/old/simple_pack/viewer.h	Mon Oct 12 09:39:35 2009 +0900
@@ -0,0 +1,58 @@
+#include <SDL.h>
+
+#ifndef INCLUDED_VIEWER
+#define INCLUDED_VIEWER
+
+#include "TaskManager.h"
+
+extern TaskManager *manager;
+
+/*
+#ifndef INCLUDED_DEMONSTRATION
+#include "demonstration.h"
+#endif
+
+#ifndef INCLUDED_SCENE
+#include "scene.h"
+#endif
+*/
+
+class Viewer{
+public:
+    
+  int width;
+  int height;
+  int bpp;
+  int rgb_size[3];
+  Uint32 video_flags;
+  //Demonstration *play_demo;
+  //Scene *scene;
+  SDL_Surface *screen;
+  Uint32 *pixels;
+  float zRow[1920][1080];
+  //float **zRow;
+
+  Viewer(int b=32, int w=640, int h=480);
+  void sdl_init();
+  void init();
+  int get_ticks();
+  bool quit_check();
+  void quit();
+  void screen_clear();
+  void swap_buffers();
+  void write_pixel(int x, int y,float z, Uint32 rgb);
+  void write_line(float x1, float y1, float x2, float y2, Uint32 rgb);
+  void write_triangle(float x1, float y1, float x2, float y2, float x3, float y3, Uint32 rgb);
+  void clean_pixels();
+  void graph_line();
+
+  //void run();
+  void run_init();  
+  void run_loop();
+  void run_finish();
+  void run_draw();
+
+  void zRow_init();
+};
+
+#endif