]> git.mxchange.org Git - simgear.git/blob - simgear/scene/sky/clouds3d/SkyUtil.cpp
Clouds3D crashes because there is no Light
[simgear.git] / simgear / scene / sky / clouds3d / SkyUtil.cpp
1 //------------------------------------------------------------------------------
2 // File : SkyUtil.cpp
3 //------------------------------------------------------------------------------
4 // SkyWorks : Copyright 2002 Mark J. Harris and
5 //                                              The University of North Carolina at Chapel Hill
6 //------------------------------------------------------------------------------
7 // Permission to use, copy, modify, distribute and sell this software and its 
8 // documentation for any purpose is hereby granted without fee, provided that 
9 // the above copyright notice appear in all copies and that both that copyright 
10 // notice and this permission notice appear in supporting documentation. 
11 // Binaries may be compiled with this software without any royalties or 
12 // restrictions. 
13 //
14 // The author(s) and The University of North Carolina at Chapel Hill make no 
15 // representations about the suitability of this software for any purpose. 
16 // It is provided "as is" without express or 
17 // implied warranty.
18 /**
19  * @file SkyUtil.cpp
20  * 
21  * Implemtation of global utility functions.
22  */
23 #include "SkyUtil.hpp"
24
25 //------------------------------------------------------------------------------
26 // Function               : SkyTrace
27 // Description      : 
28 //------------------------------------------------------------------------------
29 /**
30  * SkyTrace( char* strMsg, ... )
31  * @brief Prints formatted output, debug only.
32  *
33  * Includes file and line number information automatically.
34  */ 
35 void SkyTrace( char* strMsg, ... )
36 {
37 #if defined(DEBUG) | defined(_DEBUG)
38   
39   char strBuffer[512];
40
41   va_list args;
42   va_start(args, strMsg);
43   _vsnprintf( strBuffer, 512, strMsg, args );
44   va_end(args);
45
46   fprintf(stderr, "[SkyTrace] %s(%d): %s\n",__FILE__, __LINE__, strBuffer);
47 #endif
48 }
49
50