renderinfo.h
上传用户:center1979
上传日期:2022-07-26
资源大小:50633k
文件大小:2k
源码类别:

OpenGL

开发平台:

Visual C++

  1. // renderinfo.h
  2. //
  3. // Copyright (C) 2006, Chris Laurel <claurel@shatters.net>
  4. //
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the GNU General Public License
  7. // as published by the Free Software Foundation; either version 2
  8. // of the License, or (at your option) any later version.
  9. struct RenderInfo
  10. {
  11.     Color color;
  12.     Texture* baseTex;
  13.     Texture* bumpTex;
  14.     Texture* nightTex;
  15.     Texture* glossTex;
  16.     Texture* overlayTex;
  17.     Color hazeColor;
  18.     Color specularColor;
  19.     float specularPower;
  20.     Vec3f sunDir_eye;
  21.     Vec3f sunDir_obj;
  22.     Vec3f eyeDir_obj;
  23.     Point3f eyePos_obj;
  24.     Color sunColor;
  25.     Color ambientColor;
  26. #ifdef USE_HDR
  27.     float nightLightScale;
  28. #endif
  29.     float lunarLambert;
  30.     Quatf orientation;
  31.     float pixWidth;
  32.     float pointScale;
  33.     bool useTexEnvCombine;
  34.     RenderInfo() :
  35. #ifdef HDR_COMPRESS
  36.                    color(0.5f, 0.5f, 0.5f),
  37. #else
  38.                    color(1.0f, 1.0f, 1.0f),
  39. #endif
  40.                    baseTex(NULL),
  41.                    bumpTex(NULL),
  42.                    nightTex(NULL),
  43.                    glossTex(NULL),
  44.                    overlayTex(NULL),
  45.                    hazeColor(0.0f, 0.0f, 0.0f),
  46.                    specularColor(0.0f, 0.0f, 0.0f),
  47.                    specularPower(0.0f),
  48.                    sunDir_eye(0.0f, 0.0f, 1.0f),
  49.                    sunDir_obj(0.0f, 0.0f, 1.0f),
  50.                    eyeDir_obj(0.0f, 0.0f, 1.0f),
  51.                    eyePos_obj(0.0f, 0.0f, 0.0f),
  52.                    sunColor(1.0f, 1.0f, 1.0f),
  53.                    ambientColor(0.0f, 0.0f, 0.0f),
  54. #ifdef USE_HDR
  55.                    nightLightScale(1.0f),
  56. #endif
  57.                    lunarLambert(0.0f),
  58.                    orientation(1.0f, 0.0f, 0.0f, 0.0f),
  59.                    pixWidth(1.0f),
  60.                    useTexEnvCombine(false)
  61.     {};
  62. };
  63. extern LODSphereMesh* g_lodSphere;