[vulkan] Save the current scene in the scene context

Now this I really don't know why I didn't do when I first created the
context.
This commit is contained in:
Bill Currie 2023-08-08 12:00:03 +09:00
parent ff5d4d8de1
commit c99a49a958
2 changed files with 4 additions and 2 deletions

View file

@ -64,6 +64,7 @@ typedef struct scenectx_s {
struct qfv_resource_s *entities; struct qfv_resource_s *entities;
scnframeset_t frames; scnframeset_t frames;
int max_entities; int max_entities;
struct scene_s *scene;
} scenectx_t; } scenectx_t;
struct vulkan_ctx_s; struct vulkan_ctx_s;

View file

@ -269,9 +269,10 @@ Vulkan_Scene_Shutdown (vulkan_ctx_t *ctx)
void void
Vulkan_NewScene (scene_t *scene, vulkan_ctx_t *ctx) Vulkan_NewScene (scene_t *scene, vulkan_ctx_t *ctx)
{ {
int i; auto sctx = ctx->scene_context;
sctx->scene = scene;
for (i = 0; i < 256; i++) { for (int i = 0; i < 256; i++) {
d_lightstylevalue[i] = 264; // normal light value d_lightstylevalue[i] = 264; // normal light value
} }