source: golgotha/src/golg/get_tmap.cc @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 11 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 1.1 KB
Line 
1/********************************************************************** <BR>
2  This file is part of Crack dot Com's free source code release of
3  Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
4  information about compiling & licensing issues visit this URL</a>
5  <PRE> If that doesn't help, contact Jonathan Clark at
6  golgotha_source@usa.net (Subject should have "GOLG" in it)
7***********************************************************************/
8
9#include "get_tmap.hh"
10#include "tmapper.hh"
11#include "error/error.hh"
12
13
14g1_texture_mapper_class *g1_texture_mapper_class::list=0;
15
16// creates a object rendering object
17g1_texture_mapper_class *g1_get_tmapper(i4_display_class *display)
18{
19  int best_val=0;
20  g1_texture_mapper_class *p, *best=0;
21
22  for (p=g1_texture_mapper_class::list; p; p=p->next)
23  {
24    int stat=p->status(display);
25    if (stat>best_val)
26    {
27      best=p;
28      best_val=stat;
29    }     
30  }
31
32  if (!best)
33    i4_error("no texture mappers available");
34
35  best->init(display);
36  return best;
37}
38
Note: See TracBrowser for help on using the repository browser.