mirror of
https://github.com/ZDoom/ZDRay.git
synced 2025-01-24 08:41:06 +00:00
More setup code
This commit is contained in:
parent
f8b8005d4a
commit
3fa88a1447
1 changed files with 23 additions and 2 deletions
|
@ -1,7 +1,10 @@
|
||||||
|
|
||||||
#include "gpuraytracer.h"
|
#include "gpuraytracer.h"
|
||||||
#include "vk_renderdevice.h"
|
#include "vk_renderdevice.h"
|
||||||
|
#include "vk_raytrace.h"
|
||||||
|
#include "vk_lightmap.h"
|
||||||
#include "renderdoc_app.h"
|
#include "renderdoc_app.h"
|
||||||
|
#include "doom_levelmesh.h"
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
@ -20,7 +23,7 @@ GPURaytracer::~GPURaytracer()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPURaytracer::Raytrace(DoomLevelMesh* levelMesh)
|
void GPURaytracer::Raytrace(DoomLevelMesh* mesh)
|
||||||
{
|
{
|
||||||
if (rdoc_api) rdoc_api->StartFrameCapture(nullptr, nullptr);
|
if (rdoc_api) rdoc_api->StartFrameCapture(nullptr, nullptr);
|
||||||
|
|
||||||
|
@ -34,10 +37,28 @@ void GPURaytracer::Raytrace(DoomLevelMesh* levelMesh)
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// To do raytrace here
|
auto raytrace = mDevice->GetRaytrace();
|
||||||
|
auto lightmap = mDevice->GetLightmap();
|
||||||
|
|
||||||
|
// mDevice->GetTextureManager()->CreateLightmap(mesh->LMTextureSize, mesh->LMTextureCount);
|
||||||
|
|
||||||
printf(".");
|
printf(".");
|
||||||
|
raytrace->SetLevelMesh(mesh);
|
||||||
|
lightmap->SetLevelMesh(mesh);
|
||||||
|
raytrace->BeginFrame();
|
||||||
|
lightmap->BeginFrame();
|
||||||
|
|
||||||
printf(".");
|
printf(".");
|
||||||
|
// lightmap->Raytrace(surfaces);
|
||||||
|
|
||||||
printf(".");
|
printf(".");
|
||||||
|
/*
|
||||||
|
TArray<uint16_t> buffer;
|
||||||
|
for (int arrayIndex = 0; arrayIndex < mesh->LMTextureCount; arrayIndex++)
|
||||||
|
{
|
||||||
|
mDevice->GetTextureManager()->DownloadLightmap(arrayIndex, buffer);
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue