Initial commit

This commit is contained in:
alexpete
2021-03-05 11:26:34 -08:00
commit a10351f38d
27091 changed files with 5521199 additions and 0 deletions
@@ -0,0 +1,81 @@
#
# 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.
#
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
include(${pal_dir}/NULLRenderer_traits_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
if(CRYRENDER_TRAIT_BUILD_NULL_RENDERER_SUPPORTED)
ly_add_target(
NAME CryRenderNULL.Static STATIC
NAMESPACE Legacy
FILES_CMAKE
core_null_renderer_files.cmake
${pal_dir}/core_null_renderer_files_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
PLATFORM_INCLUDE_FILES
${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
COMPILE_DEFINITIONS
PUBLIC
NULL_RENDERER
_RENDERER
INCLUDE_DIRECTORIES
PUBLIC
.
..
../Common
../XRenderD3D9
${pal_dir}
BUILD_DEPENDENCIES
PUBLIC
3rdParty::LZSS
3rdParty::Lzma
Legacy::CryCommon
Legacy::CryCommon.EngineSettings.Static
)
if (NOT LY_MONOLITHIC_GAME) # Only Atom is supported in monolithic builds
ly_add_target(
NAME CryRenderNULL ${PAL_TRAIT_MONOLITHIC_DRIVEN_LIBRARY_TYPE}
NAMESPACE Legacy
FILES_CMAKE
core_null_renderer_shared_files.cmake
INCLUDE_DIRECTORIES
PRIVATE
.
BUILD_DEPENDENCIES
PRIVATE
Legacy::CryRenderNULL.Static
)
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
ly_add_target(
NAME CryRenderNULL.Tests MODULE
NAMESPACE Legacy
FILES_CMAKE
core_null_renderer_test_files.cmake
INCLUDE_DIRECTORIES
PRIVATE
.
BUILD_DEPENDENCIES
PRIVATE
AZ::AzTest
Legacy::CryRenderNULL.Static
)
# SPEC-1548: disabling since it fails in mac with memory issues
#ly_add_googletest(
# NAME Legacy::CryRenderNULL.Tests
#)
endif()
endif()
endif()
@@ -0,0 +1,29 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
#include "RenderDll_precompiled.h"
#include "../Common/RendElements/CRELensOptics.h"
CRELensOptics::CRELensOptics(void)
{
mfSetType(eDATA_LensOptics);
mfUpdateFlags(FCEF_TRANSFORM);
}
CRELensOptics::~CRELensOptics(void) {}
bool CRELensOptics::mfCompile([[maybe_unused]] CParserBin& Parser, [[maybe_unused]] SParserFrame& Frame){ return true; }
void CRELensOptics::mfPrepare([[maybe_unused]] bool bCheckOverflow) {}
bool CRELensOptics::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm) { return true; }
@@ -0,0 +1,111 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Russian resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
#ifdef _WIN32
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
#pragma code_page(1251)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // Russian resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// German (Germany) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
#ifdef _WIN32
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "000904b0"
BEGIN
VALUE "CompanyName", "Amazon.com, Inc."
VALUE "FileVersion", "1, 0, 0, 1"
VALUE "LegalCopyright", "Portions of this file Copyright (c) Amazon.com, Inc. or its affiliates. All Rights Reserved. Original file Copyright (c) Crytek GMBH. Used under license by Amazon.com, Inc. and its affiliates."
VALUE "ProductName", "Lumberyard"
VALUE "ProductVersion", "1, 0, 0, 1"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x9, 1200
END
END
#endif // German (Germany) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
@@ -0,0 +1,464 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
#include "RenderDll_precompiled.h"
#include "NULL_Renderer.h"
#include "NULLRenderAuxGeom.h"
// CryTek undefs some defines from WinBase.h...so let's redefine them here
#if defined(WIN32) || defined(WIN64)
#ifdef UNICODE
#define RegisterClass RegisterClassW
#else
#define RegisterClass RegisterClassA
#endif // !UNICODE
#endif
CNULLRenderAuxGeom* CNULLRenderAuxGeom::s_pThis = NULL;
#ifdef ENABLE_WGL_DEBUG_RENDERER
static const float W = 800.0f;
static const float H = 600.0f;
static const float THETA = 5.0f;
static const Vec3 VUP(0.0f, 0.0f, 1.0f);
bool CNULLRenderAuxGeom::s_active = false;
bool CNULLRenderAuxGeom::s_hidden = true;
void CNULLRenderAuxGeom::EnableOpenGL()
{
CCamera& camera = gEnv->pSystem->GetViewCamera();
camera.SetFrustum(W, H);
const float FOV = camera.GetFov() / PI * 180.0f;
const float PNR = camera.GetNearPlane();
const float PFR = camera.GetFarPlane();
PIXELFORMATDESCRIPTOR pfd;
int format;
// get the device context (DC)
m_hdc = GetDC(m_hwnd);
// set the pixel format for the DC
ZeroMemory(&pfd, sizeof(pfd));
pfd.nSize = sizeof(pfd);
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 24;
pfd.cDepthBits = 16;
pfd.iLayerType = PFD_MAIN_PLANE;
format = ChoosePixelFormat(m_hdc, &pfd);
SetPixelFormat(m_hdc, format, &pfd);
// create and enable the render context (RC)
m_glrc = wglCreateContext(m_hdc);
wglMakeCurrent(m_hdc, m_glrc);
m_qobj = gluNewQuadric();
glShadeModel(GL_FLAT);
glPolygonMode(GL_FRONT, GL_FILL);
glEnable(GL_DEPTH_TEST);
glViewport(0, 0, W, H);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(FOV, W / H, PNR, PFR);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
void CNULLRenderAuxGeom::DisableOpenGL()
{
gluDeleteQuadric(m_qobj);
wglMakeCurrent(NULL, NULL);
wglDeleteContext(m_glrc);
ReleaseDC(m_hwnd, m_hdc);
}
#endif
CNULLRenderAuxGeom::CNULLRenderAuxGeom(CNULLRenderer& renderer)
: m_renderer(&renderer)
{
#ifdef ENABLE_WGL_DEBUG_RENDERER
const char* wndClassName = "DebugRenderer";
// register window class
WNDCLASS wc;
wc.style = CS_OWNDC;
wc.lpfnWndProc = WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = GetModuleHandle(NULL);
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
wc.lpszMenuName = NULL;
wc.lpszClassName = wndClassName;
RegisterClass(&wc);
// create main window
m_hwnd = CreateWindow(
wndClassName, wndClassName,
WS_CAPTION | WS_POPUP,
0, 0, W, H,
NULL, NULL, wc.hInstance, NULL);
ShowWindow(m_hwnd, SW_HIDE);
UpdateWindow(m_hwnd);
EnableOpenGL();
m_eye.Set(0.0f, 0.0f, 0.0f);
m_dir.Set(0.0f, 1.0f, 0.0f);
m_up.Set(0.0f, 0.0f, 1.0f);
m_updateSystemView = true;
REGISTER_COMMAND("r_debug_renderer_show_window", DebugRendererShowWindow, VF_NULL, "");
REGISTER_COMMAND("r_debug_renderer_set_eye_pos", DebugRendererSetEyePos, VF_NULL, "");
REGISTER_COMMAND("r_debug_renderer_update_system_view", DebugRendererUpdateSystemView, VF_NULL, "");
#endif
}
CNULLRenderAuxGeom::~CNULLRenderAuxGeom()
{
#ifdef ENABLE_WGL_DEBUG_RENDERER
DisableOpenGL();
DestroyWindow(m_hwnd);
#endif
}
void CNULLRenderAuxGeom::BeginFrame()
{
#ifdef ENABLE_WGL_DEBUG_RENDERER
FUNCTION_PROFILER(gEnv->pSystem, PROFILE_RENDERER);
{
m_dir.normalize();
m_up.normalize();
Vec3 right = m_dir ^ m_up;
if (s_active)
{
Matrix34 m;
m.SetIdentity();
if (GetAsyncKeyState('W') & 0x8000)
{
m.AddTranslation(m_dir);
}
if (GetAsyncKeyState('S') & 0x8000)
{
m.AddTranslation(-m_dir);
}
if (GetAsyncKeyState('A') & 0x8000)
{
m.AddTranslation(-right);
}
if (GetAsyncKeyState('D') & 0x8000)
{
m.AddTranslation(right);
}
m_eye = m * m_eye;
m.SetIdentity();
if (GetAsyncKeyState(VK_RIGHT) & 0x8000)
{
m.SetRotationAA(-PI / 180.0f * THETA, VUP); // !m_up
}
if (GetAsyncKeyState(VK_LEFT) & 0x8000)
{
m.SetRotationAA(PI / 180.0f * THETA, VUP); // !m_up
}
if (GetAsyncKeyState(VK_UP) & 0x8000)
{
m.SetRotationAA(PI / 180.0f * THETA, right);
}
if (GetAsyncKeyState(VK_DOWN) & 0x8000)
{
m.SetRotationAA(-PI / 180.0f * THETA, right);
}
m_up = m * m_up;
m_dir = m * m_dir;
}
if (m_updateSystemView)
{
Matrix34 m(Matrix33::CreateOrientation(m_dir, m_up, 0), m_eye);
gEnv->pSystem->GetViewCamera().SetMatrix(m);
}
else
{
const Matrix34& viewMatrix = gEnv->pSystem->GetViewCamera().GetMatrix();
m_eye = viewMatrix.GetTranslation();
m_dir = viewMatrix.GetColumn1();
m_up = viewMatrix.GetColumn2();
}
}
#endif
}
void CNULLRenderAuxGeom::EndFrame()
{
#ifdef ENABLE_WGL_DEBUG_RENDERER
FUNCTION_PROFILER(gEnv->pSystem, PROFILE_RENDERER);
if (!s_hidden)
{
glLoadIdentity();
Vec3 at = m_eye + m_dir;
gluLookAt(m_eye.x, m_eye.y, m_eye.z, at.x, at.y, at.z, m_up.x, m_up.y, m_up.z);
glClearColor(0.0f, 0.0f, 0.3f, 0.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glColor3f(1.0f, 0.0f, 0.0f);
gluSphere(m_qobj, 1.0f, 32, 32);
glInterleavedArrays(GL_C3F_V3F, 0, &m_points[0]);
glDrawArrays(GL_POINTS, 0, m_points.size());
glInterleavedArrays(GL_C3F_V3F, 0, &m_lines[0]);
glDrawArrays(GL_LINES, 0, m_lines.size() * 2);
for (size_t i = 0; i < m_polyLines.size(); ++i)
{
const SPolyLine& polyline = m_polyLines[i];
glInterleavedArrays(GL_C3F_V3F, 0, &polyline.points[0]);
glDrawArrays(GL_LINE_STRIP, 0, polyline.points.size());
}
glInterleavedArrays(GL_C3F_V3F, 0, &m_triangles[0]);
glDrawArrays(GL_TRIANGLES, 0, m_triangles.size() * 3);
for (size_t i = 0; i < m_spheres.size(); ++i)
{
glColor3fv(m_spheres[i].p.color);
glPushMatrix();
glLoadIdentity();
glTranslatef(m_spheres[i].p.vertex[0], m_spheres[i].p.vertex[1], m_spheres[i].p.vertex[2]);
gluSphere(m_qobj, m_spheres[i].r, 32, 32);
glPopMatrix();
}
glFlush();
SwapBuffers(m_hdc);
}
m_points.resize(0);
m_lines.resize(0);
m_polyLines.resize(0);
m_triangles.resize(0);
m_spheres.resize(0);
#endif
}
void CNULLRenderAuxGeom::DrawPoint([[maybe_unused]] const Vec3& v, [[maybe_unused]] const ColorB& col, [[maybe_unused]] uint8 size /* = 1 */)
{
#ifdef ENABLE_WGL_DEBUG_RENDERER
m_points.push_back(SPoint(v, col));
#endif
}
void CNULLRenderAuxGeom::DrawPoints([[maybe_unused]] const Vec3* v, [[maybe_unused]] uint32 numPoints, [[maybe_unused]] const ColorB* col, [[maybe_unused]] uint8 size /* = 1 */)
{
#ifdef ENABLE_WGL_DEBUG_RENDERER
for (uint32 i = 0; i < numPoints; ++i)
{
m_points.push_back(SPoint(v[i], *col));
}
#endif
}
void CNULLRenderAuxGeom::DrawPoints([[maybe_unused]] const Vec3* v, [[maybe_unused]] uint32 numPoints, [[maybe_unused]] const ColorB& col, [[maybe_unused]] uint8 size /* = 1 */)
{
#ifdef ENABLE_WGL_DEBUG_RENDERER
for (uint32 i = 0; i < numPoints; ++i)
{
m_points.push_back(SPoint(v[i], col));
}
#endif
}
void CNULLRenderAuxGeom::DrawLine([[maybe_unused]] const Vec3& v0, [[maybe_unused]] const ColorB& colV0, [[maybe_unused]] const Vec3& v1, [[maybe_unused]] const ColorB& colV1, [[maybe_unused]] float thickness /* = 1::0f */)
{
#ifdef ENABLE_WGL_DEBUG_RENDERER
m_lines.push_back(SLine(SPoint(v0, colV0), SPoint(v1, colV1)));
#endif
}
void CNULLRenderAuxGeom::DrawLines([[maybe_unused]] const Vec3* v, [[maybe_unused]] uint32 numPoints, [[maybe_unused]] const ColorB& col, [[maybe_unused]] float thickness /* = 1::0f */)
{
#ifdef ENABLE_WGL_DEBUG_RENDERER
assert((numPoints >= 2) && (0 == (numPoints & 1)));
for (uint32 i = 0; i < numPoints; i += 2)
{
m_lines.push_back(SLine(SPoint(v[i], col), SPoint(v[i + 1], col)));
}
#endif
}
void CNULLRenderAuxGeom::DrawLines([[maybe_unused]] const Vec3* v, [[maybe_unused]] uint32 numPoints, [[maybe_unused]] const ColorB* col, [[maybe_unused]] float thickness /* = 1::0f */)
{
#ifdef ENABLE_WGL_DEBUG_RENDERER
assert((numPoints >= 2) && (0 == (numPoints & 1)));
for (uint32 i = 0; i < numPoints; i += 2)
{
m_lines.push_back(SLine(SPoint(v[i], *col), SPoint(v[i + 1], *col)));
}
#endif
}
void CNULLRenderAuxGeom::DrawLines([[maybe_unused]] const Vec3* v, [[maybe_unused]] uint32 numPoints, [[maybe_unused]] const vtx_idx* ind, [[maybe_unused]] uint32 numIndices, [[maybe_unused]] const ColorB& col, [[maybe_unused]] float thickness /* = 1::0f */)
{
#ifdef ENABLE_WGL_DEBUG_RENDERER
assert(numPoints >= 2);
assert((numIndices >= 2) && (0 == (numIndices & 1)));
for (uint32 i = 0; i < numIndices; i += 2)
{
vtx_idx i0 = ind[i], i1 = ind[i + 1];
assert(i0 < numPoints && i1 < numPoints);
m_lines.push_back(SLine(SPoint(v[i0], col), SPoint(v[i1], col)));
}
#endif
}
void CNULLRenderAuxGeom::DrawLines([[maybe_unused]] const Vec3* v, [[maybe_unused]] uint32 numPoints, [[maybe_unused]] const vtx_idx* ind, [[maybe_unused]] uint32 numIndices, [[maybe_unused]] const ColorB* col, [[maybe_unused]] float thickness /* = 1::0f */)
{
#ifdef ENABLE_WGL_DEBUG_RENDERER
assert(numPoints >= 2);
assert((numIndices >= 2) && (0 == (numIndices & 1)));
for (uint32 i = 0; i < numIndices; i += 2)
{
vtx_idx i0 = ind[i], i1 = ind[i + 1];
assert(i0 < numPoints && i1 < numPoints);
m_lines.push_back(SLine(SPoint(v[i0], *col), SPoint(v[i1], *col)));
}
#endif
}
void CNULLRenderAuxGeom::DrawPolyline([[maybe_unused]] const Vec3* v, [[maybe_unused]] uint32 numPoints, [[maybe_unused]] bool closed, [[maybe_unused]] const ColorB& col, [[maybe_unused]] float thickness /* = 1::0f */)
{
#ifdef ENABLE_WGL_DEBUG_RENDERER
assert(numPoints >= 2);
assert(!closed || numPoints >= 3); // if "closed" then we need at least three vertices
m_polyLines.resize(m_polyLines.size() + 1);
SPolyLine& polyline = m_polyLines[m_polyLines.size() - 1];
for (uint32 i = 0; i < numPoints; ++i)
{
polyline.points.push_back(SPoint(v[i], col));
}
if (closed)
{
polyline.points.push_back(SPoint(v[0], col));
}
#endif
}
void CNULLRenderAuxGeom::DrawPolyline([[maybe_unused]] const Vec3* v, [[maybe_unused]] uint32 numPoints, [[maybe_unused]] bool closed, [[maybe_unused]] const ColorB* col, [[maybe_unused]] float thickness /* = 1::0f */)
{
#ifdef ENABLE_WGL_DEBUG_RENDERER
assert(numPoints >= 2);
assert(!closed || numPoints >= 3); // if "closed" then we need at least three vertices
m_polyLines.resize(m_polyLines.size() + 1);
SPolyLine& polyline = m_polyLines[m_polyLines.size() - 1];
for (uint32 i = 0; i < numPoints; ++i)
{
polyline.points.push_back(SPoint(v[i], *col));
}
if (closed)
{
polyline.points.push_back(SPoint(v[0], *col));
}
#endif
}
void CNULLRenderAuxGeom::DrawTriangle([[maybe_unused]] const Vec3& v0, [[maybe_unused]] const ColorB& colV0, [[maybe_unused]] const Vec3& v1, [[maybe_unused]] const ColorB& colV1, [[maybe_unused]] const Vec3& v2, [[maybe_unused]] const ColorB& colV2)
{
#ifdef ENABLE_WGL_DEBUG_RENDERER
FUNCTION_PROFILER(gEnv->pSystem, PROFILE_RENDERER);
m_triangles.push_back(STriangle(SPoint(v0, colV0), SPoint(v1, colV1), SPoint(v2, colV2)));
#endif
}
void CNULLRenderAuxGeom::DrawTriangles([[maybe_unused]] const Vec3* v, [[maybe_unused]] uint32 numPoints, [[maybe_unused]] const ColorB& col)
{
#ifdef ENABLE_WGL_DEBUG_RENDERER
assert((numPoints >= 3) && (0 == (numPoints % 3)));
FUNCTION_PROFILER(gEnv->pSystem, PROFILE_RENDERER);
for (size_t i = 0; i < numPoints; i += 3)
{
m_triangles.push_back(STriangle(SPoint(v[i], col), SPoint(v[i + 1], col), SPoint(v[i + 2], col)));
}
#endif
}
void CNULLRenderAuxGeom::DrawTriangles([[maybe_unused]] const Vec3* v, [[maybe_unused]] uint32 numPoints, [[maybe_unused]] const ColorB* col)
{
#ifdef ENABLE_WGL_DEBUG_RENDERER
assert((numPoints >= 3) && (0 == (numPoints % 3)));
FUNCTION_PROFILER(gEnv->pSystem, PROFILE_RENDERER);
for (size_t i = 0; i < numPoints; i += 3)
{
m_triangles.push_back(STriangle(SPoint(v[i], *col), SPoint(v[i + 1], *col), SPoint(v[i + 2], *col)));
}
#endif
}
void CNULLRenderAuxGeom::DrawTriangles([[maybe_unused]] const Vec3* v, [[maybe_unused]] uint32 numPoints, [[maybe_unused]] const vtx_idx* ind, [[maybe_unused]] uint32 numIndices, [[maybe_unused]] const ColorB& col)
{
#ifdef ENABLE_WGL_DEBUG_RENDERER
assert(numPoints >= 3);
assert((numIndices >= 3) && (0 == (numIndices % 3)));
FUNCTION_PROFILER(gEnv->pSystem, PROFILE_RENDERER);
for (size_t i = 0; i < numIndices; i += 3)
{
vtx_idx i0 = ind[i], i1 = ind[i + 1], i2 = ind[i + 2];
assert(i0 < numPoints && i1 < numPoints && i2 < numPoints);
m_triangles.push_back(STriangle(SPoint(v[i0], col), SPoint(v[i1], col), SPoint(v[i2], col)));
}
#endif
}
void CNULLRenderAuxGeom::DrawTriangles([[maybe_unused]] const Vec3* v, [[maybe_unused]] uint32 numPoints, [[maybe_unused]] const vtx_idx* ind, [[maybe_unused]] uint32 numIndices, [[maybe_unused]] const ColorB* col)
{
#ifdef ENABLE_WGL_DEBUG_RENDERER
assert(numPoints >= 3);
assert((numIndices >= 3) && (0 == (numIndices % 3)));
FUNCTION_PROFILER(gEnv->pSystem, PROFILE_RENDERER);
for (size_t i = 0; i < numIndices; i += 3)
{
vtx_idx i0 = ind[i], i1 = ind[i + 1], i2 = ind[i + 2];
assert(i0 < numPoints && i1 < numPoints && i2 < numPoints);
m_triangles.push_back(STriangle(SPoint(v[i0], *col), SPoint(v[i1], *col), SPoint(v[i2], *col)));
}
#endif
}
void CNULLRenderAuxGeom::DrawSphere([[maybe_unused]] const Vec3& pos, [[maybe_unused]] float radius, [[maybe_unused]] const ColorB& col, [[maybe_unused]] bool drawShaded)
{
#ifdef ENABLE_WGL_DEBUG_RENDERER
m_spheres.push_back(SSphere(SPoint(pos, col), radius));
#endif
}
@@ -0,0 +1,274 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
#ifndef CRYINCLUDE_CRYENGINE_RENDERDLL_XRENDERNULL_NULLRENDERAUXGEOM_H
#define CRYINCLUDE_CRYENGINE_RENDERDLL_XRENDERNULL_NULLRENDERAUXGEOM_H
#pragma once
#include "../Common/RenderAuxGeom.h"
class CNULLRenderer;
class ICrySizer;
#if (defined(WIN32) || defined(WIN64)) && !defined(_RELEASE)
#define ENABLE_WGL_DEBUG_RENDERER
#endif
#ifdef ENABLE_WGL_DEBUG_RENDERER
#include <windows.h>
#include <gl/GL.h>
#include <gl/GLU.h>
#endif
class CNULLRenderAuxGeom
: public IRenderAuxGeom
{
public:
// interface
virtual void SetRenderFlags([[maybe_unused]] const SAuxGeomRenderFlags& renderFlags) {}
virtual SAuxGeomRenderFlags GetRenderFlags() { return SAuxGeomRenderFlags(); }
virtual void Flush() {}
virtual void Commit([[maybe_unused]] uint frames = 0) {}
virtual void Process() {}
virtual void DrawPoint(const Vec3& v, const ColorB& col, uint8 size = 1);
virtual void DrawPoints(const Vec3* v, uint32 numPoints, const ColorB& col, uint8 size = 1);
virtual void DrawPoints(const Vec3* v, uint32 numPoints, const ColorB* col, uint8 size = 1);
virtual void DrawLine(const Vec3& v0, const ColorB& colV0, const Vec3& v1, const ColorB& colV1, float thickness = 1.0f);
virtual void DrawLines(const Vec3* v, uint32 numPoints, const ColorB& col, float thickness = 1.0f);
virtual void DrawLines(const Vec3* v, uint32 numPoints, const ColorB* col, float thickness = 1.0f);
virtual void DrawLines(const Vec3* v, uint32 numPoints, const vtx_idx* ind, uint32 numIndices, const ColorB& col, float thickness = 1.0f);
virtual void DrawLines(const Vec3* v, uint32 numPoints, const vtx_idx* ind, uint32 numIndices, const ColorB* col, float thickness = 1.0f);
virtual void DrawPolyline(const Vec3* v, uint32 numPoints, bool closed, const ColorB& col, float thickness = 1.0f);
virtual void DrawPolyline(const Vec3* v, uint32 numPoints, bool closed, const ColorB* col, float thickness = 1.0f);
virtual void DrawTriangle(const Vec3& v0, const ColorB& colV0, const Vec3& v1, const ColorB& colV1, const Vec3& v2, const ColorB& colV2);
virtual void DrawTriangles(const Vec3* v, uint32 numPoints, const ColorB& col);
virtual void DrawTriangles(const Vec3* v, uint32 numPoints, const ColorB* col);
virtual void DrawTriangles(const Vec3* v, uint32 numPoints, const vtx_idx* ind, uint32 numIndices, const ColorB& col);
virtual void DrawTriangles(const Vec3* v, uint32 numPoints, const vtx_idx* ind, uint32 numIndices, const ColorB* col);
virtual void DrawQuad([[maybe_unused]] float width, [[maybe_unused]] float height, [[maybe_unused]] const Matrix34& matWorld, [[maybe_unused]] const ColorB& col, [[maybe_unused]] bool drawShaded = true) {}
virtual void DrawAABB([[maybe_unused]] const AABB& aabb, [[maybe_unused]] bool bSolid, [[maybe_unused]] const ColorB& col, [[maybe_unused]] const EBoundingBoxDrawStyle& bbDrawStyle) {}
virtual void DrawAABBs([[maybe_unused]] const AABB* aabb, [[maybe_unused]] uint32 aabbCount, [[maybe_unused]] bool bSolid, [[maybe_unused]] const ColorB& col, [[maybe_unused]] const EBoundingBoxDrawStyle& bbDrawStyle) {}
virtual void DrawAABB([[maybe_unused]] const AABB& aabb, [[maybe_unused]] const Matrix34& matWorld, [[maybe_unused]] bool bSolid, [[maybe_unused]] const ColorB& col, [[maybe_unused]] const EBoundingBoxDrawStyle& bbDrawStyle) {}
virtual void DrawOBB([[maybe_unused]] const OBB& obb, [[maybe_unused]] const Vec3& pos, [[maybe_unused]] bool bSolid, [[maybe_unused]] const ColorB& col, [[maybe_unused]] const EBoundingBoxDrawStyle& bbDrawStyle) {}
virtual void DrawOBB([[maybe_unused]] const OBB& obb, [[maybe_unused]] const Matrix34& matWorld, [[maybe_unused]] bool bSolid, [[maybe_unused]] const ColorB& col, [[maybe_unused]] const EBoundingBoxDrawStyle& bbDrawStyle) {}
virtual void DrawSphere(const Vec3& pos, float radius, const ColorB& col, bool drawShaded = true);
virtual void DrawDisk([[maybe_unused]] const Vec3& pos, [[maybe_unused]] const Vec3& dir, [[maybe_unused]] float radius, [[maybe_unused]] const ColorB& col, [[maybe_unused]] bool drawShaded = true) {}
virtual void DrawCone([[maybe_unused]] const Vec3& pos, [[maybe_unused]] const Vec3& dir, [[maybe_unused]] float radius, [[maybe_unused]] float height, [[maybe_unused]] const ColorB& col, [[maybe_unused]] bool drawShaded = true) {}
virtual void DrawCylinder([[maybe_unused]] const Vec3& pos, [[maybe_unused]] const Vec3& dir, [[maybe_unused]] float radius, [[maybe_unused]] float height, [[maybe_unused]] const ColorB& col, [[maybe_unused]] bool drawShaded = true) {}
virtual void DrawBone([[maybe_unused]] const Vec3& rParent, [[maybe_unused]] const Vec3& rBone, [[maybe_unused]] ColorB col) {}
virtual void RenderText([[maybe_unused]] Vec3 pos, [[maybe_unused]] SDrawTextInfo& ti, [[maybe_unused]] const char* forma, [[maybe_unused]] va_list args) {}
public:
static CNULLRenderAuxGeom* Create(CNULLRenderer& renderer)
{
if (s_pThis == NULL)
{
s_pThis = new CNULLRenderAuxGeom(renderer);
}
return s_pThis;
}
public:
~CNULLRenderAuxGeom();
void BeginFrame();
void EndFrame();
private:
CNULLRenderAuxGeom(CNULLRenderer& renderer);
CNULLRenderer* m_renderer;
static CNULLRenderAuxGeom* s_pThis;
#ifdef ENABLE_WGL_DEBUG_RENDERER
static void DebugRendererShowWindow([[maybe_unused]] IConsoleCmdArgs* args)
{
if (!s_pThis)
{
return;
}
ShowWindow(s_pThis->m_hwnd, s_hidden ? SW_SHOWNA : SW_HIDE);
s_hidden = !s_hidden;
}
static void DebugRendererSetEyePos(IConsoleCmdArgs* args)
{
if (!s_pThis)
{
return;
}
if (args->GetArgCount() != 4)
{
return;
}
Vec3 pos;
pos.x = (float)atof(args->GetArg(1));
pos.y = (float)atof(args->GetArg(2));
pos.z = (float)atof(args->GetArg(3));
s_pThis->m_eye = pos;
}
static void DebugRendererUpdateSystemView(IConsoleCmdArgs* args)
{
if (!s_pThis)
{
return;
}
if (args->GetArgCount() != 2)
{
return;
}
s_pThis->m_updateSystemView = ((int)atoi(args->GetArg(1)) != 0);
}
HWND m_hwnd;
HDC m_hdc;
HGLRC m_glrc;
GLUquadricObj* m_qobj;
// Window Procedure
static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_CREATE:
return 0;
case WM_CLOSE:
PostQuitMessage(0);
return 0;
case WM_DESTROY:
return 0;
case WM_ACTIVATE:
if (LOWORD(wParam) != WA_INACTIVE)
{
s_active = true;
}
else
{
s_active = false;
}
return 0;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
}
void EnableOpenGL();
void DisableOpenGL();
struct SPoint // GL_C3F_V3F
{
GLfloat color[3]; // rgb
GLfloat vertex[3]; // xyz
SPoint() {}
SPoint(const Vec3& v, const ColorB& c)
{
color[0] = c.r / 255.f;
color[1] = c.g / 255.f;
color[2] = c.b / 255.f;
vertex[0] = v.x;
vertex[1] = v.y;
vertex[2] = v.z;
}
const SPoint& operator=(const SPoint& rhs)
{
memcpy(color, rhs.color, sizeof(color));
memcpy(vertex, rhs.vertex, sizeof(vertex));
return *this;
}
};
std::vector<SPoint> m_points;
struct SLine
{
SPoint points[2];
SLine() {}
SLine(const SPoint& p0, const SPoint& p1)
{
points[0] = p0;
points[1] = p1;
}
};
std::vector<SLine> m_lines;
struct SPolyLine
{
std::vector<SPoint> points;
};
std::vector<SPolyLine> m_polyLines;
struct STriangle
{
SPoint points[3];
STriangle() {}
STriangle(const SPoint& p0, const SPoint& p1, const SPoint& p2)
{
points[0] = p0;
points[1] = p1;
points[2] = p2;
}
};
std::vector<STriangle> m_triangles;
struct SSphere
{
SPoint p;
float r;
SSphere() {}
SSphere(const SPoint& p_, float r_)
: p(p_)
, r(r_) {}
};
std::vector<SSphere> m_spheres;
Vec3 m_eye, m_dir, m_up;
bool m_updateSystemView;
static bool s_active;
static bool s_hidden;
#endif
};
#endif // NULL_RENDER_AUX_GEOM_H
@@ -0,0 +1,192 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
#include "RenderDll_precompiled.h"
//////////////////////////////////////////////////////////////////////////////////////
buffer_handle_t CDeviceBufferManager::Create_Locked(BUFFER_BIND_TYPE, BUFFER_USAGE, size_t)
{
return buffer_handle_t();
}
//////////////////////////////////////////////////////////////////////////////////////
void CDeviceBufferManager::Destroy_Locked(buffer_handle_t)
{
}
//////////////////////////////////////////////////////////////////////////////////////
void* CDeviceBufferManager::BeginRead_Locked([[maybe_unused]] buffer_handle_t handle)
{
return nullptr;
}
//////////////////////////////////////////////////////////////////////////////////////
void* CDeviceBufferManager::BeginWrite_Locked([[maybe_unused]] buffer_handle_t handle)
{
return nullptr;
}
//////////////////////////////////////////////////////////////////////////////////////
void CDeviceBufferManager::EndReadWrite_Locked([[maybe_unused]] buffer_handle_t handle)
{
}
//////////////////////////////////////////////////////////////////////////////////////
bool CDeviceBufferManager::UpdateBuffer_Locked([[maybe_unused]] buffer_handle_t handle, const void*, size_t)
{
return false;
}
//////////////////////////////////////////////////////////////////////////////////////
size_t CDeviceBufferManager::Size_Locked(buffer_handle_t)
{
return 0;
}
//////////////////////////////////////////////////////////////////////////////////////
CDeviceBufferManager::CDeviceBufferManager()
{
}
//////////////////////////////////////////////////////////////////////////////////////
CDeviceBufferManager::~CDeviceBufferManager()
{
}
//////////////////////////////////////////////////////////////////////////////////////
void CDeviceBufferManager::LockDevMan()
{
}
//////////////////////////////////////////////////////////////////////////////////////
void CDeviceBufferManager::UnlockDevMan()
{
}
//////////////////////////////////////////////////////////////////////////////////////
bool CDeviceBufferManager::Init()
{
return true;
}
//////////////////////////////////////////////////////////////////////////////////////
bool CDeviceBufferManager::Shutdown()
{
return true;
}
//////////////////////////////////////////////////////////////////////////////////////
void CDeviceBufferManager::Sync([[maybe_unused]] uint32 framdid)
{
}
//////////////////////////////////////////////////////////////////////////////////////
void CDeviceBufferManager::Update(uint32, [[maybe_unused]] bool called_during_loading)
{
}
//////////////////////////////////////////////////////////////////////////////////////
buffer_handle_t CDeviceBufferManager::Create(
[[maybe_unused]] BUFFER_BIND_TYPE type
, [[maybe_unused]] BUFFER_USAGE usage
, [[maybe_unused]] size_t size)
{
return ~0u;
}
//////////////////////////////////////////////////////////////////////////////////////
void CDeviceBufferManager::Destroy([[maybe_unused]] buffer_handle_t handle)
{
}
//////////////////////////////////////////////////////////////////////////////////////
void* CDeviceBufferManager::BeginRead([[maybe_unused]] buffer_handle_t handle)
{
return NULL;
}
//////////////////////////////////////////////////////////////////////////////////////
void* CDeviceBufferManager::BeginWrite([[maybe_unused]] buffer_handle_t handle)
{
return NULL;
}
//////////////////////////////////////////////////////////////////////////////////////
void CDeviceBufferManager::EndReadWrite([[maybe_unused]] buffer_handle_t handle)
{
}
//////////////////////////////////////////////////////////////////////////////////////
bool CDeviceBufferManager::UpdateBuffer([[maybe_unused]] buffer_handle_t handle, [[maybe_unused]] const void* src, [[maybe_unused]] size_t size)
{
return true;
}
/////////////////////////////////////////////////////////////
// Legacy interface
//
// Use with care, can be removed at any point!
//////////////////////////////////////////////////////////////////////////////////////
void CDeviceBufferManager::ReleaseVBuffer(CVertexBuffer* pVB)
{
SAFE_DELETE(pVB);
}
//////////////////////////////////////////////////////////////////////////////////////
void CDeviceBufferManager::ReleaseIBuffer(CIndexBuffer* pIB)
{
SAFE_DELETE(pIB);
}
//////////////////////////////////////////////////////////////////////////////////////
CVertexBuffer* CDeviceBufferManager::CreateVBuffer([[maybe_unused]] size_t nVerts, const AZ::Vertex::Format& vertexFormat, [[maybe_unused]] const char* szName, [[maybe_unused]] BUFFER_USAGE usage)
{
CVertexBuffer* pVB = new CVertexBuffer(NULL, vertexFormat);
return pVB;
}
//////////////////////////////////////////////////////////////////////////////////////
CIndexBuffer* CDeviceBufferManager::CreateIBuffer([[maybe_unused]] size_t nInds, [[maybe_unused]] const char* szNam, [[maybe_unused]] BUFFER_USAGE usage)
{
CIndexBuffer* pIB = new CIndexBuffer(NULL);
return pIB;
}
//////////////////////////////////////////////////////////////////////////////////////
bool CDeviceBufferManager::UpdateVBuffer([[maybe_unused]] CVertexBuffer* pVB, [[maybe_unused]] void* pVerts, [[maybe_unused]] size_t nVerts)
{
return true;
}
//////////////////////////////////////////////////////////////////////////////////////
bool CDeviceBufferManager::UpdateIBuffer([[maybe_unused]] CIndexBuffer* pIB, [[maybe_unused]] void* pInds, [[maybe_unused]] size_t nInds)
{
return true;
}
//////////////////////////////////////////////////////////////////////////////////////
CVertexBuffer::~CVertexBuffer()
{
}
//////////////////////////////////////////////////////////////////////////////////////
CIndexBuffer::~CIndexBuffer()
{
}
namespace AzRHI
{
ConstantBuffer::~ConstantBuffer()
{}
void ConstantBuffer::AddRef()
{}
AZ::u32 ConstantBuffer::Release()
{
return 0;
}
}
@@ -0,0 +1,55 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
// Description : NULL font functions.
#include "RenderDll_precompiled.h"
#include "NULL_Renderer.h"
#include "Common/Textures/TextureManager.h"
#include "../CryFont/FBitmap.h"
bool CNULLRenderer::FontUpdateTexture([[maybe_unused]] int nTexId, [[maybe_unused]] int X, [[maybe_unused]] int Y, [[maybe_unused]] int USize, [[maybe_unused]] int VSize, [[maybe_unused]] byte* pData)
{
return true;
}
bool CNULLRenderer::FontUploadTexture([[maybe_unused]] class CFBitmap* pBmp, [[maybe_unused]] ETEX_Format eTF)
{
return true;
}
void CNULLRenderer::FontReleaseTexture([[maybe_unused]] class CFBitmap* pBmp)
{
}
void CNULLRenderer::FontSetTexture([[maybe_unused]] class CFBitmap* pBmp, [[maybe_unused]] int nTexFiltMode)
{
}
void CNULLRenderer::FontSetTexture([[maybe_unused]] int nTexId, [[maybe_unused]] int nFilterMode)
{
}
int CNULLRenderer::FontCreateTexture([[maybe_unused]] int Width, [[maybe_unused]] int Height, [[maybe_unused]] byte* pData, [[maybe_unused]] ETEX_Format eTF, [[maybe_unused]] bool genMips, [[maybe_unused]] const char* textureName)
{
return CTextureManager::Instance()->GetNoTexture()->GetTextureID();
}
void CNULLRenderer::DrawDynVB([[maybe_unused]] SVF_P3F_C4B_T2F* pBuf, [[maybe_unused]] uint16* pInds, [[maybe_unused]] int nVerts, [[maybe_unused]] int nInds, [[maybe_unused]] const PublicRenderPrimitiveType nPrimType)
{
}
void CNULLRenderer::DrawDynUiPrimitiveList([[maybe_unused]] DynUiPrimitiveList& primitives, [[maybe_unused]] int totalNumVertices, [[maybe_unused]] int totalNumIndices)
{
}
@@ -0,0 +1,257 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
/*
Todo:
* Erradicate StretchRect usage
* Cleanup code
* When we have a proper static branching support use it instead of shader switches inside code
*/
#include "RenderDll_precompiled.h"
#include "NULL_Renderer.h"
#include "I3DEngine.h"
#include "../Common/PostProcess/PostEffects.h"
/////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
AZStd::unique_ptr<CMotionBlur::ObjectMap> CMotionBlur::m_Objects[CMotionBlur::s_maxObjectBuffers];
CThreadSafeRendererContainer<CMotionBlur::ObjectMap::value_type> CMotionBlur::m_FillData[RT_COMMAND_BUF_COUNT];
bool CPostAA::Preprocess()
{
return true;
}
void CPostAA::Render()
{
}
void CMotionBlur::InsertNewElements()
{
}
void CMotionBlur::FreeData()
{
}
void CMotionBlur::GetPrevObjToWorldMat([[maybe_unused]] CRenderObject* pObj, Matrix44A& res)
{
res = Matrix44(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
}
void CMotionBlur::OnBeginFrame()
{
}
bool CMotionBlur::Preprocess()
{
return true;
}
void CMotionBlur::Render()
{
}
bool CSunShafts::Preprocess()
{
return true;
}
void CSunShafts::Render()
{
}
void CFilterSharpening::Render()
{
}
void CFilterBlurring::Render()
{
}
void CUnderwaterGodRays::Render()
{
}
void CVolumetricScattering::Render()
{
}
void CWaterDroplets::Render()
{
}
void CWaterFlow::Render()
{
}
void CWaterRipples::AddHit([[maybe_unused]] const Vec3& vPos, [[maybe_unused]] const float scale, [[maybe_unused]] const float strength)
{
}
void CWaterRipples::DEBUG_DrawWaterHits()
{
}
bool CWaterRipples::Preprocess()
{
return true;
}
void CWaterRipples::Reset([[maybe_unused]] bool bOnSpecChange)
{
}
void CWaterRipples::Render()
{
}
void CScreenFrost::Render()
{
}
bool CRainDrops::Preprocess()
{
return true;
}
void CRainDrops::Render()
{
}
bool CFlashBang::Preprocess()
{
return true;
}
void CFlashBang::Render()
{
}
void CAlienInterference::Render()
{
}
void CGhostVision::Render()
{
}
void CHudSilhouettes::Render()
{
}
void CColorGrading::Render()
{
}
void CWaterVolume::Render()
{
}
void CSceneRain::CreateBuffers([[maybe_unused]] uint16 nVerts, [[maybe_unused]] void*& pINpVB, [[maybe_unused]] SVF_P3F_C4B_T2F* pVtxList)
{
}
int CSceneRain::CreateResources()
{
return 1;
}
void CSceneRain::Release()
{
}
void CSceneRain::Render()
{
}
bool CSceneSnow::Preprocess()
{
return true;
}
void CSceneSnow::Render()
{
}
int CSceneSnow::CreateResources()
{
return 1;
}
void CSceneSnow::Release()
{
}
void CImageGhosting::Render()
{
}
void CFilterKillCamera::Render()
{
}
void CUberGamePostProcess::Render()
{
}
void CSoftAlphaTest::Render()
{
}
void CScreenBlood::Render() { }
void CPost3DRenderer::Render()
{
}
/////////////////////////////////////////////////////////////////////////////////////////////////////
namespace WaterVolumeStaticData
{
void GetMemoryUsage([[maybe_unused]] ICrySizer* pSizer){}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////
bool CSceneRain::Preprocess() { return true; }
//void CSceneRain::Render() {}
void CSceneRain::Reset([[maybe_unused]] bool bOnSpecChange) {}
void CSceneRain::OnLostDevice() {}
const char* CSceneRain::GetName() const {return 0; }
const char* CRainDrops::GetName() const {return 0; }
/////////////////////////////////////////////////////////////////////////////////////////////////////
void CSceneSnow::Reset([[maybe_unused]] bool bOnSpecChange) {}
const char* CSceneSnow::GetName() const {return 0; }
/////////////////////////////////////////////////////////////////////////////////////////////////////
bool CREPostProcess::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////
void ScreenFader::Render()
{
}
/////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,165 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
#include "RenderDll_precompiled.h"
#include "NULL_Renderer.h"
#include "I3DEngine.h"
//=======================================================================
bool CRESky::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
bool CREHDRSky::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
bool CREFogVolume::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
bool CREWaterVolume::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
void CREWaterOcean::FrameUpdate()
{
}
void CREWaterOcean::Create([[maybe_unused]] uint32 nVerticesCount, [[maybe_unused]] SVF_P3F_C4B_T2F* pVertices, [[maybe_unused]] uint32 nIndicesCount, [[maybe_unused]] const void* pIndices, [[maybe_unused]] uint32 nIndexSizeof)
{
}
void CREWaterOcean::ReleaseOcean()
{
}
bool CREWaterOcean::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
CREOcclusionQuery::~CREOcclusionQuery()
{
mfReset();
}
void CREOcclusionQuery::mfReset()
{
m_nOcclusionID = 0;
}
uint32 CREOcclusionQuery::m_nQueriesPerFrameCounter = 0;
uint32 CREOcclusionQuery::m_nReadResultNowCounter = 0;
uint32 CREOcclusionQuery::m_nReadResultTryCounter = 0;
bool CREOcclusionQuery::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
bool CREOcclusionQuery::mfReadResult_Now(void)
{
return true;
}
bool CREOcclusionQuery::mfReadResult_Try([[maybe_unused]] uint32 nDefaultNumSamples)
{
return true;
}
bool CREOcclusionQuery::RT_ReadResult_Try([[maybe_unused]] uint32 nDefaultNumSamples)
{
return true;
}
bool CREMeshImpl::mfPreDraw([[maybe_unused]] SShaderPass* sl)
{
return true;
}
bool CREMeshImpl::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sl)
{
return true;
}
bool CREHDRProcess::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
bool CREDeferredShading::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
bool CREBeam::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sl)
{
return true;
}
bool CREImposter::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* pPass)
{
return true;
}
bool CRECloud::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* pPass)
{
return true;
}
bool CRECloud::UpdateImposter([[maybe_unused]] CRenderObject* pObj)
{
return true;
}
bool CRECloud::GenerateCloudImposter([[maybe_unused]] CShader* pShader, [[maybe_unused]] CShaderResources* pRes, [[maybe_unused]] CRenderObject* pObject)
{
return true;
}
bool CREImposter::UpdateImposter()
{
return true;
}
bool CREVolumeObject::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
#if !defined(EXCLUDE_DOCUMENTATION_PURPOSE)
bool CREPrismObject::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
#endif // EXCLUDE_DOCUMENTATION_PURPOSE
bool CREGameEffect::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
void CRELensOptics::ClearResources()
{
}
#if defined(USE_GEOM_CACHES)
bool CREGeomCache::mfDraw([[maybe_unused]] CShader* pShader, [[maybe_unused]] SShaderPass* pShaderPass)
{
return true;
}
#endif
@@ -0,0 +1,186 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
// Description : NULL device specific implementation using shaders pipeline.
#include "RenderDll_precompiled.h"
#include "NULL_Renderer.h"
#include "Common/RenderView.h"
//============================================================================================
// Init Shaders rendering
void CNULLRenderer::EF_Init()
{
bool nv = 0;
m_RP.m_MaxVerts = 600;
m_RP.m_MaxTris = 300;
//==================================================
// Init RenderObjects
{
m_RP.m_nNumObjectsInPool = 384; // magic number set by Cry. The regular pipe uses a constant set to 1024
if (m_RP.m_ObjectsPool != nullptr)
{
for (int j = 0; j < (int)(m_RP.m_nNumObjectsInPool * RT_COMMAND_BUF_COUNT); j++)
{
CRenderObject* pRendObj = &m_RP.m_ObjectsPool[j];
pRendObj->~CRenderObject();
}
CryModuleMemalignFree(m_RP.m_ObjectsPool);
}
// we use a plain allocation and placement new here to garantee the alignment, when using array new, the compiler can store it's size and break the alignment
m_RP.m_ObjectsPool = (CRenderObject*)CryModuleMemalign(sizeof(CRenderObject) * (m_RP.m_nNumObjectsInPool * RT_COMMAND_BUF_COUNT), 16);
for (int j = 0; j < (int)(m_RP.m_nNumObjectsInPool * RT_COMMAND_BUF_COUNT); j++)
{
CRenderObject* pRendObj = new(&m_RP.m_ObjectsPool[j])CRenderObject();
}
CRenderObject** arrPrefill = (CRenderObject**)(alloca(m_RP.m_nNumObjectsInPool * sizeof(CRenderObject*)));
for (int j = 0; j < RT_COMMAND_BUF_COUNT; j++)
{
for (int k = 0; k < m_RP.m_nNumObjectsInPool; ++k)
{
arrPrefill[k] = &m_RP.m_ObjectsPool[j * m_RP.m_nNumObjectsInPool + k];
}
m_RP.m_TempObjects[j].PrefillContainer(arrPrefill, m_RP.m_nNumObjectsInPool);
m_RP.m_TempObjects[j].resize(0);
}
}
// Init identity RenderObject
SAFE_DELETE(m_RP.m_pIdendityRenderObject);
m_RP.m_pIdendityRenderObject = aznew CRenderObject();
m_RP.m_pIdendityRenderObject->Init();
m_RP.m_pIdendityRenderObject->m_II.m_AmbColor = Col_White;
m_RP.m_pIdendityRenderObject->m_II.m_Matrix.SetIdentity();
m_RP.m_pIdendityRenderObject->m_RState = 0;
m_RP.m_pIdendityRenderObject->m_ObjFlags |= FOB_RENDERER_IDENDITY_OBJECT;
}
void CNULLRenderer::FX_SetClipPlane ([[maybe_unused]] bool bEnable, [[maybe_unused]] float* pPlane, [[maybe_unused]] bool bRefract)
{
}
void CNULLRenderer::FX_PipelineShutdown([[maybe_unused]] bool bFastShutdown)
{
uint32 i, j;
for (int n = 0; n < 2; n++)
{
for (j = 0; j < 2; j++)
{
for (i = 0; i < CREClientPoly::m_PolysStorage[n][j].Num(); i++)
{
CREClientPoly::m_PolysStorage[n][j][i]->Release(false);
}
CREClientPoly::m_PolysStorage[n][j].Free();
}
}
}
void CNULLRenderer::EF_Release([[maybe_unused]] int nFlags)
{
}
//==========================================================================
void CNULLRenderer::FX_SetState(int st, int AlphaRef, [[maybe_unused]] int RestoreState)
{
m_RP.m_CurState = st;
m_RP.m_CurAlphaRef = AlphaRef;
}
void CRenderer::FX_SetStencilState([[maybe_unused]] int st, [[maybe_unused]] uint32 nStencRef, [[maybe_unused]] uint32 nStencMask, [[maybe_unused]] uint32 nStencWriteMask, [[maybe_unused]] bool bForceFullReadMask)
{
}
//=================================================================================
// Initialize of the new shader pipeline (only 2d)
void CRenderer::FX_Start([[maybe_unused]] CShader* ef, [[maybe_unused]] int nTech, [[maybe_unused]] CShaderResources* Res, [[maybe_unused]] IRenderElement* re)
{
m_RP.m_Frame++;
}
void CRenderer::FX_CheckOverflow([[maybe_unused]] int nVerts, [[maybe_unused]] int nInds, [[maybe_unused]] IRenderElement* re, [[maybe_unused]] int* nNewVerts, [[maybe_unused]] int* nNewInds)
{
}
uint32 CRenderer::EF_GetDeferredLightsNum([[maybe_unused]] const eDeferredLightType eLightType)
{
return 0;
}
int CRenderer::EF_AddDeferredLight([[maybe_unused]] const CDLight& pLight, float, [[maybe_unused]] const SRenderingPassInfo& passInfo, [[maybe_unused]] const SRendItemSorter& rendItemSorter)
{
return 0;
}
void CRenderer::EF_ClearDeferredLightsList()
{
}
void CRenderer::EF_ReleaseDeferredData()
{
}
uint8 CRenderer::EF_AddDeferredClipVolume([[maybe_unused]] const IClipVolume* pClipVolume)
{
return 0;
}
bool CRenderer::EF_SetDeferredClipVolumeBlendData([[maybe_unused]] const IClipVolume* pClipVolume, [[maybe_unused]] const SClipVolumeBlendInfo& blendInfo)
{
return false;
}
void CRenderer::EF_ClearDeferredClipVolumesList()
{
}
//========================================================================================
void CNULLRenderer::EF_EndEf3D([[maybe_unused]] const int nFlags, [[maybe_unused]] const int nPrecacheUpdateId, [[maybe_unused]] const int nNearPrecacheUpdateId, [[maybe_unused]] const SRenderingPassInfo& passInfo)
{
//m_RP.m_TI[m_RP.m_nFillThreadID].m_RealTime = iTimer->GetCurrTime();
EF_RemovePolysFromScene();
int nThreadID = m_pRT->GetThreadList();
SRendItem::m_RecurseLevel[nThreadID]--;
}
//double timeFtoI, timeFtoL, timeQRound;
//int sSome;
void CNULLRenderer::EF_EndEf2D([[maybe_unused]] const bool bSort)
{
}
void CRenderView::PrepareForRendering() {}
void CRenderView::PrepareForWriting() {}
void CRenderView::ClearRenderItems() {}
void CRenderView::FreeRenderItems() {}
CRenderView::CRenderView() {}
CRenderView::~CRenderView() {}
@@ -0,0 +1,694 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
// Description : Implementation of the NULL renderer API
#include "RenderDll_precompiled.h"
#include "NULL_Renderer.h"
#include <IColorGradingController.h>
#include "IStereoRenderer.h"
#include "../Common/Textures/TextureManager.h"
#include <IEngineModule.h>
#include <CryExtension/Impl/ClassWeaver.h>
// init memory pool usage
#include "GraphicsPipeline/FurBendData.h"
#include <random> //std::random_device
CCryNameTSCRC CTexture::s_sClassName = CCryNameTSCRC("CTexture");
CCryNameTSCRC CHWShader::s_sClassNameVS = CCryNameTSCRC("CHWShader_VS");
CCryNameTSCRC CHWShader::s_sClassNamePS = CCryNameTSCRC("CHWShader_PS");
CCryNameTSCRC CShader::s_sClassName = CCryNameTSCRC("CShader");
CNULLRenderer* gcpNULL = NULL;
//////////////////////////////////////////////////////////////////////
class CNullColorGradingController
: public IColorGradingController
{
public:
virtual int LoadColorChart([[maybe_unused]] const char* pChartFilePath) const { return 0; }
virtual int LoadDefaultColorChart() const { return 0; }
virtual void UnloadColorChart([[maybe_unused]] int texID) const {}
virtual void SetLayers([[maybe_unused]] const SColorChartLayer* pLayers, [[maybe_unused]] uint32 numLayers) {}
};
//////////////////////////////////////////////////////////////////////
class CNullStereoRenderer
: public IStereoRenderer
{
public:
virtual EStereoDevice GetDevice() { return STEREO_DEVICE_NONE; }
virtual EStereoDeviceState GetDeviceState() { return STEREO_DEVSTATE_UNSUPPORTED_DEVICE; }
virtual void GetInfo(EStereoDevice* device, EStereoMode* mode, EStereoOutput* output, EStereoDeviceState* state) const
{
if (device)
{
*device = STEREO_DEVICE_NONE;
}
if (mode)
{
*mode = STEREO_MODE_NO_STEREO;
}
if (output)
{
*output = STEREO_OUTPUT_STANDARD;
}
if (state)
{
*state = STEREO_DEVSTATE_OK;
}
}
virtual bool GetStereoEnabled() { return false; }
virtual float GetStereoStrength() { return 0; }
virtual float GetMaxSeparationScene([[maybe_unused]] bool half = true) { return 0; }
virtual float GetZeroParallaxPlaneDist() { return 0; }
virtual void GetNVControlValues([[maybe_unused]] bool& stereoEnabled, [[maybe_unused]] float& stereoStrength) {};
virtual void OnHmdDeviceChanged() {}
virtual bool IsRenderingToHMD() override { return false; }
Status GetStatus() const override { return IStereoRenderer::Status::kIdle; }
};
//////////////////////////////////////////////////////////////////////
CNULLRenderer::CNULLRenderer()
{
gcpNULL = this;
m_pNULLRenderAuxGeom = CNULLRenderAuxGeom::Create(*this);
m_pNULLColorGradingController = new CNullColorGradingController();
m_pNULLStereoRenderer = new CNullStereoRenderer();
m_pixelAspectRatio = 1.0f;
}
//////////////////////////////////////////////////////////////////////////
bool QueryIsFullscreen()
{
return false;
}
#include <stdio.h>
//////////////////////////////////////////////////////////////////////
CNULLRenderer::~CNULLRenderer()
{
ShutDown();
delete m_pNULLRenderAuxGeom;
delete m_pNULLColorGradingController;
delete m_pNULLStereoRenderer;
}
//////////////////////////////////////////////////////////////////////
void CNULLRenderer::EnableTMU([[maybe_unused]] bool enable)
{
}
//////////////////////////////////////////////////////////////////////
void CNULLRenderer::CheckError([[maybe_unused]] const char* comment)
{
}
//////////////////////////////////////////////////////////////////////
void CNULLRenderer::BeginFrame()
{
m_RP.m_TI[m_RP.m_nFillThreadID].m_nFrameID++;
m_RP.m_TI[m_RP.m_nFillThreadID].m_nFrameUpdateID++;
m_RP.m_TI[m_RP.m_nFillThreadID].m_RealTime = iTimer->GetCurrTime();
m_pNULLRenderAuxGeom->BeginFrame();
}
//////////////////////////////////////////////////////////////////////
bool CNULLRenderer::ChangeDisplay([[maybe_unused]] unsigned int width, [[maybe_unused]] unsigned int height, [[maybe_unused]] unsigned int bpp)
{
return false;
}
//////////////////////////////////////////////////////////////////////
void CNULLRenderer::ChangeViewport([[maybe_unused]] unsigned int x, [[maybe_unused]] unsigned int y, [[maybe_unused]] unsigned int width, [[maybe_unused]] unsigned int height, [[maybe_unused]] bool bMainViewport, [[maybe_unused]] float scaleWidth, [[maybe_unused]] float scaleHeight)
{
}
void CNULLRenderer::RenderDebug([[maybe_unused]] bool bRenderStats)
{
}
void CNULLRenderer::EndFrame()
{
//m_pNULLRenderAuxGeom->Flush(true);
m_pNULLRenderAuxGeom->EndFrame();
m_pRT->RC_EndFrame(!m_bStartLevelLoading);
}
void CNULLRenderer::TryFlush()
{
}
void CNULLRenderer::GetMemoryUsage([[maybe_unused]] ICrySizer* Sizer)
{
}
WIN_HWND CNULLRenderer::GetHWND()
{
#if defined(WIN32)
return GetDesktopWindow();
#else
return NULL;
#endif
}
bool CNULLRenderer::SetWindowIcon([[maybe_unused]] const char* path)
{
return false;
}
void TexBlurAnisotropicVertical([[maybe_unused]] CTexture* pTex, [[maybe_unused]] int nAmount, [[maybe_unused]] float fScale, [[maybe_unused]] float fDistribution, [[maybe_unused]] bool bAlphaOnly)
{
}
////////////////////////////////////////////////////////////////////////////////////////////////////////
//IMAGES DRAWING
////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
void CNULLRenderer::Draw2dImage([[maybe_unused]] float xpos, [[maybe_unused]] float ypos, [[maybe_unused]] float w, [[maybe_unused]] float h, [[maybe_unused]] int texture_id, [[maybe_unused]] float s0, [[maybe_unused]] float t0, [[maybe_unused]] float s1, [[maybe_unused]] float t1, [[maybe_unused]] float angle, [[maybe_unused]] float r, [[maybe_unused]] float g, [[maybe_unused]] float b, [[maybe_unused]] float a, [[maybe_unused]] float z)
{
}
//////////////////////////////////////////////////////////////////////
void CNULLRenderer::Push2dImage([[maybe_unused]] float xpos, [[maybe_unused]] float ypos, [[maybe_unused]] float w, [[maybe_unused]] float h, [[maybe_unused]] int texture_id, [[maybe_unused]] float s0, [[maybe_unused]] float t0, [[maybe_unused]] float s1, [[maybe_unused]] float t1, [[maybe_unused]] float angle, [[maybe_unused]] float r, [[maybe_unused]] float g, [[maybe_unused]] float b, [[maybe_unused]] float a, [[maybe_unused]] float z, [[maybe_unused]] float stereoDepth)
{
}
void CNULLRenderer::Draw2dImageList()
{
}
//////////////////////////////////////////////////////////////////////
void CNULLRenderer::DrawImage([[maybe_unused]] float xpos, [[maybe_unused]] float ypos, [[maybe_unused]] float w, [[maybe_unused]] float h, [[maybe_unused]] int texture_id, [[maybe_unused]] float s0, [[maybe_unused]] float t0, [[maybe_unused]] float s1, [[maybe_unused]] float t1, [[maybe_unused]] float r, [[maybe_unused]] float g, [[maybe_unused]] float b, [[maybe_unused]] float a, [[maybe_unused]] bool filtered)
{
}
void CNULLRenderer::DrawImageWithUV([[maybe_unused]] float xpos, [[maybe_unused]] float ypos, [[maybe_unused]] float z, [[maybe_unused]] float w, [[maybe_unused]] float h, [[maybe_unused]] int texture_id, [[maybe_unused]] float s[4], [[maybe_unused]] float t[4], [[maybe_unused]] float r, [[maybe_unused]] float g, [[maybe_unused]] float b, [[maybe_unused]] float a, [[maybe_unused]] bool filtered)
{
}
///////////////////////////////////////////
void CNULLRenderer::DrawBuffer([[maybe_unused]] CVertexBuffer* pVBuf, [[maybe_unused]] CIndexBuffer* pIBuf, [[maybe_unused]] int nNumIndices, [[maybe_unused]] int nOffsIndex, [[maybe_unused]] const PublicRenderPrimitiveType nPrmode, [[maybe_unused]] int nVertStart, [[maybe_unused]] int nVertStop)
{
}
void CNULLRenderer::DrawPrimitivesInternal([[maybe_unused]] CVertexBuffer* src, [[maybe_unused]] int vert_num, [[maybe_unused]] const eRenderPrimitiveType prim_type)
{
}
void CRenderMesh::DrawImmediately()
{
}
///////////////////////////////////////////
void CNULLRenderer::SetCullMode([[maybe_unused]] int mode)
{
}
///////////////////////////////////////////
bool CNULLRenderer::EnableFog([[maybe_unused]] bool enable)
{
return false;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////
//MISC EXTENSIONS
////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////
void CNULLRenderer::EnableVSync([[maybe_unused]] bool enable)
{
}
//////////////////////////////////////////////////////////////////////
void CNULLRenderer::SelectTMU([[maybe_unused]] int tnum)
{
}
////////////////////////////////////////////////////////////////////////////////////////////////////////
//MATRIX FUNCTIONS
////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////
void CNULLRenderer::PushMatrix()
{
}
///////////////////////////////////////////
void CNULLRenderer::RotateMatrix([[maybe_unused]] float a, [[maybe_unused]] float x, [[maybe_unused]] float y, [[maybe_unused]] float z)
{
}
void CNULLRenderer::RotateMatrix([[maybe_unused]] const Vec3& angles)
{
}
///////////////////////////////////////////
void CNULLRenderer::TranslateMatrix([[maybe_unused]] float x, [[maybe_unused]] float y, [[maybe_unused]] float z)
{
}
void CNULLRenderer::MultMatrix([[maybe_unused]] const float* mat)
{
}
void CNULLRenderer::TranslateMatrix([[maybe_unused]] const Vec3& pos)
{
}
///////////////////////////////////////////
void CNULLRenderer::ScaleMatrix([[maybe_unused]] float x, [[maybe_unused]] float y, [[maybe_unused]] float z)
{
}
///////////////////////////////////////////
void CNULLRenderer::PopMatrix()
{
}
////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNULLRenderer::LoadMatrix([[maybe_unused]] const Matrix34* src)
{
}
////////////////////////////////////////////////////////////////////////////////////////////////////////
//MISC
////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////
void CNULLRenderer::PushWireframeMode([[maybe_unused]] int mode){}
void CNULLRenderer::PopWireframeMode(){}
void CNULLRenderer::FX_PushWireframeMode([[maybe_unused]] int mode){}
void CNULLRenderer::FX_PopWireframeMode(){}
void CNULLRenderer::FX_SetWireframeMode([[maybe_unused]] int mode){}
///////////////////////////////////////////
void CNULLRenderer::SetCamera(const CCamera& cam)
{
int nThreadID = m_pRT->GetThreadList();
m_RP.m_TI[nThreadID].m_cam = cam;
}
void CNULLRenderer::GetViewport(int* x, int* y, int* width, int* height) const
{
*x = 0;
*y = 0;
*width = GetWidth();
*height = GetHeight();
}
void CNULLRenderer::SetViewport([[maybe_unused]] int x, [[maybe_unused]] int y, [[maybe_unused]] int width, [[maybe_unused]] int height, [[maybe_unused]] int id)
{
}
void CNULLRenderer::SetScissor([[maybe_unused]] int x, [[maybe_unused]] int y, [[maybe_unused]] int width, [[maybe_unused]] int height)
{
}
//////////////////////////////////////////////////////////////////////
void CNULLRenderer::GetModelViewMatrix(float* mat)
{
memcpy(mat, &m_IdentityMatrix, sizeof(m_IdentityMatrix));
}
//////////////////////////////////////////////////////////////////////
void CNULLRenderer::GetProjectionMatrix(float* mat)
{
memcpy(mat, &m_IdentityMatrix, sizeof(m_IdentityMatrix));
}
//////////////////////////////////////////////////////////////////////
ITexture* CNULLRenderer::EF_LoadTexture([[maybe_unused]] const char * nameTex, [[maybe_unused]] const uint32 flags)
{
return CTextureManager::Instance()->GetNoTexture();
}
//////////////////////////////////////////////////////////////////////
ITexture* CNULLRenderer::EF_LoadDefaultTexture(const char * nameTex)
{
return CTextureManager::Instance()->GetDefaultTexture(nameTex);
}
//////////////////////////////////////////////////////////////////////
void CNULLRenderer::DrawQuad([[maybe_unused]] const Vec3& right, [[maybe_unused]] const Vec3& up, [[maybe_unused]] const Vec3& origin, [[maybe_unused]] int nFlipmode /*=0*/)
{
}
//////////////////////////////////////////////////////////////////////
bool CNULLRenderer::ProjectToScreen([[maybe_unused]] float ptx, [[maybe_unused]] float pty, [[maybe_unused]] float ptz, [[maybe_unused]] float* sx, [[maybe_unused]] float* sy, [[maybe_unused]] float* sz)
{
return false;
}
int CNULLRenderer::UnProject([[maybe_unused]] float sx, [[maybe_unused]] float sy, [[maybe_unused]] float sz,
[[maybe_unused]] float* px, [[maybe_unused]] float* py, [[maybe_unused]] float* pz,
[[maybe_unused]] const float modelMatrix[16],
[[maybe_unused]] const float projMatrix[16],
[[maybe_unused]] const int viewport[4])
{
return 0;
}
//////////////////////////////////////////////////////////////////////
int CNULLRenderer::UnProjectFromScreen([[maybe_unused]] float sx, [[maybe_unused]] float sy, [[maybe_unused]] float sz,
[[maybe_unused]] float* px, [[maybe_unused]] float* py, [[maybe_unused]] float* pz)
{
return 0;
}
//////////////////////////////////////////////////////////////////////
bool CNULLRenderer::ScreenShot([[maybe_unused]] const char* filename, [[maybe_unused]] int width)
{
return true;
}
int CNULLRenderer::ScreenToTexture([[maybe_unused]] int nTexID)
{
return 0;
}
void CNULLRenderer::ResetToDefault()
{
}
///////////////////////////////////////////
void CNULLRenderer::SetMaterialColor([[maybe_unused]] float r, [[maybe_unused]] float g, [[maybe_unused]] float b, [[maybe_unused]] float a)
{
}
//////////////////////////////////////////////////////////////////////
void CNULLRenderer::ClearTargetsImmediately([[maybe_unused]] uint32 nFlags) {}
void CNULLRenderer::ClearTargetsImmediately([[maybe_unused]] uint32 nFlags, [[maybe_unused]] const ColorF& Colors, [[maybe_unused]] float fDepth) {}
void CNULLRenderer::ClearTargetsImmediately([[maybe_unused]] uint32 nFlags, [[maybe_unused]] const ColorF& Colors) {}
void CNULLRenderer::ClearTargetsImmediately([[maybe_unused]] uint32 nFlags, [[maybe_unused]] float fDepth) {}
void CNULLRenderer::ClearTargetsLater([[maybe_unused]] uint32 nFlags) {}
void CNULLRenderer::ClearTargetsLater([[maybe_unused]] uint32 nFlags, [[maybe_unused]] const ColorF& Colors, [[maybe_unused]] float fDepth) {}
void CNULLRenderer::ClearTargetsLater([[maybe_unused]] uint32 nFlags, [[maybe_unused]] const ColorF& Colors) {}
void CNULLRenderer::ClearTargetsLater([[maybe_unused]] uint32 nFlags, [[maybe_unused]] float fDepth) {}
void CNULLRenderer::ReadFrameBuffer([[maybe_unused]] unsigned char* pRGB, [[maybe_unused]] int nImageX, [[maybe_unused]] int nSizeX, [[maybe_unused]] int nSizeY, [[maybe_unused]] ERB_Type eRBType, [[maybe_unused]] bool bRGBA, [[maybe_unused]] int nScaledX, [[maybe_unused]] int nScaledY)
{
}
void CNULLRenderer::ReadFrameBufferFast([[maybe_unused]] uint32* pDstARGBA8, [[maybe_unused]] int dstWidth, [[maybe_unused]] int dstHeight, [[maybe_unused]] bool BGRA)
{
}
bool CNULLRenderer::CaptureFrameBufferFast([[maybe_unused]] unsigned char* pDstRGBA8, [[maybe_unused]] int destinationWidth, [[maybe_unused]] int destinationHeight)
{
return false;
}
bool CNULLRenderer::CopyFrameBufferFast([[maybe_unused]] unsigned char* pDstRGBA8, [[maybe_unused]] int destinationWidth, [[maybe_unused]] int destinationHeight)
{
return false;
}
bool CNULLRenderer::InitCaptureFrameBufferFast([[maybe_unused]] uint32 bufferWidth, [[maybe_unused]] uint32 bufferHeight)
{
return(false);
}
void CNULLRenderer::CloseCaptureFrameBufferFast(void)
{
}
bool CNULLRenderer::RegisterCaptureFrame([[maybe_unused]] ICaptureFrameListener* pCapture)
{
return(false);
}
bool CNULLRenderer::UnRegisterCaptureFrame([[maybe_unused]] ICaptureFrameListener* pCapture)
{
return(false);
}
void CNULLRenderer::CaptureFrameBufferCallBack(void)
{
}
void CNULLRenderer::SetFogColor([[maybe_unused]] const ColorF& color)
{
}
void CNULLRenderer::DrawQuad([[maybe_unused]] float dy, [[maybe_unused]] float dx, [[maybe_unused]] float dz, [[maybe_unused]] float x, [[maybe_unused]] float y, [[maybe_unused]] float z)
{
}
//////////////////////////////////////////////////////////////////////
int CNULLRenderer::CreateRenderTarget([[maybe_unused]] const char* name, [[maybe_unused]] int nWidth, [[maybe_unused]] int nHeight, [[maybe_unused]] const ColorF& cClear, [[maybe_unused]] ETEX_Format eTF)
{
return 0;
}
bool CNULLRenderer::DestroyRenderTarget([[maybe_unused]] int nHandle)
{
return true;
}
bool CNULLRenderer::ResizeRenderTarget([[maybe_unused]] int nHandle, [[maybe_unused]] int nWidth, [[maybe_unused]] int nHeight)
{
return true;
}
bool CNULLRenderer::SetRenderTarget([[maybe_unused]] int nHandle, [[maybe_unused]] SDepthTexture* pDepthSurf)
{
return true;
}
SDepthTexture* CNULLRenderer::CreateDepthSurface([[maybe_unused]] int nWidth, [[maybe_unused]] int nHeight, [[maybe_unused]] bool shaderResourceView)
{
return nullptr;
}
void CNULLRenderer::DestroyDepthSurface([[maybe_unused]] SDepthTexture* pDepthSurf)
{
}
void CNULLRenderer::WaitForParticleBuffer([[maybe_unused]] threadID nThreadId)
{
}
int CNULLRenderer::GetOcclusionBuffer([[maybe_unused]] uint16* pOutOcclBuffer, [[maybe_unused]] Matrix44* pmCamBuffe)
{
return 0;
}
IColorGradingController* CNULLRenderer::GetIColorGradingController()
{
return m_pNULLColorGradingController;
}
IStereoRenderer* CNULLRenderer::GetIStereoRenderer()
{
return m_pNULLStereoRenderer;
}
ITexture* CNULLRenderer::Create2DTexture([[maybe_unused]] const char* name, [[maybe_unused]] int width, [[maybe_unused]] int height, [[maybe_unused]] int numMips, [[maybe_unused]] int flags, [[maybe_unused]] unsigned char* data, [[maybe_unused]] ETEX_Format format)
{
return nullptr;
}
//=========================================================================================
ILog* iLog;
IConsole* iConsole;
ITimer* iTimer;
ISystem* iSystem;
StaticInstance<CNULLRenderer> g_nullRenderer;
extern "C" DLL_EXPORT IRenderer * CreateCryRenderInterface(ISystem * pSystem)
{
ModuleInitISystem(pSystem, "CryRenderer");
gbRgb = false;
iConsole = gEnv->pConsole;
iLog = gEnv->pLog;
iTimer = gEnv->pTimer;
iSystem = gEnv->pSystem;
CRenderer* rd = g_nullRenderer;
if (rd)
{
rd->InitRenderer();
}
std::random_device randDev;
srand(static_cast<int>(randDev()));
return rd;
}
class CEngineModule_CryRenderer
: public IEngineModule
{
CRYINTERFACE_SIMPLE(IEngineModule)
CRYGENERATE_SINGLETONCLASS(CEngineModule_CryRenderer, "EngineModule_CryRenderer", 0x540c91a7338e41d3, 0xaceeac9d55614450)
virtual const char* GetName() const {
return "CryRenderer";
}
virtual const char* GetCategory() const {return "CryEngine"; }
virtual bool Initialize(SSystemGlobalEnvironment& env, [[maybe_unused]] const SSystemInitParams& initParams)
{
ISystem* pSystem = env.pSystem;
env.pRenderer = CreateCryRenderInterface(pSystem);
return env.pRenderer != 0;
}
};
CRYREGISTER_SINGLETON_CLASS(CEngineModule_CryRenderer)
CEngineModule_CryRenderer::CEngineModule_CryRenderer()
{
};
CEngineModule_CryRenderer::~CEngineModule_CryRenderer()
{
};
void COcclusionQuery::Create()
{
}
void COcclusionQuery::Release()
{
}
void COcclusionQuery::BeginQuery()
{
}
void COcclusionQuery::EndQuery()
{
}
uint32 COcclusionQuery::GetVisibleSamples([[maybe_unused]] bool bAsynchronous)
{
return 0;
}
/*static*/ FurBendData& FurBendData::Get()
{
static FurBendData s_instance;
return s_instance;
}
void FurBendData::InsertNewElements()
{
}
void FurBendData::FreeData()
{
}
void FurBendData::OnBeginFrame()
{
}
TArray<SRenderLight>* CRenderer::EF_GetDeferredLights([[maybe_unused]] const SRenderingPassInfo& passInfo, [[maybe_unused]] const eDeferredLightType eLightType)
{
static TArray<SRenderLight> lights;
return &lights;
}
SRenderLight* CRenderer::EF_GetDeferredLightByID([[maybe_unused]] const uint16 nLightID, [[maybe_unused]] const eDeferredLightType eLightType)
{
return nullptr;
}
void CRenderer::BeginSpawningGeneratingRendItemJobs([[maybe_unused]] int nThreadID)
{
}
void CRenderer::BeginSpawningShadowGeneratingRendItemJobs([[maybe_unused]] int nThreadID)
{
}
void CRenderer::EndSpawningGeneratingRendItemJobs()
{
}
void CNULLRenderer::PrecacheResources()
{
}
bool CNULLRenderer::EF_PrecacheResource([[maybe_unused]] SShaderItem* pSI, [[maybe_unused]] float fMipFactorSI, [[maybe_unused]] float fTimeToReady, [[maybe_unused]] int Flags, [[maybe_unused]] int nUpdateId, [[maybe_unused]] int nCounter)
{
return true;
}
ITexture* CNULLRenderer::EF_CreateCompositeTexture([[maybe_unused]] int type, [[maybe_unused]] const char* szName, [[maybe_unused]] int nWidth, [[maybe_unused]] int nHeight, [[maybe_unused]] int nDepth, [[maybe_unused]] int nMips, [[maybe_unused]] int nFlags, [[maybe_unused]] ETEX_Format eTF, [[maybe_unused]] const STexComposition* pCompositions, [[maybe_unused]] size_t nCompositions, [[maybe_unused]] int8 nPriority)
{
return CTextureManager::Instance()->GetNoTexture();
}
void CNULLRenderer::FX_ClearTarget([[maybe_unused]] ITexture* pTex)
{
}
void CNULLRenderer::FX_ClearTarget([[maybe_unused]] SDepthTexture* pTex)
{
}
bool CNULLRenderer::FX_SetRenderTarget([[maybe_unused]] int nTarget, [[maybe_unused]] void* pTargetSurf, [[maybe_unused]] SDepthTexture* pDepthTarget, [[maybe_unused]] uint32 nTileCount)
{
return true;
}
bool CNULLRenderer::FX_PushRenderTarget([[maybe_unused]] int nTarget, [[maybe_unused]] void* pTargetSurf, [[maybe_unused]] SDepthTexture* pDepthTarget, [[maybe_unused]] uint32 nTileCount)
{
return true;
}
bool CNULLRenderer::FX_SetRenderTarget([[maybe_unused]] int nTarget, [[maybe_unused]] CTexture* pTarget, [[maybe_unused]] SDepthTexture* pDepthTarget, [[maybe_unused]] bool bPush, [[maybe_unused]] int nCMSide, [[maybe_unused]] bool bScreenVP, [[maybe_unused]] uint32 nTileCount)
{
return true;
}
bool CNULLRenderer::FX_PushRenderTarget([[maybe_unused]] int nTarget, [[maybe_unused]] CTexture* pTarget, [[maybe_unused]] SDepthTexture* pDepthTarget, [[maybe_unused]] int nCMSide, [[maybe_unused]] bool bScreenVP, [[maybe_unused]] uint32 nTileCount)
{
return true;
}
bool CNULLRenderer::FX_RestoreRenderTarget([[maybe_unused]] int nTarget)
{
return true;
}
bool CNULLRenderer::FX_PopRenderTarget([[maybe_unused]] int nTarget)
{
return true;
}
void CNULLRenderer::FX_SetActiveRenderTargets([[maybe_unused]] bool bAllowDIP)
{
}
IDynTexture* CNULLRenderer::CreateDynTexture2([[maybe_unused]] uint32 nWidth, [[maybe_unused]] uint32 nHeight, [[maybe_unused]] uint32 nTexFlags, [[maybe_unused]] const char* szSource, [[maybe_unused]] ETexPool eTexPool)
{
return nullptr;
}
@@ -0,0 +1,445 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
#pragma once
/*
===========================================
The NULLRenderer interface Class
===========================================
*/
#define MAX_TEXTURE_STAGES 4
#include "CryArray.h"
#include "NULLRenderAuxGeom.h"
//////////////////////////////////////////////////////////////////////
class CNULLRenderer
: public CRenderer
{
public:
////---------------------------------------------------------------------------------------------------------------------
virtual SRenderPipeline* GetRenderPipeline() override { return nullptr; }
virtual SRenderThread* GetRenderThread() override { return nullptr; }
virtual void FX_SetState(int st, int AlphaRef = -1, int RestoreState = 0) override;
void SetCull([[maybe_unused]] ECull eCull, [[maybe_unused]] bool bSkipMirrorCull = false) override {}
virtual SDepthTexture* GetDepthBufferOrig() override { return nullptr; }
virtual uint32 GetBackBufferWidth() override { return 0; }
virtual uint32 GetBackBufferHeight() override { return 0; };
virtual const SRenderTileInfo* GetRenderTileInfo() const override { return nullptr; }
virtual void FX_CommitStates([[maybe_unused]] const SShaderTechnique* pTech, [[maybe_unused]] const SShaderPass* pPass, [[maybe_unused]] bool bUseMaterialState) override {}
virtual void FX_Commit([[maybe_unused]] bool bAllowDIP = false) override {}
virtual long FX_SetVertexDeclaration([[maybe_unused]] int StreamMask, [[maybe_unused]] const AZ::Vertex::Format& vertexFormat) override { return 0; }
virtual void FX_DrawIndexedPrimitive([[maybe_unused]] const eRenderPrimitiveType eType, [[maybe_unused]] const int nVBOffset, [[maybe_unused]] const int nMinVertexIndex, [[maybe_unused]] const int nVerticesCount, [[maybe_unused]] const int nStartIndex, [[maybe_unused]] const int nNumIndices, [[maybe_unused]] bool bInstanced = false) override {}
virtual SDepthTexture* FX_GetDepthSurface([[maybe_unused]] int nWidth, [[maybe_unused]] int nHeight, [[maybe_unused]] bool bAA, [[maybe_unused]] bool shaderResourceView = false) override { return nullptr; }
virtual long FX_SetIStream([[maybe_unused]] const void* pB, [[maybe_unused]] uint32 nOffs, [[maybe_unused]] RenderIndexType idxType) override { return -1; }
virtual long FX_SetVStream([[maybe_unused]] int nID, [[maybe_unused]] const void* pB, [[maybe_unused]] uint32 nOffs, [[maybe_unused]] uint32 nStride, [[maybe_unused]] uint32 nFreq = 1) override { return -1; }
virtual void FX_DrawPrimitive([[maybe_unused]] const eRenderPrimitiveType eType, [[maybe_unused]] const int nStartVertex, [[maybe_unused]] const int nVerticesCount, [[maybe_unused]] const int nInstanceVertices = 0) {}
virtual void DrawQuad3D([[maybe_unused]] const Vec3& v0, [[maybe_unused]] const Vec3& v1, [[maybe_unused]] const Vec3& v2, [[maybe_unused]] const Vec3& v3, [[maybe_unused]] const ColorF& color, [[maybe_unused]] float ftx0, [[maybe_unused]] float fty0, [[maybe_unused]] float ftx1, [[maybe_unused]] float fty1) override {}
virtual void FX_ClearTarget(ITexture* pTex) override;
virtual void FX_ClearTarget(SDepthTexture* pTex) override;
virtual bool FX_SetRenderTarget(int nTarget, void* pTargetSurf, SDepthTexture* pDepthTarget, uint32 nTileCount = 1) override;
virtual bool FX_PushRenderTarget(int nTarget, void* pTargetSurf, SDepthTexture* pDepthTarget, uint32 nTileCount = 1) override;
virtual bool FX_SetRenderTarget(int nTarget, CTexture* pTarget, SDepthTexture* pDepthTarget, bool bPush = false, int nCMSide = -1, bool bScreenVP = false, uint32 nTileCount = 1) override;
virtual bool FX_PushRenderTarget(int nTarget, CTexture* pTarget, SDepthTexture* pDepthTarget, int nCMSide = -1, bool bScreenVP = false, uint32 nTileCount = 1) override;
virtual bool FX_RestoreRenderTarget(int nTarget) override;
virtual bool FX_PopRenderTarget(int nTarget) override;
void FX_SetActiveRenderTargets(bool bAllowDIP = false) override;
virtual void EF_Scissor([[maybe_unused]] bool bEnable, [[maybe_unused]] int sX, [[maybe_unused]] int sY, [[maybe_unused]] int sWdt, [[maybe_unused]] int sHgt) override {}
virtual void FX_ResetPipe() override {}
////---------------------------------------------------------------------------------------------------------------------
CNULLRenderer();
virtual ~CNULLRenderer();
virtual WIN_HWND Init(int x, int y, int width, int height, unsigned int cbpp, int zbpp, int sbits, bool fullscreen, bool isEditor, WIN_HINSTANCE hinst, WIN_HWND Glhwnd = 0, bool bReInit = false, const SCustomRenderInitArgs* pCustomArgs = 0, bool bShaderCacheGen = false);
virtual WIN_HWND GetHWND();
virtual bool SetWindowIcon(const char* path);
/////////////////////////////////////////////////////////////////////////////////
// Render-context management
/////////////////////////////////////////////////////////////////////////////////
virtual bool SetCurrentContext(WIN_HWND hWnd);
virtual bool CreateContext(WIN_HWND hWnd, bool bAllowMSAA, int SSX, int SSY);
virtual bool DeleteContext(WIN_HWND hWnd);
virtual void MakeMainContextActive();
virtual int GetCurrentContextViewportWidth() const { return -1; }
virtual int GetCurrentContextViewportHeight() const { return -1; }
/////////////////////////////////////////////////////////////////////////////////
virtual int CreateRenderTarget(const char* name, int nWidth, int nHeight, const ColorF& cClear, ETEX_Format eTF = eTF_R8G8B8A8);
virtual bool DestroyRenderTarget(int nHandle);
virtual bool ResizeRenderTarget(int nHandle, int nWidth, int nHeight);
virtual bool SetRenderTarget(int nHandle, SDepthTexture* pDepthSurf = nullptr);
virtual SDepthTexture* CreateDepthSurface(int nWidth, int nHeight, bool shaderResourceView = false);
virtual void DestroyDepthSurface(SDepthTexture* pDepthSurf);
virtual int GetOcclusionBuffer(uint16* pOutOcclBuffer, Matrix44* pmCamBuffe);
virtual void WaitForParticleBuffer(threadID nThreadId);
virtual void GetVideoMemoryUsageStats([[maybe_unused]] size_t& vidMemUsedThisFrame, [[maybe_unused]] size_t& vidMemUsedRecently, [[maybe_unused]] bool bGetPoolsSizes = false) {}
virtual void SetRenderTile([[maybe_unused]] f32 nTilesPosX, [[maybe_unused]] f32 nTilesPosY, [[maybe_unused]] f32 nTilesGridSizeX, [[maybe_unused]] f32 nTilesGridSizeY) {}
virtual void EF_InvokeShadowMapRenderJobs([[maybe_unused]] const int nFlags){}
//! Fills array of all supported video formats (except low resolution formats)
//! Returns number of formats, also when called with NULL
virtual int EnumDisplayFormats(SDispFormat* Formats);
//! Return all supported by video card video AA formats
virtual int EnumAAFormats([[maybe_unused]] SAAFormat* Formats) { return 0; }
//! Changes resolution of the window/device (doen't require to reload the level
virtual bool ChangeResolution(int nNewWidth, int nNewHeight, int nNewColDepth, int nNewRefreshHZ, bool bFullScreen, bool bForce);
virtual Vec2 SetViewportDownscale([[maybe_unused]] float xscale, [[maybe_unused]] float yscale) { return Vec2(0, 0); }
virtual void SetCurDownscaleFactor([[maybe_unused]] Vec2 sf) {};
virtual EScreenAspectRatio GetScreenAspect([[maybe_unused]] int nWidth, [[maybe_unused]] int nHeight) { return eAspect_4_3; }
virtual void SwitchToNativeResolutionBackbuffer() {}
virtual void ShutDown(bool bReInit = false);
virtual void ShutDownFast();
virtual void BeginFrame();
virtual void RenderDebug(bool bRernderStats = true);
virtual void EndFrame();
virtual void LimitFramerate([[maybe_unused]] const int maxFPS, [[maybe_unused]] const bool bUseSleep) {}
virtual void TryFlush();
virtual void Reset (void) {};
virtual void RT_ReleaseCB(void*){}
virtual void DrawDynVB(SVF_P3F_C4B_T2F* pBuf, uint16* pInds, int nVerts, int nInds, const PublicRenderPrimitiveType nPrimType);
virtual void DrawDynUiPrimitiveList(DynUiPrimitiveList& primitives, int totalNumVertices, int totalNumIndices);
virtual void DrawBuffer(CVertexBuffer* pVBuf, CIndexBuffer* pIBuf, int nNumIndices, int nOffsIndex, const PublicRenderPrimitiveType nPrmode, int nVertStart = 0, int nVertStop = 0);
virtual void CheckError(const char* comment);
virtual void DrawLine([[maybe_unused]] const Vec3& vPos1, [[maybe_unused]] const Vec3& vPos2) {};
virtual void Graph([[maybe_unused]] byte* g, [[maybe_unused]] int x, [[maybe_unused]] int y, [[maybe_unused]] int wdt, [[maybe_unused]] int hgt, [[maybe_unused]] int nC, [[maybe_unused]] int type, [[maybe_unused]] const char* text, [[maybe_unused]] ColorF& color, [[maybe_unused]] float fScale) {};
virtual void SetCamera(const CCamera& cam);
virtual void SetViewport(int x, int y, int width, int height, int id = 0);
virtual void SetScissor(int x = 0, int y = 0, int width = 0, int height = 0);
virtual void GetViewport(int* x, int* y, int* width, int* height) const;
virtual void SetCullMode (int mode = R_CULL_BACK);
virtual bool EnableFog (bool enable);
virtual void SetFogColor(const ColorF& color);
virtual void EnableVSync(bool enable);
virtual void DrawPrimitivesInternal(CVertexBuffer* src, int vert_num, const eRenderPrimitiveType prim_type);
virtual void PushMatrix();
virtual void RotateMatrix(float a, float x, float y, float z);
virtual void RotateMatrix(const Vec3& angels);
virtual void TranslateMatrix(float x, float y, float z);
virtual void ScaleMatrix(float x, float y, float z);
virtual void TranslateMatrix(const Vec3& pos);
virtual void MultMatrix(const float* mat);
virtual void LoadMatrix(const Matrix34* src = 0);
virtual void PopMatrix();
virtual void EnableTMU(bool enable);
virtual void SelectTMU(int tnum);
virtual bool ChangeDisplay(unsigned int width, unsigned int height, unsigned int cbpp);
virtual void ChangeViewport(unsigned int x, unsigned int y, unsigned int width, unsigned int height, bool bMainViewport = false, float scaleWidth = 1.0f, float scaleHeight = 1.0f);
virtual bool SaveTga([[maybe_unused]] unsigned char* sourcedata, [[maybe_unused]] int sourceformat, [[maybe_unused]] int w, [[maybe_unused]] int h, [[maybe_unused]] const char* filename, [[maybe_unused]] bool flip) const { return false; }
//download an image to video memory. 0 in case of failure
virtual void CreateResourceAsync([[maybe_unused]] SResourceAsync* Resource) {};
virtual void ReleaseResourceAsync([[maybe_unused]] SResourceAsync* Resource) {};
void ReleaseResourceAsync(AZStd::unique_ptr<SResourceAsync> Resource) override {};
virtual unsigned int DownLoadToVideoMemory([[maybe_unused]] const byte* data, [[maybe_unused]] int w, [[maybe_unused]] int h, [[maybe_unused]] ETEX_Format eTFSrc, [[maybe_unused]] ETEX_Format eTFDst, [[maybe_unused]] int nummipmap, [[maybe_unused]] bool repeat = true, [[maybe_unused]] int filter = FILTER_BILINEAR, [[maybe_unused]] int Id = 0, [[maybe_unused]] const char* szCacheName = NULL, [[maybe_unused]] int flags = 0, [[maybe_unused]] EEndian eEndian = eLittleEndian, [[maybe_unused]] RectI* pRegion = NULL, [[maybe_unused]] bool bAsynDevTexCreation = false) { return 0; }
virtual unsigned int DownLoadToVideoMemoryCube([[maybe_unused]] const byte* data, [[maybe_unused]] int w, [[maybe_unused]] int h, [[maybe_unused]] ETEX_Format eTFSrc, [[maybe_unused]] ETEX_Format eTFDst, [[maybe_unused]] int nummipmap, [[maybe_unused]] bool repeat = true, [[maybe_unused]] int filter = FILTER_BILINEAR, [[maybe_unused]] int Id = 0, [[maybe_unused]] const char* szCacheName = NULL, [[maybe_unused]] int flags = 0, [[maybe_unused]] EEndian eEndian = eLittleEndian, [[maybe_unused]] RectI* pRegion = NULL, [[maybe_unused]] bool bAsynDevTexCreation = false) { return 0; }
virtual unsigned int DownLoadToVideoMemory3D([[maybe_unused]] const byte* data, [[maybe_unused]] int w, [[maybe_unused]] int h, [[maybe_unused]] int d, [[maybe_unused]] ETEX_Format eTFSrc, [[maybe_unused]] ETEX_Format eTFDst, [[maybe_unused]] int nummipmap, [[maybe_unused]] bool repeat = true, [[maybe_unused]] int filter = FILTER_BILINEAR, [[maybe_unused]] int Id = 0, [[maybe_unused]] const char* szCacheName = NULL, [[maybe_unused]] int flags = 0, [[maybe_unused]] EEndian eEndian = eLittleEndian, [[maybe_unused]] RectI* pRegion = NULL, [[maybe_unused]] bool bAsynDevTexCreation = false) { return 0; }
virtual void UpdateTextureInVideoMemory([[maybe_unused]] uint32 tnum, [[maybe_unused]] const byte* newdata, [[maybe_unused]] int posx, [[maybe_unused]] int posy, [[maybe_unused]] int w, [[maybe_unused]] int h, [[maybe_unused]] ETEX_Format eTFSrc = eTF_R8G8B8A8, [[maybe_unused]] int posz = 0, [[maybe_unused]] int sizez = 1){}
virtual bool SetGammaDelta(const float fGamma);
virtual void RestoreGamma(void) {};
virtual void RemoveTexture([[maybe_unused]] unsigned int TextureId) {}
virtual void DeleteFont([[maybe_unused]] IFFont* font) {}
virtual void Draw2dImage(float xpos, float ypos, float w, float h, int texture_id, float s0 = 0, float t0 = 0, float s1 = 1, float t1 = 1, float angle = 0, float r = 1, float g = 1, float b = 1, float a = 1, float z = 1);
virtual void Push2dImage(float xpos, float ypos, float w, float h, int texture_id, float s0 = 0, float t0 = 0, float s1 = 1, float t1 = 1, float angle = 0, float r = 1, float g = 1, float b = 1, float a = 1, float z = 1, float stereoDepth = 0);
virtual void Draw2dImageList();
virtual void Draw2dImageStretchMode([[maybe_unused]] bool stretch) {};
virtual void DrawImage(float xpos, float ypos, float w, float h, int texture_id, float s0, float t0, float s1, float t1, float r, float g, float b, float a, bool filtered = true);
virtual void DrawImageWithUV(float xpos, float ypos, float z, float w, float h, int texture_id, float s[4], float t[4], float r, float g, float b, float a, bool filtered = true);
virtual void PushWireframeMode(int mode);
virtual void PopWireframeMode();
virtual void FX_PushWireframeMode(int mode);
virtual void FX_PopWireframeMode();
virtual void FX_SetWireframeMode(int mode);
virtual void FX_PreRender([[maybe_unused]] int Stage) override {}
virtual void FX_PostRender() override {}
virtual void ResetToDefault();
virtual void SetDefaultRenderStates() {}
virtual int GenerateAlphaGlowTexture(float k);
virtual void ApplyViewParameters(const CameraViewParameters&) override {}
virtual void SetMaterialColor(float r, float g, float b, float a);
virtual void GetMemoryUsage(ICrySizer* Sizer);
// Project/UnProject. Returns true if successful.
virtual bool ProjectToScreen(float ptx, float pty, float ptz,
float* sx, float* sy, float* sz);
virtual int UnProject(float sx, float sy, float sz,
float* px, float* py, float* pz,
const float modelMatrix[16],
const float projMatrix[16],
const int viewport[4]);
virtual int UnProjectFromScreen(float sx, float sy, float sz,
float* px, float* py, float* pz);
// Shadow Mapping
virtual bool PrepareDepthMap(ShadowMapFrustum* SMSource, int nFrustumLOD = 0, bool bClearPool = false);
virtual void DrawAllShadowsOnTheScreen();
virtual void OnEntityDeleted([[maybe_unused]] IRenderNode* pRenderNode) {};
virtual void FX_SetClipPlane (bool bEnable, float* pPlane, bool bRefract);
virtual void SetColorOp([[maybe_unused]] byte eCo, [[maybe_unused]] byte eAo, [[maybe_unused]] byte eCa, [[maybe_unused]] byte eAa) {};
virtual void EF_SetColorOp([[maybe_unused]] byte eCo, [[maybe_unused]] byte eAo, [[maybe_unused]] byte eCa, [[maybe_unused]] byte eAa) {};
virtual void SetSrgbWrite([[maybe_unused]] bool srgbWrite) {};
virtual void EF_SetSrgbWrite([[maybe_unused]] bool sRGBWrite) {};
//for editor
virtual void GetModelViewMatrix(float* mat);
virtual void GetProjectionMatrix(float* mat);
//for texture
virtual ITexture* EF_LoadTexture(const char* nameTex, const uint32 flags = 0);
virtual ITexture* EF_LoadDefaultTexture(const char* nameTex);
virtual void DrawQuad(const Vec3& right, const Vec3& up, const Vec3& origin, int nFlipMode = 0);
virtual void DrawQuad(float dy, float dx, float dz, float x, float y, float z);
void DrawQuad([[maybe_unused]] float x0, [[maybe_unused]] float y0, [[maybe_unused]] float x1, [[maybe_unused]] float y1, [[maybe_unused]] const ColorF& color, [[maybe_unused]] float z = 1.0f, [[maybe_unused]] float s0 = 0.0f, [[maybe_unused]] float t0 = 0.0f, [[maybe_unused]] float s1 = 1.0f, [[maybe_unused]] float t1 = 1.0f) override {}
// NOTE: deprecated
virtual void ClearTargetsImmediately(uint32 nFlags);
virtual void ClearTargetsImmediately(uint32 nFlags, const ColorF& Colors, float fDepth);
virtual void ClearTargetsImmediately(uint32 nFlags, const ColorF& Colors);
virtual void ClearTargetsImmediately(uint32 nFlags, float fDepth);
virtual void ClearTargetsLater(uint32 nFlags);
virtual void ClearTargetsLater(uint32 nFlags, const ColorF& Colors, float fDepth);
virtual void ClearTargetsLater(uint32 nFlags, const ColorF& Colors);
virtual void ClearTargetsLater(uint32 nFlags, float fDepth);
virtual void ReadFrameBuffer(unsigned char* pRGB, int nImageX, int nSizeX, int nSizeY, ERB_Type eRBType, bool bRGBA, int nScaledX = -1, int nScaledY = -1);
virtual void ReadFrameBufferFast(uint32* pDstARGBA8, int dstWidth, int dstHeight, bool BGRA = true);
virtual bool CaptureFrameBufferFast(unsigned char* pDstRGBA8, int destinationWidth, int destinationHeight);
virtual bool CopyFrameBufferFast(unsigned char* pDstRGBA8, int destinationWidth, int destinationHeight);
virtual bool RegisterCaptureFrame(ICaptureFrameListener* pCapture);
virtual bool UnRegisterCaptureFrame(ICaptureFrameListener* pCapture);
virtual bool InitCaptureFrameBufferFast(uint32 bufferWidth, uint32 bufferHeight);
virtual void CloseCaptureFrameBufferFast(void);
virtual void CaptureFrameBufferCallBack(void);
virtual void ReleaseHWShaders() {}
virtual void PrintResourcesLeaks() {}
//misc
virtual bool ScreenShot(const char* filename = NULL, int width = 0);
virtual void Set2DMode([[maybe_unused]] uint32 orthoX, [[maybe_unused]] uint32 orthoY, [[maybe_unused]] TransformationMatrices& backupMatrices, [[maybe_unused]] float znear = -1e10f, [[maybe_unused]] float zfar = 1e10f) {}
virtual void Unset2DMode([[maybe_unused]] const TransformationMatrices& restoringMatrices) {}
virtual void Set2DModeNonZeroTopLeft([[maybe_unused]] float orthoLeft, [[maybe_unused]] float orthoTop, [[maybe_unused]] float orthoWidth, [[maybe_unused]] float orthoHeight, [[maybe_unused]] TransformationMatrices& backupMatrices, [[maybe_unused]] float znear = -1e10f, [[maybe_unused]] float zfar = 1e10f) {}
virtual int ScreenToTexture(int nTexID);
virtual void DrawPoints([[maybe_unused]] Vec3 v[], [[maybe_unused]] int nump, [[maybe_unused]] ColorF& col, [[maybe_unused]] int flags) {};
virtual void DrawLines([[maybe_unused]] Vec3 v[], [[maybe_unused]] int nump, [[maybe_unused]] ColorF& col, [[maybe_unused]] int flags, [[maybe_unused]] float fGround) {};
virtual void RefreshSystemShaders() {}
// Shaders/Shaders support
// RE - RenderElement
virtual void EF_Release(int nFlags);
virtual void FX_PipelineShutdown(bool bFastShutdown = false);
//==========================================================
// external interface for shaders
//==========================================================
virtual bool EF_SetLightHole(Vec3 vPos, Vec3 vNormal, int idTex, float fScale = 1.0f, bool bAdditive = true);
// Draw all shaded REs in the list
virtual void EF_EndEf3D (const int nFlags, const int nPrecacheUpdateId, const int nNearPrecacheUpdateId, const SRenderingPassInfo& passInfo);
// 2d interface for shaders
virtual void EF_EndEf2D(const bool bSort);
virtual bool EF_PrecacheResource(SShaderItem* pSI, float fMipFactor, float fTimeToReady, int Flags, int nUpdateId, int nCounter);
virtual bool EF_PrecacheResource(ITexture* pTP, float fDist, float fTimeToReady, int Flags, int nUpdateId, int nCounter);
virtual void PrecacheResources();
virtual void PostLevelLoading() {}
virtual void PostLevelUnload() {}
virtual ITexture* EF_CreateCompositeTexture(int type, const char* szName, int nWidth, int nHeight, int nDepth, int nMips, int nFlags, ETEX_Format eTF, const STexComposition* pCompositions, size_t nCompositions, int8 nPriority = -1);
void EF_Init();
virtual IDynTexture* MakeDynTextureFromShadowBuffer(int nSize, IDynTexture* pDynTexture);
virtual void MakeSprite(IDynTexture*& rTexturePtr, float _fSpriteDistance, int nTexSize, float angle, float angle2, IStatObj* pStatObj, const float fBrightnessMultiplier, SRendParams& rParms);
virtual uint32 RenderOccludersIntoBuffer([[maybe_unused]] const CCamera& viewCam, [[maybe_unused]] int nTexSize, [[maybe_unused]] PodArray<IRenderNode*>& lstOccluders, [[maybe_unused]] float* pBuffer) { return 0; }
virtual IRenderAuxGeom* GetIRenderAuxGeom([[maybe_unused]] void* jobID = 0)
{
return m_pNULLRenderAuxGeom;
}
virtual IColorGradingController* GetIColorGradingController();
virtual IStereoRenderer* GetIStereoRenderer();
virtual ITexture* Create2DTexture(const char* name, int width, int height, int numMips, int flags, unsigned char* data, ETEX_Format format);
//////////////////////////////////////////////////////////////////////
// Replacement functions for the Font engine ( vlad: for font can be used old functions )
virtual bool FontUploadTexture(class CFBitmap*, ETEX_Format eTF = eTF_R8G8B8A8);
virtual int FontCreateTexture(int Width, int Height, byte* pData, ETEX_Format eTF = eTF_R8G8B8A8, bool genMips = FontCreateTextureGenMipsDefaultValue, const char* textureName = nullptr);
virtual bool FontUpdateTexture(int nTexId, int X, int Y, int USize, int VSize, byte* pData);
virtual void FontReleaseTexture(class CFBitmap* pBmp);
virtual void FontSetTexture(class CFBitmap*, int nFilterMode);
virtual void FontSetTexture(int nTexId, int nFilterMode);
virtual void FontSetRenderingState([[maybe_unused]] bool overrideViewProjMatrices, [[maybe_unused]] TransformationMatrices& backupMatrices) {}
virtual void FontSetBlending([[maybe_unused]] int src, [[maybe_unused]] int dst, [[maybe_unused]] int baseState) {}
virtual void FontRestoreRenderingState([[maybe_unused]] bool overrideViewProjMatrices, [[maybe_unused]] const TransformationMatrices& restoringMatrices) {}
virtual void GetLogVBuffers(void) {}
virtual void RT_PresentFast() {}
virtual void RT_ForceSwapBuffers() {}
virtual void RT_SwitchToNativeResolutionBackbuffer([[maybe_unused]] bool resolveBackBuffer) {}
virtual void RT_BeginFrame() {}
virtual void RT_EndFrame() {}
virtual void RT_Init() {}
virtual void RT_ShutDown([[maybe_unused]] uint32 nFlags) {}
virtual bool RT_CreateDevice() { return true; }
virtual void RT_Reset() {}
virtual void RT_SetCull([[maybe_unused]] int nMode) {}
virtual void RT_SetScissor([[maybe_unused]] bool bEnable, [[maybe_unused]] int x, [[maybe_unused]] int y, [[maybe_unused]] int width, [[maybe_unused]] int height){}
virtual void RT_RenderScene([[maybe_unused]] int nFlags, [[maybe_unused]] SThreadInfo& TI, [[maybe_unused]] RenderFunc pRenderFunc) {}
virtual void RT_PrepareStereo([[maybe_unused]] int mode, [[maybe_unused]] int output) {}
virtual void RT_CopyToStereoTex([[maybe_unused]] int channel) {}
virtual void RT_UpdateTrackingStates() {}
virtual void RT_DisplayStereo() {}
virtual void RT_SetCameraInfo() {}
virtual void RT_SetStereoCamera() {}
virtual void RT_ReadFrameBuffer([[maybe_unused]] unsigned char* pRGB, [[maybe_unused]] int nImageX, [[maybe_unused]] int nSizeX, [[maybe_unused]] int nSizeY, [[maybe_unused]] ERB_Type eRBType, [[maybe_unused]] bool bRGBA, [[maybe_unused]] int nScaledX, [[maybe_unused]] int nScaledY) {}
virtual void RT_RenderScene([[maybe_unused]] int nFlags, [[maybe_unused]] SThreadInfo& TI, [[maybe_unused]] int nR, [[maybe_unused]] RenderFunc pRenderFunc) {};
virtual void RT_CreateResource([[maybe_unused]] SResourceAsync* Res) {};
virtual void RT_ReleaseResource([[maybe_unused]] SResourceAsync* Res) {};
virtual void RT_ReleaseRenderResources() {};
virtual void RT_UnbindResources() {};
virtual void RT_UnbindTMUs() {};
virtual void RT_PrecacheDefaultShaders() {};
virtual void RT_CreateRenderResources() {};
virtual void RT_ClearTarget([[maybe_unused]] ITexture* pTex, [[maybe_unused]] const ColorF& color) {};
virtual void RT_RenderDebug([[maybe_unused]] bool bRenderStats = true) {};
virtual HRESULT RT_CreateVertexBuffer([[maybe_unused]] UINT Length, [[maybe_unused]] DWORD Usage, [[maybe_unused]] DWORD FVF, [[maybe_unused]] UINT Pool, [[maybe_unused]] void** ppVertexBuffer, [[maybe_unused]] HANDLE* pSharedHandle) { return S_OK; }
virtual HRESULT RT_CreateIndexBuffer([[maybe_unused]] UINT Length, [[maybe_unused]] DWORD Usage, [[maybe_unused]] DWORD Format, [[maybe_unused]] UINT Pool, [[maybe_unused]] void** ppVertexBuffer, [[maybe_unused]] HANDLE* pSharedHandle) { return S_OK; };
virtual HRESULT RT_CreateVertexShader([[maybe_unused]] DWORD* pBuf, [[maybe_unused]] void** pShader, [[maybe_unused]] void* pInst) { return S_OK; };
virtual HRESULT RT_CreatePixelShader([[maybe_unused]] DWORD* pBuf, [[maybe_unused]] void** pShader) { return S_OK; };
virtual void RT_ReleaseVBStream([[maybe_unused]] void* pVB, [[maybe_unused]] int nStream) {};
virtual void RT_DrawDynVB([[maybe_unused]] int Pool, [[maybe_unused]] uint32 nVerts) {}
virtual void RT_DrawDynVB([[maybe_unused]] SVF_P3F_C4B_T2F* pBuf, [[maybe_unused]] uint16* pInds, [[maybe_unused]] uint32 nVerts, [[maybe_unused]] uint32 nInds, [[maybe_unused]] const PublicRenderPrimitiveType nPrimType) {}
virtual void RT_DrawDynVBUI([[maybe_unused]] SVF_P2F_C4B_T2F_F4B* pBuf, [[maybe_unused]] uint16* pInds, [[maybe_unused]] uint32 nVerts, [[maybe_unused]] uint32 nInds, [[maybe_unused]] const PublicRenderPrimitiveType nPrimType) {}
virtual void RT_DrawStringU([[maybe_unused]] IFFont_RenderProxy* pFont, [[maybe_unused]] float x, [[maybe_unused]] float y, [[maybe_unused]] float z, [[maybe_unused]] const char* pStr, [[maybe_unused]] const bool asciiMultiLine, [[maybe_unused]] const STextDrawContext& ctx) const {}
virtual void RT_DrawLines([[maybe_unused]] Vec3 v[], [[maybe_unused]] int nump, [[maybe_unused]] ColorF& col, [[maybe_unused]] int flags, [[maybe_unused]] float fGround) {}
virtual void RT_Draw2dImage([[maybe_unused]] float xpos, [[maybe_unused]] float ypos, [[maybe_unused]] float w, [[maybe_unused]] float h, [[maybe_unused]] CTexture* pTexture, [[maybe_unused]] float s0, [[maybe_unused]] float t0, [[maybe_unused]] float s1, [[maybe_unused]] float t1, [[maybe_unused]] float angle, [[maybe_unused]] DWORD col, [[maybe_unused]] float z) {}
virtual void RT_Push2dImage([[maybe_unused]] float xpos, [[maybe_unused]] float ypos, [[maybe_unused]] float w, [[maybe_unused]] float h, [[maybe_unused]] CTexture* pTexture, [[maybe_unused]] float s0, [[maybe_unused]] float t0, [[maybe_unused]] float s1, [[maybe_unused]] float t1, [[maybe_unused]] float angle, [[maybe_unused]] DWORD col, [[maybe_unused]] float z, [[maybe_unused]] float stereoDepth) {}
virtual void RT_Draw2dImageList() {}
virtual void RT_Draw2dImageStretchMode([[maybe_unused]] bool bStretch) {}
virtual void RT_DrawImageWithUV([[maybe_unused]] float xpos, [[maybe_unused]] float ypos, [[maybe_unused]] float z, [[maybe_unused]] float w, [[maybe_unused]] float h, [[maybe_unused]] int texture_id, [[maybe_unused]] float* s, [[maybe_unused]] float* t, [[maybe_unused]] DWORD col, [[maybe_unused]] bool filtered = true) {}
virtual void EF_ClearTargetsImmediately([[maybe_unused]] uint32 nFlags) {}
virtual void EF_ClearTargetsImmediately([[maybe_unused]] uint32 nFlags, [[maybe_unused]] const ColorF& Colors, [[maybe_unused]] float fDepth, [[maybe_unused]] uint8 nStencil) {}
virtual void EF_ClearTargetsImmediately([[maybe_unused]] uint32 nFlags, [[maybe_unused]] const ColorF& Colors) {}
virtual void EF_ClearTargetsImmediately([[maybe_unused]] uint32 nFlags, [[maybe_unused]] float fDepth, [[maybe_unused]] uint8 nStencil) {}
virtual void EF_ClearTargetsLater([[maybe_unused]] uint32 nFlags) {}
virtual void EF_ClearTargetsLater([[maybe_unused]] uint32 nFlags, [[maybe_unused]] const ColorF& Colors, [[maybe_unused]] float fDepth, [[maybe_unused]] uint8 nStencil) {}
virtual void EF_ClearTargetsLater([[maybe_unused]] uint32 nFlags, [[maybe_unused]] const ColorF& Colors) {}
virtual void EF_ClearTargetsLater([[maybe_unused]] uint32 nFlags, [[maybe_unused]] float fDepth, [[maybe_unused]] uint8 nStencil) {}
virtual void RT_PushRenderTarget([[maybe_unused]] int nTarget, [[maybe_unused]] CTexture* pTex, [[maybe_unused]] SDepthTexture* pDS, [[maybe_unused]] int nS) {};
virtual void RT_PopRenderTarget([[maybe_unused]] int nTarget) {};
virtual void RT_SetViewport([[maybe_unused]] int x, [[maybe_unused]] int y, [[maybe_unused]] int width, [[maybe_unused]] int height, [[maybe_unused]] int id) {};
virtual void RT_SetRendererCVar([[maybe_unused]] ICVar* pCVar, [[maybe_unused]] const char* pArgText, [[maybe_unused]] const bool bSilentMode = false) {};
virtual void SetRendererCVar([[maybe_unused]] ICVar* pCVar, [[maybe_unused]] const char* pArgText, [[maybe_unused]] const bool bSilentMode = false) {};
virtual void SetMatrices([[maybe_unused]] float* pProjMat, [[maybe_unused]] float* pViewMat) {}
virtual void PushProfileMarker([[maybe_unused]] const char* label) {}
virtual void PopProfileMarker([[maybe_unused]] const char* label) {}
virtual void RT_InsertGpuCallback([[maybe_unused]] uint32 context, [[maybe_unused]] GpuCallbackFunc callback) {}
virtual void EnablePipelineProfiler([[maybe_unused]] bool bEnable) {}
virtual IOpticsElementBase* CreateOptics([[maybe_unused]] EFlareType type) const { return NULL; }
virtual bool BakeMesh([[maybe_unused]] const SMeshBakingInputParams* pInputParams, [[maybe_unused]] SMeshBakingOutput* pReturnValues) { return false; }
virtual PerInstanceConstantBufferPool* GetPerInstanceConstantBufferPoolPointer() override { return nullptr; }
IDynTexture* CreateDynTexture2(uint32 nWidth, uint32 nHeight, uint32 nTexFlags, const char* szSource, ETexPool eTexPool) override;
#ifdef SUPPORT_HW_MOUSE_CURSOR
virtual IHWMouseCursor* GetIHWMouseCursor() { return NULL; }
#endif
virtual void StartLoadtimePlayback([[maybe_unused]] ILoadtimeCallback* pCallback) {}
virtual void StopLoadtimePlayback() {}
void BeginProfilerSection([[maybe_unused]] const char* name, [[maybe_unused]] uint32 eProfileLabelFlags = 0) override {}
void EndProfilerSection([[maybe_unused]] const char* name) override {}
void AddProfilerLabel([[maybe_unused]] const char* name) override {}
void RT_DrawVideoRenderer([[maybe_unused]] AZ::VideoRenderer::IVideoRenderer* pVideoRenderer, [[maybe_unused]] const AZ::VideoRenderer::DrawArguments& drawArguments) override {}
private:
CNULLRenderAuxGeom* m_pNULLRenderAuxGeom;
IColorGradingController* m_pNULLColorGradingController;
IStereoRenderer* m_pNULLStereoRenderer;
};
//=============================================================================
extern CNULLRenderer* gcpNULL;
@@ -0,0 +1,162 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
#include "RenderDll_precompiled.h"
#include "NULL_Renderer.h"
#include "I3DEngine.h"
//============================================================================
bool CShader::FXSetTechnique([[maybe_unused]] const CCryNameTSCRC& szName)
{
return true;
}
bool CShader::FXSetPSFloat([[maybe_unused]] const CCryNameR& NameParam, [[maybe_unused]] const Vec4* fParams, [[maybe_unused]] int nParams)
{
return true;
}
bool CShader::FXSetPSFloat([[maybe_unused]] const char* NameParam, [[maybe_unused]] const Vec4* fParams, [[maybe_unused]] int nParams)
{
return true;
}
bool CShader::FXSetVSFloat([[maybe_unused]] const CCryNameR& NameParam, [[maybe_unused]] const Vec4* fParams, [[maybe_unused]] int nParams)
{
return true;
}
bool CShader::FXSetVSFloat([[maybe_unused]] const char* NameParam, [[maybe_unused]] const Vec4* fParams, [[maybe_unused]] int nParams)
{
return true;
}
bool CShader::FXSetGSFloat([[maybe_unused]] const CCryNameR& NameParam, [[maybe_unused]] const Vec4* fParams, [[maybe_unused]] int nParams)
{
return true;
}
bool CShader::FXSetGSFloat([[maybe_unused]] const char* NameParam, [[maybe_unused]] const Vec4* fParams, [[maybe_unused]] int nParams)
{
return true;
}
bool CShader::FXSetCSFloat([[maybe_unused]] const CCryNameR& NameParam, [[maybe_unused]] const Vec4* fParams, [[maybe_unused]] int nParams)
{
return true;
}
bool CShader::FXSetCSFloat([[maybe_unused]] const char* NameParam, [[maybe_unused]] const Vec4* fParams, [[maybe_unused]] int nParams)
{
return true;
}
bool CShader::FXBegin([[maybe_unused]] uint32* uiPassCount, [[maybe_unused]] uint32 nFlags)
{
return true;
}
bool CShader::FXBeginPass([[maybe_unused]] uint32 uiPass)
{
return true;
}
bool CShader::FXEndPass()
{
return true;
}
bool CShader::FXEnd()
{
return true;
}
bool CShader::FXCommit([[maybe_unused]] const uint32 nFlags)
{
return true;
}
//===================================================================================
FXShaderCache CHWShader::m_ShaderCache;
FXShaderCacheNames CHWShader::m_ShaderCacheList;
void CRenderer::RefreshSystemShaders()
{
}
SShaderCache::~SShaderCache()
{
CHWShader::m_ShaderCache.erase(m_Name);
SAFE_DELETE(m_pRes[CACHE_USER]);
SAFE_DELETE(m_pRes[CACHE_READONLY]);
}
SShaderCache* CHWShader::mfInitCache([[maybe_unused]] const char* name, [[maybe_unused]] CHWShader* pSH, [[maybe_unused]] bool bCheckValid, [[maybe_unused]] uint32 CRC32, [[maybe_unused]] bool bReadOnly, [[maybe_unused]] bool bAsync)
{
return NULL;
}
#if !defined(CONSOLE)
bool CHWShader::mfOptimiseCacheFile([[maybe_unused]] SShaderCache* pCache, [[maybe_unused]] bool bForce, [[maybe_unused]] SOptimiseStats* Stats)
{
return true;
}
#endif
bool CHWShader::PreactivateShaders()
{
bool bRes = true;
return bRes;
}
void CHWShader::RT_PreactivateShaders()
{
}
const char* CHWShader::GetCurrentShaderCombinations([[maybe_unused]] bool bLevel)
{
return "";
}
void CHWShader::mfFlushPendedShadersWait([[maybe_unused]] int nMaxAllowed)
{
}
void CShaderResources::Rebuild([[maybe_unused]] IShader* pSH, [[maybe_unused]] AzRHI::ConstantBufferUsage usage)
{
}
void CShaderResources::CloneConstants([[maybe_unused]] const IRenderShaderResources* pSrc)
{
}
void CShaderResources::ReleaseConstants()
{
}
void CShaderResources::UpdateConstants([[maybe_unused]] IShader* pSH)
{
}
void CShader::mfFlushPendedShaders()
{
}
void SShaderCache::Cleanup(void)
{
}
void CShaderResources::AdjustForSpec()
{
}
@@ -0,0 +1,36 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
// Description : Implementation of the shadow maps using NULL device specific implementation
// shadow map calculations
#include "RenderDll_precompiled.h"
#include "NULL_Renderer.h"
#include "../Common/Shadow_Renderer.h"
#include "I3DEngine.h"
IDynTexture* CNULLRenderer::MakeDynTextureFromShadowBuffer([[maybe_unused]] int nSize, [[maybe_unused]] IDynTexture* pDynTexture)
{
return NULL;
}
bool CNULLRenderer::PrepareDepthMap([[maybe_unused]] ShadowMapFrustum* SMSource, [[maybe_unused]] int nFrustumLOD, [[maybe_unused]] bool bClearPool)
{
return true;
}
void CNULLRenderer::DrawAllShadowsOnTheScreen()
{
}
@@ -0,0 +1,99 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
// Description : NULL device specific implementation and extensions handling.
#include "RenderDll_precompiled.h"
#include "NULL_Renderer.h"
bool CNULLRenderer::SetGammaDelta(const float fGamma)
{
m_fDeltaGamma = fGamma;
return true;
}
int CNULLRenderer::EnumDisplayFormats([[maybe_unused]] SDispFormat* Formats)
{
return 0;
}
bool CNULLRenderer::ChangeResolution([[maybe_unused]] int nNewWidth, [[maybe_unused]] int nNewHeight, [[maybe_unused]] int nNewColDepth, [[maybe_unused]] int nNewRefreshHZ, [[maybe_unused]] bool bFullScreen, [[maybe_unused]] bool bForce)
{
return false;
}
WIN_HWND CNULLRenderer::Init([[maybe_unused]] int x, [[maybe_unused]] int y, int width, int height, [[maybe_unused]] unsigned int cbpp, [[maybe_unused]] int zbpp, [[maybe_unused]] int sbits, [[maybe_unused]] bool fullscreen, [[maybe_unused]] bool isEditor, [[maybe_unused]] WIN_HINSTANCE hinst, [[maybe_unused]] WIN_HWND Glhwnd, [[maybe_unused]] bool bReInit, [[maybe_unused]] const SCustomRenderInitArgs* pCustomArgs, [[maybe_unused]] bool bShaderCacheGen)
{
//=======================================
// Add init code here
//=======================================
FX_SetWireframeMode(R_SOLID_MODE);
SetWidth(width);
SetHeight(height);
m_backbufferWidth = width;
m_backbufferHeight = height;
m_Features |= RFT_HW_NVIDIA;
if (!g_shaderGeneralHeap)
{
g_shaderGeneralHeap = CryGetIMemoryManager()->CreateGeneralExpandingMemoryHeap(4 * 1024 * 1024, 0, "Shader General");
}
iLog->Log("Init Shaders\n");
gRenDev->m_cEF.mfInit();
EF_Init();
#if NULL_SYSTEM_TRAIT_INIT_RETURNTHIS
return (WIN_HWND)this;//it just get checked against NULL anyway
#else
return (WIN_HWND)GetDesktopWindow();
#endif
}
bool CNULLRenderer::SetCurrentContext([[maybe_unused]] WIN_HWND hWnd)
{
return true;
}
bool CNULLRenderer::CreateContext([[maybe_unused]] WIN_HWND hWnd, [[maybe_unused]] bool bAllowMSAA, [[maybe_unused]] int SSX, [[maybe_unused]] int SSY)
{
return true;
}
bool CNULLRenderer::DeleteContext([[maybe_unused]] WIN_HWND hWnd)
{
return true;
}
void CNULLRenderer::MakeMainContextActive()
{
}
void CNULLRenderer::ShutDown([[maybe_unused]] bool bReInit)
{
iLog = nullptr;
FreeResources(FRR_ALL);
FX_PipelineShutdown();
}
void CNULLRenderer::ShutDownFast()
{
FX_PipelineShutdown();
}
@@ -0,0 +1,293 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
// Description : NULL device specific texture manager implementation.
#include "RenderDll_precompiled.h"
#include "NULL_Renderer.h"
//=================================================================================
///////////////////////////////////////////////////////////////////////////////////
void CNULLRenderer::MakeSprite(IDynTexture*& rTexturePtr, [[maybe_unused]] float _fSpriteDistance, [[maybe_unused]] int nTexSize, [[maybe_unused]] float angle, [[maybe_unused]] float angle2, [[maybe_unused]] IStatObj* pStatObj, [[maybe_unused]] const float fBrightnessMultiplier, [[maybe_unused]] SRendParams& rParms)
{
rTexturePtr = NULL;
}
int CNULLRenderer::GenerateAlphaGlowTexture([[maybe_unused]] float k)
{
return 0;
}
bool CNULLRenderer::EF_SetLightHole([[maybe_unused]] Vec3 vPos, [[maybe_unused]] Vec3 vNormal, [[maybe_unused]] int idTex, [[maybe_unused]] float fScale, [[maybe_unused]] bool bAdditive)
{
return false;
}
bool CNULLRenderer::EF_PrecacheResource([[maybe_unused]] ITexture* pTP, [[maybe_unused]] float fDist, [[maybe_unused]] float fTimeToReady, [[maybe_unused]] int Flags, [[maybe_unused]] int nUpdateId, [[maybe_unused]] int nCounter)
{
return false;
}
#if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
bool CTexture::RenderToTexture(int handle, const CCamera& camera, AzRTT::RenderContextId contextId)
{
return true;
}
#endif // if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
bool CTexture::RenderEnvironmentCMHDR([[maybe_unused]] int size, [[maybe_unused]] Vec3& Pos, [[maybe_unused]] TArray<unsigned short>& vecData)
{
return true;
}
void CTexture::Apply([[maybe_unused]] int nTUnit, [[maybe_unused]] int nState, [[maybe_unused]] int nTMatSlot, [[maybe_unused]] int nSUnit, [[maybe_unused]] SResourceView::KeyType nResViewKey, [[maybe_unused]] EHWShaderClass eSHClass)
{
}
#if defined(TEXTURE_GET_SYSTEM_COPY_SUPPORT)
byte* CTexture::Convert([[maybe_unused]] const byte* pSrc, [[maybe_unused]] int nWidth, [[maybe_unused]] int nHeight, [[maybe_unused]] int nMips, [[maybe_unused]] ETEX_Format eTFSrc, [[maybe_unused]] ETEX_Format eTFDst, [[maybe_unused]] int& nOutSize, [[maybe_unused]] bool bLinear)
{
return NULL;
}
#endif
void CTexture::ReleaseDeviceTexture([[maybe_unused]] bool bKeepLastMips, [[maybe_unused]] bool bFromUnload)
{
}
bool CTexture::Clear([[maybe_unused]] const ColorF& color)
{
return true;
}
void CTexture::SetTexStates()
{
}
bool CTexture::CreateDeviceTexture([[maybe_unused]] const byte* pData[6])
{
return true;
}
void* CTexture::CreateDeviceResourceView([[maybe_unused]] const SResourceView& rv)
{
return NULL;
}
ETEX_Format CTexture::ClosestFormatSupported(ETEX_Format eTFDst)
{
return eTFDst;
}
bool CTexture::SetFilterMode(int nFilter)
{
return s_sDefState.SetFilterMode(nFilter);
}
bool CTexture::CreateRenderTarget([[maybe_unused]] ETEX_Format eTF, [[maybe_unused]] const ColorF& cClear)
{
return true;
}
bool CTexture::SetClampingMode(int nAddressU, int nAddressV, int nAddressW)
{
return s_sDefState.SetClampMode(nAddressU, nAddressV, nAddressW);
}
void CTexture::UpdateTexStates()
{
}
void CTexture::GenerateCachedShadowMaps()
{
}
void CTexture::Readback([[maybe_unused]] AZ::u32 subresourceIndex, StagingHook callback)
{
}
//======================================================================================
void SEnvTexture::Release()
{
}
void SEnvTexture::RT_SetMatrix(void)
{
}
bool SDynTexture::RestoreRT([[maybe_unused]] int nRT, [[maybe_unused]] bool bPop)
{
return true;
}
bool SDynTexture::ClearRT()
{
return true;
}
bool SDynTexture2::ClearRT()
{
return true;
}
bool SDynTexture::SetRT([[maybe_unused]] int nRT, [[maybe_unused]] bool bPush, [[maybe_unused]] SDepthTexture* pDepthSurf, [[maybe_unused]] bool bScreenVP)
{
return true;
}
bool SDynTexture2::SetRT([[maybe_unused]] int nRT, [[maybe_unused]] bool bPush, [[maybe_unused]] SDepthTexture* pDepthSurf, [[maybe_unused]] bool bScreenVP)
{
return true;
}
bool SDynTexture2::RestoreRT([[maybe_unused]] int nRT, [[maybe_unused]] bool bPop)
{
return true;
}
bool SDynTexture2::SetRectStates()
{
return true;
}
//===============================================================================
void STexState::PostCreate()
{
}
void STexState::Destroy()
{
}
void STexState::Init(const STexState& src)
{
memcpy(this, &src, sizeof(src));
}
void STexState::SetComparisonFilter([[maybe_unused]] bool bEnable)
{
}
bool STexState::SetClampMode([[maybe_unused]] int nAddressU, [[maybe_unused]] int nAddressV, [[maybe_unused]] int nAddressW)
{
m_nAddressU = 0;
m_nAddressV = 0;
m_nAddressW = 0;
return true;
}
bool STexState::SetFilterMode([[maybe_unused]] int nFilter)
{
m_nMinFilter = 0;
m_nMagFilter = 0;
m_nMipFilter = 0;
return true;
}
void STexState::SetBorderColor(DWORD dwColor)
{
m_dwBorderColor = dwColor;
}
SDepthTexture::~SDepthTexture()
{
}
void SDepthTexture::Release([[maybe_unused]] bool bReleaseTex)
{
}
ETEX_Format CTexture::TexFormatFromDeviceFormat([[maybe_unused]] int nFormat)
{
return eTF_Unknown;
}
bool CTexture::RT_CreateDeviceTexture([[maybe_unused]] const byte* pData[6])
{
return true;
}
void CTexture::UpdateTextureRegion([[maybe_unused]] const uint8_t* data, [[maybe_unused]] int X, [[maybe_unused]] int Y, [[maybe_unused]] int Z, [[maybe_unused]] int USize, [[maybe_unused]] int VSize, [[maybe_unused]] int ZSize, [[maybe_unused]] ETEX_Format eTFSrc)
{
}
void CTexture::Unbind()
{
}
void CTexture::RT_UpdateTextureRegion([[maybe_unused]] const uint8_t* data, [[maybe_unused]] int X, [[maybe_unused]] int Y, [[maybe_unused]] int Z, [[maybe_unused]] int USize, [[maybe_unused]] int VSize, [[maybe_unused]] int ZSize, [[maybe_unused]] ETEX_Format eTFSrc)
{
}
bool SDynTexture::RT_SetRT([[maybe_unused]] int nRT, [[maybe_unused]] int nWidth, [[maybe_unused]] int nHeight, [[maybe_unused]] bool bPush, [[maybe_unused]] bool bScreenVP)
{
return true;
}
bool SDynTexture::RT_Update([[maybe_unused]] int nNewWidth, [[maybe_unused]] int nNewHeight)
{
return true;
}
void CTexture::ReleaseSystemTargets(void) {}
void CTexture::ReleaseMiscTargets(void) {}
void CTexture::CreateSystemTargets(void) {}
//===============================================================================
namespace TextureHelpers
{
bool VerifyTexSuffix([[maybe_unused]] EEfResTextures texSlot, [[maybe_unused]] const char* texPath)
{
return false;
}
bool VerifyTexSuffix([[maybe_unused]] EEfResTextures texSlot, [[maybe_unused]] const string& texPath)
{
return false;
}
const char* LookupTexSuffix([[maybe_unused]] EEfResTextures texSlot)
{
return nullptr;
}
int8 LookupTexPriority([[maybe_unused]] EEfResTextures texSlot)
{
return 0;
}
CTexture* LookupTexDefault([[maybe_unused]] EEfResTextures texSlot)
{
return nullptr;
}
CTexture* LookupTexBlank([[maybe_unused]] EEfResTextures texSlot)
{
return nullptr;
}
}
bool CTexture::Clear() { return true; }
uint32 CDeviceTexture::TextureDataSize([[maybe_unused]] uint32 nWidth, [[maybe_unused]] uint32 nHeight, [[maybe_unused]] uint32 nDepth, [[maybe_unused]] uint32 nMips, [[maybe_unused]] uint32 nSlices, [[maybe_unused]] const ETEX_Format eTF)
{
return 0;
}
@@ -0,0 +1,98 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
#include "RenderDll_precompiled.h"
#include "NULL_Renderer.h"
#include "../Common/Textures/TextureStreamPool.h"
//===============================================================================
bool STexPoolItem::IsStillUsedByGPU([[maybe_unused]] uint32 nCurTick)
{
return false;
}
STexPoolItem::~STexPoolItem()
{
}
void CTexture::InitStreamingDev()
{
}
void CTexture::StreamExpandMip([[maybe_unused]] const void* pRawData, [[maybe_unused]] int nMip, [[maybe_unused]] int nBaseMipOffset, [[maybe_unused]] int nSideDelta)
{
}
void CTexture::StreamCopyMipsTexToTex([[maybe_unused]] STexPoolItem* pSrcItem, [[maybe_unused]] int nMipSrc, [[maybe_unused]] STexPoolItem* pDestItem, [[maybe_unused]] int nMipDest, [[maybe_unused]] int nNumMips)
{
}
bool CTexture::StreamPrepare_Platform()
{
return true;
}
int CTexture::StreamTrim([[maybe_unused]] int nToMip)
{
return 0;
}
// Just remove item from the texture object and keep Item in Pool list for future use
// This function doesn't release API texture
void CTexture::StreamRemoveFromPool()
{
}
void CTexture::StreamCopyMipsTexToMem([[maybe_unused]] int nStartMip, [[maybe_unused]] int nEndMip, [[maybe_unused]] bool bToDevice, [[maybe_unused]] STexPoolItem* pNewPoolItem)
{
}
STexPoolItem* CTexture::StreamGetPoolItem([[maybe_unused]] int nStartMip, [[maybe_unused]] int nMips, [[maybe_unused]] bool bShouldBeCreated, [[maybe_unused]] bool bCreateFromMipData, [[maybe_unused]] bool bCanCreate, [[maybe_unused]] bool bForStreamOut)
{
return NULL;
}
void CTexture::StreamAssignPoolItem([[maybe_unused]] STexPoolItem* pItem, [[maybe_unused]] int nMinMip)
{
}
CTextureStreamPoolMgr::CTextureStreamPoolMgr()
{
}
CTextureStreamPoolMgr::~CTextureStreamPoolMgr()
{
}
void CTextureStreamPoolMgr::Flush()
{
}
STexPoolItem* CTextureStreamPoolMgr::GetPoolItem([[maybe_unused]] int nWidth, [[maybe_unused]] int nHeight, [[maybe_unused]] int nArraySize, [[maybe_unused]] int nMips, [[maybe_unused]] ETEX_Format eTF, [[maybe_unused]] bool bIsSRGB, [[maybe_unused]] ETEX_Type eTT, [[maybe_unused]] bool bShouldBeCreated, [[maybe_unused]] const char* sName, [[maybe_unused]] STextureInfo* pTI, [[maybe_unused]] bool bCanCreate, [[maybe_unused]] bool bWaitForIdle)
{
return NULL;
}
void CTextureStreamPoolMgr::ReleaseItem([[maybe_unused]] STexPoolItem* pItem)
{
}
void CTextureStreamPoolMgr::GarbageCollect([[maybe_unused]] size_t* nCurTexPoolSize, [[maybe_unused]] size_t nLowerPoolLimit, [[maybe_unused]] int nMaxItemsToFree)
{
}
void CTextureStreamPoolMgr::GetMemoryUsage([[maybe_unused]] ICrySizer* pSizer)
{
}
@@ -0,0 +1,12 @@
#
# 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.
#
set(CRYRENDER_TRAIT_BUILD_NULL_RENDERER_SUPPORTED TRUE)
@@ -0,0 +1,10 @@
#
# 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.
#
@@ -0,0 +1,10 @@
#
# 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.
#
@@ -0,0 +1,12 @@
#
# 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.
#
set(CRYRENDER_TRAIT_BUILD_NULL_RENDERER_SUPPORTED TRUE)
@@ -0,0 +1,10 @@
#
# 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.
#
@@ -0,0 +1,10 @@
#
# 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.
#
@@ -0,0 +1,12 @@
#
# 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.
#
set(CRYRENDER_TRAIT_BUILD_NULL_RENDERER_SUPPORTED TRUE)
@@ -0,0 +1,10 @@
#
# 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.
#
@@ -0,0 +1,10 @@
#
# 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.
#
@@ -0,0 +1,12 @@
#
# 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.
#
set(CRYRENDER_TRAIT_BUILD_NULL_RENDERER_SUPPORTED TRUE)
@@ -0,0 +1,10 @@
#
# 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.
#
@@ -0,0 +1,16 @@
#
# 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.
#
set(LY_BUILD_DEPENDENCIES
PRIVATE
opengl32
glu32
)
@@ -0,0 +1,12 @@
#
# 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.
#
set(CRYRENDER_TRAIT_BUILD_NULL_RENDERER_SUPPORTED TRUE)
@@ -0,0 +1,10 @@
#
# 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.
#
@@ -0,0 +1,10 @@
#
# 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.
#
@@ -0,0 +1,15 @@
/*
* 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.
*
*/
#include "RenderDll_precompiled.h"
#include <AzTest/AzTest.h>
AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV);
@@ -0,0 +1,123 @@
#
# 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.
#
set(FILES
../RenderDll_precompiled.cpp
../Common/Renderer_Jobs.cpp
resource.h
../Common/CommonRender.cpp
../Common/Renderer.cpp
../Common/RenderPipeline.cpp
../Common/RenderThread.cpp
../Common/ResFile.cpp
../Common/ResFileLookupDataMan.cpp
../Common/ShadowUtils.cpp
../Common/TextMessages.cpp
../Common/WaterUtils.cpp
../Common/ResFileLookupDataMan.h
../Common/TextMessages.h
../Common/CommonRender.h
../Common/FrameProfiler.h
../Common/IColorGradingControllerInt.h
../Common/OcclQuery.h
../Common/Renderer.h
../Common/RenderPipeline.h
../Common/RenderThread.h
../Common/ResFile.h
../Common/ResFile_info.h
../Common/Shadow_Renderer.h
../Common/ShadowUtils.h
../Common/WaterUtils.h
../XRenderD3D9/DeviceManager/Enums.h
../Common/RendElements/CREBeam.cpp
../Common/RendElements/CREClientPoly.cpp
../Common/RendElements/CRECloud.cpp
../Common/RendElements/CREDeferredShading.cpp
../Common/RendElements/CREFogVolume.cpp
../Common/RendElements/CREGameEffect.cpp
../Common/RendElements/CREHDRProcess.cpp
../Common/RendElements/CREImposter.cpp
../Common/RendElements/CREMesh.cpp
../Common/RendElements/CREOclusionQuery.cpp
../Common/RendElements/CREPostProcess.cpp
../Common/RendElements/CREPrismObject.cpp
../Common/RendElements/CRESky.cpp
../Common/RendElements/CREVolumeObject.cpp
../Common/RendElements/CREWaterOcean.cpp
../Common/RendElements/CREWaterVolume.cpp
../Common/RendElements/RendElement.cpp
../Common/RendElements/CREGeomCache.cpp
../Common/RendElements/CRELensOptics.h
../Common/RendElements/CREBeam.h
../Common/RendElements/CREClientPoly.h
../Common/RendElements/CRECloud.h
../Common/RendElements/CREDeferredShading.h
../Common/RendElements/CREHDRProcess.h
../Common/RendElements/Stars.h
../Common/RendElements/Utils/PolygonMath2D.cpp
../Common/RendElements/Utils/PolygonMath2D.h
../Common/RendElements/Utils/SpatialHashGrid.h
../Common/PostProcess/PostEffects.cpp
../Common/PostProcess/PostProcess.cpp
../Common/PostProcess/PostProcessUtils.cpp
../Common/PostProcess/PostEffects.h
../Common/PostProcess/PostProcess.h
../Common/PostProcess/PostProcessUtils.h
../Common/Memory/VRAMDriller.cpp
../Common/Memory/VRAMDriller.h
../Common/Memory/VRAMDrillerBus.h
../Common/RenderMesh_Render.cpp
../Common/RenderMesh_SetMesh.cpp
../Common/RenderMesh.cpp
../Common/RenderMesh.h
../Common/Textures/ITextureStreamer.cpp
../Common/Textures/PlanningTextureStreamer.cpp
../Common/Textures/PlanningTextureStreamer_Jobs.cpp
../Common/Textures/DynTexture.cpp
../Common/Textures/PowerOf2BlockPacker.cpp
../Common/Textures/Texture.cpp
../Common/Textures/TextureManager.cpp
../Common/Textures/TextureStreaming.cpp
../Common/Textures/PlanningTextureStreamer.h
../Common/Textures/TextureStreamPool.h
../Common/Textures/PowerOf2BlockPacker.h
../Common/Textures/Texture.h
../Common/Textures/StereoTexture.cpp
../Common/Textures/StereoTexture.h
../Common/Textures/TextureManager.h
../Common/Textures/Image/CImage.cpp
../Common/Textures/Image/DDSImage.cpp
../Common/Textures/Image/JpgImage.cpp
../Common/Textures/Image/TgaImage.cpp
../Common/Textures/Image/CImage.h
../Common/Textures/Image/DDSImage.h
../Common/Shaders/Parser.cpp
../Common/Shaders/ParserBin.cpp
../Common/Shaders/PoundPoundParser.cpp
../Common/Shaders/ShaderCache.cpp
../Common/Shaders/ShaderComponents.cpp
../Common/Shaders/ShaderCore.cpp
../Common/Shaders/ShaderFXParseBin.cpp
../Common/Shaders/ShaderParse.cpp
../Common/Shaders/ShaderScript.cpp
../Common/Shaders/ShaderTemplate.cpp
../Common/Shaders/ShaderResources.cpp
../Common/Shaders/CShader.h
../Common/Shaders/CShaderBin.h
../Common/Shaders/Parser.h
../Common/Shaders/ParserBin.h
../Common/Shaders/PoundPoundParser.h
../Common/Shaders/Shader.h
../Common/Shaders/ShaderCache.h
../Common/Shaders/ShaderComponents.h
../Common/Shaders/ShaderResources.h
../Common/Shaders/Vertex.h
)
@@ -0,0 +1,28 @@
#
# 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.
#
set(FILES
NULL_Renderer.h
NULL_Renderer.cpp
NULL_DevBuffer.cpp
NULL_Font.cpp
NULL_PostProcess.cpp
NULL_RendPipeline.cpp
NULL_RERender.cpp
NULL_Shaders.cpp
NULL_Shadows.cpp
NULL_System.cpp
NULL_Textures.cpp
NULL_TexturesStreaming.cpp
NULLRenderAuxGeom.cpp
NULLRenderAuxGeom.h
CRELensOpticsNULL.cpp
)
@@ -0,0 +1,30 @@
#
# 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.
#
set(FILES
Tests/test_Main.cpp
../Common/tests/RenderDLLUnitTests.cpp
NULL_Renderer.h
NULL_Renderer.cpp
NULL_DevBuffer.cpp
NULL_Font.cpp
NULL_PostProcess.cpp
NULL_RendPipeline.cpp
NULL_RERender.cpp
NULL_Shaders.cpp
NULL_Shadows.cpp
NULL_System.cpp
NULL_Textures.cpp
NULL_TexturesStreaming.cpp
NULLRenderAuxGeom.cpp
NULLRenderAuxGeom.h
CRELensOpticsNULL.cpp
)
@@ -0,0 +1,25 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
#define VS_VERSION_INFO 1
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif