Microchanges.

This commit is contained in:
Federico Ponchio 2004-12-01 18:46:21 +00:00
parent 6a03b9d31c
commit cccc31f53c
3 changed files with 11 additions and 8 deletions

View File

@ -240,7 +240,7 @@ void NexusMt::Draw(vector<unsigned int> &cells) {
switch(mode) { switch(mode) {
case POINTS: case POINTS:
glDrawArrays(GL_POINTS, 0, patch.nv); break; glDrawArrays(GL_POINTS, 0, patch.nv); break;
case DEBUG: case PATCHES:
glColor3ub((cell * 27)%255, (cell * 37)%255, (cell * 87)%255); glColor3ub((cell * 27)%255, (cell * 37)%255, (cell * 87)%255);
case SMOOTH: case SMOOTH:
if(signature & NXS_FACES) if(signature & NXS_FACES)

View File

@ -108,7 +108,7 @@ class NexusMt: public Nexus {
HIDDEN_LINE, HIDDEN_LINE,
FLAT_WIRE, FLAT_WIRE,
FLAT, FLAT,
DEBUG }; PATCHES };
enum Component { COLOR = 0x1, enum Component { COLOR = 0x1,
NORMAL = 0x2, NORMAL = 0x2,

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.22 2004/11/28 04:16:19 ponchio
*** empty log message ***
Revision 1.21 2004/11/28 01:23:26 ponchio Revision 1.21 2004/11/28 01:23:26 ponchio
Fixing borders... let's hope. Fixing borders... let's hope.
@ -250,6 +253,7 @@ int main(int argc, char *argv[]) {
bool redraw = false; bool redraw = false;
float fps = 0; float fps = 0;
float tframe = 0; float tframe = 0;
while( !quit ) { while( !quit ) {
bool first = true; bool first = true;
SDL_WaitEvent(&event); SDL_WaitEvent(&event);
@ -281,7 +285,7 @@ int main(int argc, char *argv[]) {
case SDLK_s: metric = NexusMt::FRUSTUM; break; case SDLK_s: metric = NexusMt::FRUSTUM; break;
case SDLK_p: mode = NexusMt::POINTS; nexus.SetMode(mode); break; case SDLK_p: mode = NexusMt::POINTS; nexus.SetMode(mode); break;
case SDLK_d: mode = NexusMt::DEBUG; nexus.SetMode(mode); break; case SDLK_d: mode = NexusMt::PATCHES; nexus.SetMode(mode); break;
case SDLK_f: mode = NexusMt::FLAT; nexus.SetMode(mode); break; case SDLK_f: mode = NexusMt::FLAT; nexus.SetMode(mode); break;
case SDLK_m: mode = NexusMt::SMOOTH; nexus.SetMode(mode); break; case SDLK_m: mode = NexusMt::SMOOTH; nexus.SetMode(mode); break;
@ -391,8 +395,7 @@ int main(int argc, char *argv[]) {
nexus.tri_total = 0; nexus.tri_total = 0;
nexus.tri_rendered = 0; nexus.tri_rendered = 0;
nexus.Extract(cells); nexus.Extract(cells);
nexus.Draw(cells); }
} else
nexus.Draw(cells); nexus.Draw(cells);
if(show_borders) { if(show_borders) {