aboutsummaryrefslogtreecommitdiff
path: root/sp/src/game/client/c_pixel_visibility.h
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
committerJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
commit39ed87570bdb2f86969d4be821c94b722dc71179 (patch)
treeabc53757f75f40c80278e87650ea92808274aa59 /sp/src/game/client/c_pixel_visibility.h
downloadsource-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz
source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip
First version of the SOurce SDK 2013
Diffstat (limited to 'sp/src/game/client/c_pixel_visibility.h')
-rw-r--r--sp/src/game/client/c_pixel_visibility.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/sp/src/game/client/c_pixel_visibility.h b/sp/src/game/client/c_pixel_visibility.h
new file mode 100644
index 00000000..62e32112
--- /dev/null
+++ b/sp/src/game/client/c_pixel_visibility.h
@@ -0,0 +1,55 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================//
+
+#ifndef C_PIXEL_VISIBILITY_H
+#define C_PIXEL_VISIBILITY_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+
+const float PIXELVIS_DEFAULT_PROXY_SIZE = 2.0f;
+const float PIXELVIS_DEFAULT_FADE_TIME = 0.0625f;
+
+typedef int pixelvis_handle_t;
+struct pixelvis_queryparams_t
+{
+ pixelvis_queryparams_t()
+ {
+ bSetup = false;
+ }
+
+ void Init( const Vector &origin, float proxySizeIn = PIXELVIS_DEFAULT_PROXY_SIZE, float proxyAspectIn = 1.0f, float fadeTimeIn = PIXELVIS_DEFAULT_FADE_TIME )
+ {
+ position = origin;
+ proxySize = proxySizeIn;
+ proxyAspect = proxyAspectIn;
+ fadeTime = fadeTimeIn;
+ bSetup = true;
+ bSizeInScreenspace = false;
+ }
+
+ Vector position;
+ float proxySize;
+ float proxyAspect;
+ float fadeTime;
+ bool bSetup;
+ bool bSizeInScreenspace;
+};
+
+float PixelVisibility_FractionVisible( const pixelvis_queryparams_t &params, pixelvis_handle_t *queryHandle );
+float StandardGlowBlend( const pixelvis_queryparams_t &params, pixelvis_handle_t *queryHandle, int rendermode, int renderfx, int alpha, float *pscale );
+
+void PixelVisibility_ShiftVisibilityViews( int iSourceViewID, int iDestViewID ); //mainly needed by portal mod to avoid a pop in visibility when teleporting the player
+
+void PixelVisibility_EndCurrentView();
+void PixelVisibility_EndScene();
+float GlowSightDistance( const Vector &glowOrigin, bool bShouldTrace );
+
+// returns true if the video hardware is doing the tests, false is traceline is doing so.
+bool PixelVisibility_IsAvailable();
+
+#endif // C_PIXEL_VISIBILITY_H