Integrating github/staging through commit ab87ed9
This commit is contained in:
@@ -48,8 +48,12 @@
|
||||
// Using AZ_Assert for all assert kinds (assert =, CRY_ASSERT, AZ_Assert).
|
||||
// see Trace::Assert for implementation
|
||||
#if defined(USE_AZ_ASSERT)
|
||||
#undef assert
|
||||
#define assert(condition) AZ_Assert(condition, "%s", #condition)
|
||||
#undef assert
|
||||
#if !defined(NDEBUG)
|
||||
#define assert(condition) AZ_Assert(condition, "%s", #condition)
|
||||
#else
|
||||
#define assert(condition)
|
||||
#endif
|
||||
#endif //defined(USE_AZ_ASSERT)
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -511,7 +511,10 @@ public:
|
||||
void UnlockModify() const
|
||||
{
|
||||
SetDebugLocked(false);
|
||||
int counter = CryInterlockedDecrement(&m_modifyCount); // decrement write counter
|
||||
#if !defined(NDEBUG)
|
||||
int counter =
|
||||
#endif
|
||||
CryInterlockedDecrement(&m_modifyCount); // decrement write counter
|
||||
assert(counter >= 0);
|
||||
m_writeLock.Unlock(); // release exclusive lock
|
||||
}
|
||||
|
||||
@@ -466,7 +466,9 @@ inline void CThreadSafeRendererContainer<T>::CoalesceMemory()
|
||||
// mark state as not accessable
|
||||
m_bElementAccessSafe = false;
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
size_t nOldSize = m_nSize;
|
||||
#endif
|
||||
|
||||
// compute required memory
|
||||
size_t nRequieredElements = 0;
|
||||
@@ -542,7 +544,7 @@ inline CThreadSafeRendererContainer<T>::CMemoryPage::CMemoryPage()
|
||||
nMemoryBlockBegin = (nMemoryBlockBegin + nObjectAlignment - 1) & ~(nObjectAlignment - 1);
|
||||
|
||||
// compute number of avaible elements
|
||||
assert((nMemoryBlockEnd - nMemoryBlockBegin) > 0);
|
||||
assert(nMemoryBlockEnd > nMemoryBlockBegin);
|
||||
m_nCapacity = (LONG)((nMemoryBlockEnd - nMemoryBlockBegin) / sizeof(T));
|
||||
|
||||
// store pointer to store data to
|
||||
|
||||
@@ -290,8 +290,10 @@ float NumToFromString(float val, int digits, bool floating, char buffer[], int b
|
||||
{
|
||||
sprintf_s(buffer, buf_size, "%.*f", digits, float(val));
|
||||
}
|
||||
|
||||
int readCount = azsscanf(buffer, "%g", &val);
|
||||
#if !defined(NDEBUG)
|
||||
int readCount =
|
||||
#endif
|
||||
azsscanf(buffer, "%g", &val);
|
||||
assert(readCount == 1);
|
||||
return val;
|
||||
}
|
||||
|
||||
@@ -154,8 +154,15 @@ struct CTypeInfo
|
||||
bool IsBaseClass() const { return bBaseClass; }
|
||||
bool IsInline() const
|
||||
{
|
||||
const CVarInfo* pFirst;
|
||||
return bBaseClass && Offset == 0 && (pFirst = Type.NextSubVar(0)) && pFirst->IsBaseClass();
|
||||
if (bBaseClass && Offset == 0)
|
||||
{
|
||||
const CVarInfo* pFirst = Type.NextSubVar(0);
|
||||
if (pFirst)
|
||||
{
|
||||
return pFirst->IsBaseClass();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GetLimit(ENumericLimit eLimit, float& fVal) const
|
||||
@@ -198,7 +205,7 @@ struct CTypeInfo
|
||||
inline bool HasSubVars() const
|
||||
{ return NextSubVar(0) != 0; }
|
||||
#define AllSubVars(pVar, Info) \
|
||||
(const CTypeInfo::CVarInfo* pVar = 0; pVar = (Info).NextSubVar(pVar); )
|
||||
(const CTypeInfo::CVarInfo* pVar = (Info).NextSubVar(0); pVar; pVar = (Info).NextSubVar(pVar))
|
||||
|
||||
// Named var search.
|
||||
virtual const CVarInfo* FindSubVar([[maybe_unused]] cstr name) const
|
||||
|
||||
@@ -48,23 +48,27 @@ struct SFileVersion
|
||||
|
||||
char* p;
|
||||
char* next = nullptr;
|
||||
size_t strmax = sizeof(t);
|
||||
if (!(p = azstrtok(t, &strmax, ".", &next)))
|
||||
[[maybe_unused]] size_t strmax = sizeof(t);
|
||||
p = azstrtok(t, &strmax, ".", &next);
|
||||
if (!p)
|
||||
{
|
||||
return;
|
||||
}
|
||||
v[3] = atoi(p);
|
||||
if (!(p = azstrtok(nullptr, &strmax, ".", &next)))
|
||||
p = azstrtok(nullptr, &strmax, ".", &next);
|
||||
if (!p)
|
||||
{
|
||||
return;
|
||||
}
|
||||
v[2] = atoi(p);
|
||||
if (!(p = azstrtok(nullptr, &strmax, ".", &next)))
|
||||
p = azstrtok(nullptr, &strmax, ".", &next);
|
||||
if (!p)
|
||||
{
|
||||
return;
|
||||
}
|
||||
v[1] = atoi(p);
|
||||
if (!(p = azstrtok(nullptr, &strmax, ".", &next)))
|
||||
p = azstrtok(nullptr, &strmax, ".", &next);
|
||||
if (!p)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -25,10 +25,6 @@
|
||||
#include <Cry_XOptimise.h>
|
||||
//DOC-IGNORE-END
|
||||
|
||||
#if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
#include <AzCore/Component/EntityId.h>
|
||||
#endif // if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
#define CAMERA_MIN_NEAR 0.001f
|
||||
#define DEFAULT_NEAR 0.2f
|
||||
@@ -416,8 +412,6 @@ inline void CameraViewParameters::CalcTiledRegionVerts(Vec3* V, Vec2& vMin, Vec2
|
||||
vTileMax.x = abs(fWR - fWL) * vMax.x;
|
||||
vTileMax.y = abs(fWT - fWB) * vMax.y;
|
||||
|
||||
float TileWidth = abs(fWR - fWL) / nGridSizeX;
|
||||
float TileHeight = abs(fWT - fWB) / nGridSizeY;
|
||||
|
||||
float TileL = fWL + vTileMin.x;
|
||||
float TileR = fWL + vTileMax.x;
|
||||
@@ -439,8 +433,6 @@ inline void CameraViewParameters::CalcTiledRegionVerts(Vec3* V, Vec2& vMin, Vec2
|
||||
vTileFarMax.x = abs(fwR - fwL) * vMax.x;
|
||||
vTileFarMax.y = abs(fwT - fwB) * vMax.y;
|
||||
|
||||
float TileFarWidth = abs(fwR - fwL) / nGridSizeX;
|
||||
float TileFarHeight = abs(fwT - fwB) / nGridSizeY;
|
||||
|
||||
float TileFarL = fwL + vTileFarMin.x;
|
||||
float TileFarR = fwL + vTileFarMax.x;
|
||||
@@ -604,11 +596,6 @@ public:
|
||||
|
||||
ILINE const Plane* GetFrustumPlane(int numplane) const { return &m_fp[numplane]; }
|
||||
|
||||
#if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
ILINE const AZ::EntityId GetEntityId() const { return m_entityId; }
|
||||
ILINE void SetEntityId( AZ::EntityId entityId ) { m_entityId = entityId; }
|
||||
#endif // if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Z-Buffer ranges.
|
||||
// This values are defining near/far clipping plane, it only used to specify z-buffer range.
|
||||
@@ -675,10 +662,6 @@ public:
|
||||
m_nPosX = m_nPosY = m_nSizeX = m_nSizeY = 0;
|
||||
m_entityPos = Vec3(0, 0, 0);
|
||||
m_entityRot = Quat(0, 0, 0, 1);
|
||||
#if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
m_frameUpdateId = 0;
|
||||
m_entityId = AZ::EntityId();
|
||||
#endif // if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
}
|
||||
~CCamera() {}
|
||||
|
||||
@@ -709,15 +692,6 @@ public:
|
||||
|
||||
CameraViewParameters m_viewParameters;
|
||||
|
||||
#if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
// Get this camera's sequential frame update ID.
|
||||
uint32_t GetFrameUpdateId() const { return m_frameUpdateId; }
|
||||
|
||||
// Increment this camera's sequential frame update ID. This should be
|
||||
// called every time the camera is used to render the scene.
|
||||
void IncrementFrameUpdateId() { m_frameUpdateId++; }
|
||||
#endif // if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
|
||||
private:
|
||||
bool AdditionalCheck(const AABB& aabb) const;
|
||||
bool AdditionalCheck(const Vec3& wpos, const OBB& obb, f32 uscale) const;
|
||||
@@ -756,17 +730,6 @@ private:
|
||||
|
||||
int m_nPosX, m_nPosY, m_nSizeX, m_nSizeY;
|
||||
|
||||
#if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
// A sequential counter that is incremented every time this camera is used
|
||||
// to render a frame. This id is not the same as the frame update ID used
|
||||
// by the renderer which handles multiple cameras. Systems that rely on
|
||||
// per-camera temporal buffers can use this to index temporal data.
|
||||
uint32_t m_frameUpdateId;
|
||||
|
||||
// This camera's Entity ID, useful when multiple cameras are active.
|
||||
AZ::EntityId m_entityId;
|
||||
#endif // if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
//--- OLD STUFF
|
||||
//------------------------------------------------------------------------
|
||||
@@ -2017,42 +1980,48 @@ inline bool CCamera::IsOBBVisible_E(const Vec3& wpos, const OBB& obb, f32 uscale
|
||||
//is larger then the "radius" of the OBB, then the OBB is outside the frustum.
|
||||
f32 t0, t1, t2, t3, t4, t5;
|
||||
bool mt0, mt1, mt2, mt3, mt4, mt5;
|
||||
if (mt0 = (t0 = m_fp[0] | p) > 0.0f)
|
||||
mt0 = (t0 = m_fp[0] | p) > 0.0f;
|
||||
if (mt0)
|
||||
{
|
||||
if (t0 > (fabsf(m_fp[0].n | ax) + fabsf(m_fp[0].n | ay) + fabsf(m_fp[0].n | az)))
|
||||
{
|
||||
return CULL_EXCLUSION;
|
||||
}
|
||||
}
|
||||
if (mt1 = (t1 = m_fp[1] | p) > 0.0f)
|
||||
mt1 = (t1 = m_fp[1] | p) > 0.0f;
|
||||
if (mt1)
|
||||
{
|
||||
if (t1 > (fabsf(m_fp[1].n | ax) + fabsf(m_fp[1].n | ay) + fabsf(m_fp[1].n | az)))
|
||||
{
|
||||
return CULL_EXCLUSION;
|
||||
}
|
||||
}
|
||||
if (mt2 = (t2 = m_fp[2] | p) > 0.0f)
|
||||
mt2 = (t2 = m_fp[2] | p) > 0.0f;
|
||||
if (mt2)
|
||||
{
|
||||
if (t2 > (fabsf(m_fp[2].n | ax) + fabsf(m_fp[2].n | ay) + fabsf(m_fp[2].n | az)))
|
||||
{
|
||||
return CULL_EXCLUSION;
|
||||
}
|
||||
}
|
||||
if (mt3 = (t3 = m_fp[3] | p) > 0.0f)
|
||||
mt3 = (t3 = m_fp[3] | p) > 0.0f;
|
||||
if (mt3)
|
||||
{
|
||||
if (t3 > (fabsf(m_fp[3].n | ax) + fabsf(m_fp[3].n | ay) + fabsf(m_fp[3].n | az)))
|
||||
{
|
||||
return CULL_EXCLUSION;
|
||||
}
|
||||
}
|
||||
if (mt4 = (t4 = m_fp[4] | p) > 0.0f)
|
||||
mt4 = (t4 = m_fp[4] | p) > 0.0f;
|
||||
if (mt4)
|
||||
{
|
||||
if (t4 > (fabsf(m_fp[4].n | ax) + fabsf(m_fp[4].n | ay) + fabsf(m_fp[4].n | az)))
|
||||
{
|
||||
return CULL_EXCLUSION;
|
||||
}
|
||||
}
|
||||
if (mt5 = (t5 = m_fp[5] | p) > 0.0f)
|
||||
mt5 = (t5 = m_fp[5] | p) > 0.0f;
|
||||
if (mt5)
|
||||
{
|
||||
if (t5 > (fabsf(m_fp[5].n | ax) + fabsf(m_fp[5].n | ay) + fabsf(m_fp[5].n | az)))
|
||||
{
|
||||
|
||||
@@ -77,7 +77,6 @@ CEngineSettingsBackendWin32::CEngineSettingsBackendWin32(CEngineSettingsManager*
|
||||
|
||||
std::wstring CEngineSettingsBackendWin32::GetModuleFilePath() const
|
||||
{
|
||||
HMODULE hInstance = GetModuleHandleW(moduleName().c_str());
|
||||
wchar_t szFilename[_MAX_PATH];
|
||||
GetModuleFileNameW((HINSTANCE)&__ImageBase, szFilename, _MAX_PATH);
|
||||
wchar_t drive[_MAX_DRIVE];
|
||||
|
||||
@@ -2417,9 +2417,6 @@ struct SRenderingPassInfo
|
||||
CUBEMAP_GEN = BIT(16),
|
||||
GEOM_CACHES = BIT(17),
|
||||
DISABLE_RENDER_CHUNK_MERGE = BIT(18),
|
||||
#if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
RENDER_SCENE_TO_TEXTURE = BIT(20),
|
||||
#endif // if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
|
||||
// below are precombined flags
|
||||
STATIC_OBJECTS = ENTITIES,
|
||||
@@ -2445,9 +2442,6 @@ struct SRenderingPassInfo
|
||||
bool IsCachedShadowPass() const;
|
||||
EShadowMapType GetShadowMapType() const;
|
||||
bool IsDisableRenderChunkMerge() const;
|
||||
#if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
bool IsRenderSceneToTexturePass() const;
|
||||
#endif // if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
|
||||
bool IsAuxWindow() const;
|
||||
|
||||
@@ -2562,14 +2556,6 @@ inline bool SRenderingPassInfo::IsShadowPass() const
|
||||
return static_cast<EShadowMapType>(m_eShadowMapRendering) != SHADOW_MAP_NONE;
|
||||
}
|
||||
|
||||
#if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
inline bool SRenderingPassInfo::IsRenderSceneToTexturePass() const
|
||||
{
|
||||
return (m_nRenderingFlags & RENDER_SCENE_TO_TEXTURE) != 0;
|
||||
}
|
||||
#endif // if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
inline bool SRenderingPassInfo::IsCachedShadowPass() const
|
||||
{
|
||||
|
||||
@@ -1983,7 +1983,6 @@ public:
|
||||
|
||||
for (size_t i = 0, count = m_subsets.size(); i < count; ++i)
|
||||
{
|
||||
const SMeshSubset& subset = m_subsets[i];
|
||||
|
||||
float posArea;
|
||||
float texArea;
|
||||
|
||||
@@ -1673,15 +1673,6 @@ struct IRenderer
|
||||
//Pass false to get a frameID that increments by one each frame. For this case the increment happens in the game thread at the beginning of the frame.
|
||||
virtual int GetFrameID(bool bIncludeRecursiveCalls = true) = 0;
|
||||
|
||||
#if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
// Returns a frame ID that is sequential for the active camera. This is
|
||||
// useful for camera-specific temporal data like motion vectors.
|
||||
virtual int GetCameraFrameID() const = 0;
|
||||
|
||||
// Returns true when rendering the scene to a texture
|
||||
virtual bool IsRenderToTextureActive() const { return false; };
|
||||
#endif // if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
|
||||
virtual void MakeMatrix(const Vec3& pos, const Vec3& angles, const Vec3& scale, Matrix34* mat) = 0;
|
||||
|
||||
// Description:
|
||||
|
||||
@@ -196,7 +196,6 @@ void IResourceCompilerHelper::GetOutputFilename(const char* szFilePath, char* bu
|
||||
|
||||
IResourceCompilerHelper::ERcCallResult IResourceCompilerHelper::InvokeResourceCompiler(const char* szSrcFilePath, const char* szDstFilePath, const bool bUserDialog)
|
||||
{
|
||||
ERcExitCode eRet = eRcExitCode_Pending;
|
||||
|
||||
const char* szDstFileName = RCPathUtil::GetFile(szDstFilePath);
|
||||
std::string pathOnly = RCPathUtil::GetPath(szDstFilePath);
|
||||
|
||||
@@ -1521,11 +1521,6 @@ struct STexSamplerRT
|
||||
|
||||
bool m_bGlobal;
|
||||
|
||||
#if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
// CRC of texture name if this is an engine texture
|
||||
uint32_t m_nCrc;
|
||||
#endif // if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
|
||||
STexSamplerRT()
|
||||
{
|
||||
m_nTexState = -1;
|
||||
@@ -1537,9 +1532,6 @@ struct STexSamplerRT
|
||||
m_nSamplerSlot = -1;
|
||||
m_nTextureSlot = -1;
|
||||
m_bGlobal = false;
|
||||
#if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
m_nCrc = 0;
|
||||
#endif // if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
}
|
||||
~STexSamplerRT()
|
||||
{
|
||||
@@ -1590,9 +1582,6 @@ struct STexSamplerRT
|
||||
m_nSamplerSlot = src.m_nSamplerSlot;
|
||||
m_nTextureSlot = src.m_nTextureSlot;
|
||||
m_bGlobal = src.m_bGlobal;
|
||||
#if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
m_nCrc = src.m_nCrc;
|
||||
#endif // if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
}
|
||||
NO_INLINE STexSamplerRT& operator = (const STexSamplerRT& src)
|
||||
{
|
||||
@@ -1615,9 +1604,6 @@ struct STexSamplerRT
|
||||
m_nSamplerSlot = -1;
|
||||
m_nTextureSlot = -1;
|
||||
m_bGlobal = (src.m_nTexFlags & FT_FROMIMAGE) != 0;
|
||||
#if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
m_nCrc = 0;
|
||||
#endif // if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
}
|
||||
inline bool operator != (const STexSamplerRT& m) const
|
||||
{
|
||||
|
||||
@@ -198,7 +198,6 @@ Spin:
|
||||
}
|
||||
# else
|
||||
// NOTE: The code below will fail on 64bit architectures!
|
||||
uint loops = 0;
|
||||
while (_InterlockedCompareExchange((volatile LONG*)pLock, setVal, checkVal) != checkVal)
|
||||
{
|
||||
_mm_pause();
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace PakLoadDataUtils
|
||||
{
|
||||
while (nDataSize & 3)
|
||||
{
|
||||
size_t nRes = GetISystem()->GetIPak()->FSeek(fileHandle, 1, SEEK_CUR);
|
||||
[[maybe_unused]] size_t nRes = GetISystem()->GetIPak()->FSeek(fileHandle, 1, SEEK_CUR);
|
||||
AZ_Assert(nRes == 0, "FSeek failed for 1 byte");
|
||||
AZ_Assert(nDataSize, "nDataSize reached zero" );
|
||||
nDataSize--;
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// AZ_RENDER_TO_TEXTURE_GEM_ENABLED is defined by the RenderToTexture Gem
|
||||
#if !defined(AZ_RENDER_TO_TEXTURE_GEM_ENABLED)
|
||||
#define AZ_RENDER_TO_TEXTURE_GEM_ENABLED (0)
|
||||
#endif
|
||||
|
||||
#if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
|
||||
#include <RenderContextConfig.h>
|
||||
#include <AzCore/EBus/EBus.h>
|
||||
|
||||
class CCamera;
|
||||
|
||||
namespace AzRTT
|
||||
{
|
||||
class RTTBus
|
||||
: public AZ::EBusTraits
|
||||
{
|
||||
public:
|
||||
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
|
||||
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
|
||||
|
||||
virtual ~RTTBus() = default;
|
||||
|
||||
/**
|
||||
* Creates an instance of an RenderContext.
|
||||
* @return Shared pointer to the created IRenderContext.
|
||||
* @param config The RenderContextConfig settings to apply.
|
||||
*/
|
||||
virtual RenderContextId CreateContext(const RenderContextConfig& config) = 0;
|
||||
|
||||
/**
|
||||
* Returns true if the IRenderContext exists and is valid.
|
||||
* @return True if context exists and is valid.
|
||||
* @param contextId the RenderContextId to check for validity
|
||||
*/
|
||||
virtual bool ContextIsValid(RenderContextId contextId) const = 0;
|
||||
|
||||
/**
|
||||
* Destroys an RenderContext instance.
|
||||
* @param contextId The RenderContextId for an existing context to destroy
|
||||
*/
|
||||
virtual void DestroyContext(RenderContextId contextId) = 0;
|
||||
|
||||
/**
|
||||
* Gets the configuration for a context instance.
|
||||
* @param contextId the RenderContextId for an existing context.
|
||||
*/
|
||||
virtual RenderContextConfig GetContextConfig(RenderContextId contextId) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the active IRenderContext. This will deactivate any existing context.
|
||||
* @return True if context was activated, false if not activated.
|
||||
* @param contextId the RenderContextId for an existing context to activate
|
||||
*/
|
||||
virtual bool SetActiveContext(RenderContextId contextId) = 0;
|
||||
|
||||
/**
|
||||
* Sets the configuration for a context instance.
|
||||
* @param contextId the RenderContextId for an existing context.
|
||||
* @param config the RenderContextConfig settings to apply.
|
||||
*/
|
||||
virtual void SetContextConfig(RenderContextId contextId, const RenderContextConfig& config) = 0;
|
||||
|
||||
/**
|
||||
* Render the world from the provided camera to a render target using the provided render context.
|
||||
* @param renderTargetTextureHandle Texture handle of target to render to.
|
||||
* @param camera The camera to use for rendering.
|
||||
* @param contextId The RenderContextId to use.
|
||||
*/
|
||||
virtual void RenderWorld(int renderTargetTextureHandle, const CCamera& camera, RenderContextId contextId) = 0;
|
||||
};
|
||||
|
||||
using RTTRequestBus = AZ::EBus<RTTBus>;
|
||||
}
|
||||
|
||||
#endif // if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
void Free()
|
||||
{
|
||||
m_nCount = 0;
|
||||
if (m_nAllocatedCount)
|
||||
if (m_nAllocatedCount && AZ::AllocatorInstance<CryLegacySTLAllocator>::IsReady())
|
||||
{
|
||||
AZ::AllocatorInstance<CryLegacySTLAllocator>::Get().DeAllocate(m_pElements);
|
||||
}
|
||||
|
||||
@@ -945,7 +945,6 @@ namespace Unicode
|
||||
const size_t fixedOffset = Append && offset >= extent<T>::value
|
||||
? extent<T>::value - 1 // In case the buffer is already full and not terminated.
|
||||
: offset;
|
||||
CharType* base = static_cast<CharType*>(out);
|
||||
Super::ptr = out + fixedOffset; // Qualification for Super required for two-phase lookup.
|
||||
}
|
||||
};
|
||||
|
||||
@@ -103,7 +103,6 @@ set(FILES
|
||||
VRCommon.h
|
||||
StereoRendererBus.h
|
||||
HeightmapUpdateNotificationBus.h
|
||||
RTTBus.h
|
||||
IObjManager.h
|
||||
INavigationSystem.h
|
||||
IMNM.h
|
||||
|
||||
@@ -527,7 +527,10 @@ inline void CryHeapCheck()
|
||||
#define AZ_RESTRICTED_SECTION PLATFORM_H_SECTION_11
|
||||
#include AZ_RESTRICTED_FILE(platform_h)
|
||||
#elif !defined(LINUX) && !defined(APPLE) // todo: this might be readded with later xdks?
|
||||
int Result = _heapchk();
|
||||
#if !defined(NDEBUG)
|
||||
int Result =
|
||||
#endif
|
||||
_heapchk();
|
||||
assert(Result != _HEAPBADBEGIN);
|
||||
assert(Result != _HEAPBADNODE);
|
||||
assert(Result != _HEAPBADPTR);
|
||||
|
||||
@@ -311,7 +311,7 @@ void InitRootDir(char szExeFileName[], uint nExeSize, char szExeRootName[], [[ma
|
||||
firstIteration = false;
|
||||
}
|
||||
// Check if the engineroot exists
|
||||
wcscat_s(szPath, L"\\engineroot.txt");
|
||||
wcscat_s(szPath, L"\\engine.json");
|
||||
WIN32_FILE_ATTRIBUTE_DATA data;
|
||||
BOOL res = GetFileAttributesExW(szPath, GetFileExInfoStandard, &data);
|
||||
if (res != 0 && data.dwFileAttributes != INVALID_FILE_ATTRIBUTES)
|
||||
@@ -376,7 +376,10 @@ void* CryInterlockedExchangePointer(void* volatile* dst, void* exchange)
|
||||
void CryInterlockedAdd(volatile size_t* pVal, ptrdiff_t iAdd)
|
||||
{
|
||||
#if defined (PLATFORM_64BIT)
|
||||
size_t v = (size_t)InterlockedAdd64((volatile int64*)pVal, iAdd);
|
||||
#if !defined(NDEBUG)
|
||||
size_t v = (size_t)
|
||||
#endif
|
||||
InterlockedAdd64((volatile int64*)pVal, iAdd);
|
||||
#else
|
||||
size_t v = (size_t)CryInterlockedExchangeAdd((volatile long*)pVal, (long)iAdd);
|
||||
v += iAdd;
|
||||
|
||||
Reference in New Issue
Block a user