mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +00:00
- render backend update from GZDoom, mostly minor stuff.
This commit is contained in:
parent
4ca5bfdd46
commit
af5e3dd1b8
9 changed files with 20 additions and 13 deletions
|
@ -546,7 +546,7 @@ bool FScanner::GetString ()
|
|||
return ScanString (false);
|
||||
}
|
||||
|
||||
//============================================ ==============================
|
||||
//==========================================================================
|
||||
//
|
||||
// FScanner :: MustGetString
|
||||
//
|
||||
|
|
|
@ -786,7 +786,7 @@ void V_InitFonts()
|
|||
}
|
||||
if (!(IntermissionFont = FFont::FindFont("IntermissionFont")))
|
||||
{
|
||||
if (fileSystem.CheckNumForName("WINUM0") >= 0)
|
||||
if (TexMan.CheckForTexture("WINUM0", ETextureType::MiscPatch).isValid())
|
||||
{
|
||||
IntermissionFont = FFont::FindFont("IntermissionFont_Doom");
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ void FGLRenderer::RenderScreenQuad()
|
|||
{
|
||||
auto buffer = static_cast<GLVertexBuffer *>(screen->mVertexData->GetBufferObjects().first);
|
||||
buffer->Bind(nullptr);
|
||||
glDrawArrays(GL_TRIANGLE_STRIP, FFlatVertexBuffer::PRESENT_INDEX, 4);
|
||||
glDrawArrays(GL_TRIANGLE_STRIP, FFlatVertexBuffer::PRESENT_INDEX, 3);
|
||||
}
|
||||
|
||||
void FGLRenderer::PostProcessScene(int fixedcm, float flash, const std::function<void()> &afterBloomDrawEndScene2D)
|
||||
|
|
|
@ -63,9 +63,9 @@ FFlatVertexBuffer::FFlatVertexBuffer(int width, int height)
|
|||
|
||||
// and this is for the postprocessing copy operation
|
||||
vbo_shadowdata[8].Set(-1.0f, -1.0f, 0, 0.0f, 0.0f);
|
||||
vbo_shadowdata[9].Set(-1.0f, 1.0f, 0, 0.0f, 1.f);
|
||||
vbo_shadowdata[10].Set(1.0f, -1.0f, 0, 1.f, 0.0f);
|
||||
vbo_shadowdata[11].Set(1.0f, 1.0f, 0, 1.f, 1.f);
|
||||
vbo_shadowdata[9].Set(3.0f, -1.0f, 0, 2.f, 0.0f);
|
||||
vbo_shadowdata[10].Set(-1.0f, 3.0f, 0, 0.0f, 2.f);
|
||||
vbo_shadowdata[11].Set(3.0f, 3.0f, 0, 2.f, 2.f); // Note: not used anymore
|
||||
|
||||
// The next two are the stencil caps.
|
||||
vbo_shadowdata[12].Set(-32767.0f, 32767.0f, -32767.0f, 0, 0);
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
CVAR(Bool, gl_scale_viewport, true, CVAR_ARCHIVE);
|
||||
|
||||
EXTERN_CVAR(Int, vid_maxfps)
|
||||
EXTERN_CVAR(Bool, cl_capfps)
|
||||
CVAR(Bool, cl_capfps, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
EXTERN_CVAR(Int, screenblocks)
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -72,13 +72,11 @@ CVAR(Int, win_w, -1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
|||
CVAR(Int, win_h, -1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Bool, win_maximized, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||
|
||||
int MinFPSRate = 35;
|
||||
|
||||
CUSTOM_CVAR(Int, vid_maxfps, 200, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
{
|
||||
if (self < MinFPSRate && self != 0)
|
||||
if (self < GameTicRate && self != 0)
|
||||
{
|
||||
self = MinFPSRate;
|
||||
self = GameTicRate;
|
||||
}
|
||||
else if (self > 1000)
|
||||
{
|
||||
|
|
|
@ -565,7 +565,7 @@ void VkPPRenderState::RenderScreenQuad(VkPPRenderPassSetup *passSetup, VulkanDes
|
|||
cmdbuffer->setStencilReference(VK_STENCIL_FRONT_AND_BACK, screen->stencilValue);
|
||||
if (pushConstantsSize > 0)
|
||||
cmdbuffer->pushConstants(passSetup->PipelineLayout.get(), VK_SHADER_STAGE_FRAGMENT_BIT, 0, pushConstantsSize, pushConstants);
|
||||
cmdbuffer->draw(4, 1, FFlatVertexBuffer::PRESENT_INDEX, 0);
|
||||
cmdbuffer->draw(3, 1, FFlatVertexBuffer::PRESENT_INDEX, 0);
|
||||
cmdbuffer->endRenderPass();
|
||||
}
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#include "vulkan/system/vk_builders.h"
|
||||
#include "vulkan/system/vk_swapchain.h"
|
||||
#include "engineerrors.h"
|
||||
#include "c_dispatch.h"
|
||||
|
||||
void Draw2D(F2DDrawer *drawer, FRenderState &state);
|
||||
|
||||
|
@ -68,6 +69,14 @@ extern bool gpuStatActive;
|
|||
extern bool keepGpuStatActive;
|
||||
extern FString gpuStatOutput;
|
||||
|
||||
CCMD(vk_memstats)
|
||||
{
|
||||
VmaStats stats = {};
|
||||
vmaCalculateStats(GetVulkanFrameBuffer()->device->allocator, &stats);
|
||||
Printf("Allocated objects: %d, used bytes: %d MB\n", (int)stats.total.allocationCount, (int)stats.total.usedBytes / (1024 * 1024));
|
||||
Printf("Unused range count: %d, unused bytes: %d MB\n", (int)stats.total.unusedRangeCount, (int)stats.total.unusedBytes / (1024 * 1024));
|
||||
}
|
||||
|
||||
VulkanFrameBuffer::VulkanFrameBuffer(void *hMonitor, bool fullscreen, VulkanDevice *dev) :
|
||||
Super(hMonitor, fullscreen)
|
||||
{
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
|
||||
CVAR(Bool, vid_activeinbackground, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Bool, r_ticstability, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Bool, cl_capfps, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
EXTERN_CVAR(Bool, cl_capfps)
|
||||
CVAR(Bool, cl_resumesavegame, true, CVAR_ARCHIVE)
|
||||
|
||||
ticcmd_t playercmds[MAXPLAYERS];
|
||||
|
|
Loading…
Reference in a new issue