Mercurial > hg > Game > Cerium
view Renderer/Engine/SpanPack.h @ 1616:05d449e7b9f8 draft
remove set_NDRange
author | Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 14 May 2013 13:40:50 +0900 |
parents | 3778a1eda68d |
children |
line wrap: on
line source
#ifndef INCLUDED_SPAN_PACK #define INCLUDED_SPAN_PACK #include "Span.h" #define MAX_SIZE_SPAN 64 #define SPANPACK_SEGMENT_NUM 4 class SpanPack { public: /* fields */ SpanPack *next; // 4 struct SpanInfo { int start; int size; int y_top; } info; // 12 int pad[4]; // 16 Span span[MAX_SIZE_SPAN]; // 48*MAX_SIZE_SPAN = 3072 void init(int ytop) { this->info.start = 0; this->info.size = 0; this->info.y_top = ytop; this->pad[0] = 0; // initialized this->next = NULL; } void reinit(int ytop) { SpanPack* top = this; SpanPack* p; SpanPack* p1; p = top->next; while (p != NULL) { p1 = p->next; free(p); p = p1; } this->pad[0] = 0; // initialized this->info.start = 0; this->info.size = 0; this->info.y_top = ytop; this->next = NULL; } }; typedef SpanPack* SpanPackPtr; #endif