mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 18:31:27 +00:00
[vulkan] Reset model transform for world surfaces
Fixes the misplaced walls.
This commit is contained in:
parent
c75568c1cf
commit
55badea1ae
1 changed files with 11 additions and 6 deletions
|
@ -67,6 +67,13 @@
|
|||
#include "vid_vulkan.h"
|
||||
#include "vkparse.h"
|
||||
|
||||
static float identity[] = {
|
||||
1, 0, 0, 0,
|
||||
0, 1, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
0, 0, 0, 1,
|
||||
};
|
||||
|
||||
#define ALLOC_CHUNK 64
|
||||
|
||||
typedef struct bsppoly_s {
|
||||
|
@ -764,6 +771,10 @@ draw_elechain (elechain_t *ec, VkPipelineLayout layout, qfv_devfuncs_t *dfunc,
|
|||
if (ec->transform) {
|
||||
dfunc->vkCmdPushConstants (cmd, layout, VK_SHADER_STAGE_VERTEX_BIT,
|
||||
0, 16 * sizeof (float), ec->transform);
|
||||
} else {
|
||||
//FIXME should cache current transform
|
||||
dfunc->vkCmdPushConstants (cmd, layout, VK_SHADER_STAGE_VERTEX_BIT,
|
||||
0, 16 * sizeof (float), identity);
|
||||
}
|
||||
for (el = ec->elements; el; el = el->next) {
|
||||
//FIXME check if these are contiguous and if so merge into one
|
||||
|
@ -1085,12 +1096,6 @@ build_tex_elechain (vulktex_t *tex, bspctx_t *bctx, bspframe_t *bframe)
|
|||
void
|
||||
Vulkan_DrawWorld (vulkan_ctx_t *ctx)
|
||||
{
|
||||
static float identity[] = {
|
||||
1, 0, 0, 0,
|
||||
0, 1, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
0, 0, 0, 1,
|
||||
};
|
||||
qfv_device_t *device = ctx->device;
|
||||
qfv_devfuncs_t *dfunc = device->funcs;
|
||||
bspctx_t *bctx = ctx->bsp_context;
|
||||
|
|
Loading…
Reference in a new issue