View Single Post
Re: code to get the illumination at any point on the map
Old
  (#21)
Immortal_BLG
Member
 
Status: Offline
Posts: 171
Join Date: Nov 2007
Location: Russian Federation
Default Re: code to get the illumination at any point on the map - 19-03-2012

oh, missed it....

Quote:
Originally Posted by KWo
About GetModuleHandle ("sw.dll") - what exactly is this check for?
It is associated with specificity of display for different renderers....
I use it to determine which structure to use:
1) swds.DLL - used only for dedicated server - has no render interface (structures withOUT "GL_" prefix)
2) sw.DLL - used in software rendering mode (Options->Video->Renderer->Software) (structures withOUT "GL_" prefix)
3) hw.DLL - used in hardware rendering mode (OpenGL: Options->Video->Renderer->Software, Direct 3D: Options->Video->Renderer->D3D) (structures with "GL_" prefix)
Quote:
Originally Posted by KWo
Isn't just the same as a check (!FNullEnt (pHostEdict))?
NO.
Quote:
Originally Posted by KWo
Another thing - there is no listenserver for a linux...
It turns out that the function "IS_DEDICATED_SERVER" always returns true on LINUX?, if so, try this:
Code:
inline const bool IsSoftwareDrawingMode (void)
{
	#ifdef _LINUX
		return true;	// Always software rendering mode....
	#else	// ifdef _LINUX
		static const bool isSoftwareDrawingMode (IS_DEDICATED_SERVER () || GetModuleHandle ("sw.dll") != NULL);

		return isSoftwareDrawingMode;
	#endif	// ifndef _LINUX
}
  
Reply With Quote