Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3128 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Dec 7, 2004, 8:10:18 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/images: faster-fix

Location:
orxonox/branches/images/importer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/images/importer/framework.cc

    r3127 r3128  
    11#include "framework.h"
    22
    3 int verbose = 4;
     3int verbose = 1;
    44
    55void DrawGLScene()
  • orxonox/branches/images/importer/material.cc

    r3127 r3128  
    288288void Material::setDiffuse (char* rgb)
    289289{
    290   char r[20],g[20],b[20];
    291   sscanf (rgb, "%s %s %s", r, g, b);
    292   setDiffuse (atof(r), atof(g), atof(b));
     290  float r,g,b;
     291  sscanf (rgb, "%f %f %f", &r, &g, &b);
     292  setDiffuse (r, g, b);
    293293}
    294294
     
    314314void Material::setAmbient (char* rgb)
    315315{
    316   char r[20],g[20],b[20];
    317   sscanf (rgb, "%s %s %s", r, g, b);
    318   setAmbient (atof(r), atof(g), atof(b));
     316  float r,g,b;
     317  sscanf (rgb, "%f %f %f", &r, &g, &b);
     318  setAmbient (r, g, b);
    319319}
    320320
     
    340340void Material::setSpecular (char* rgb)
    341341{
    342   char r[20],g[20],b[20];
    343   sscanf (rgb, "%s %s %s", r, g, b);
    344   setSpecular (atof(r), atof(g), atof(b));
     342  float r,g,b;
     343  sscanf (rgb, "%f %f %f", &r, &g, &b);
     344  setSpecular (r, g, b);
    345345}
    346346
     
    378378void Material::setTransparency (char* trans)
    379379{
    380   char tr[20];
    381   sscanf (trans, "%s", tr);
    382   setTransparency (atof(tr));
     380  setTransparency (atof(trans));
    383381}
    384382
Note: See TracChangeset for help on using the changeset viewer.