Skip to content
Snippets Groups Projects
Commit ce3c6397 authored by David Gilbert's avatar David Gilbert :bug:
Browse files

I'm an idiot

parent e4b17104
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ AOptiXLaserActor::AOptiXLaserActor(const FObjectInitializer& ObjectInitializer)
{
UE_LOG(LogTemp, Display, TEXT("OptiX Laser Actor Constructor"));
PrimaryActorTick.bCanEverTick = false;
PrimaryActorTick.bCanEverTick = true;
static ConstructorHelpers::FObjectFinder<UStaticMesh>MeshAsset(TEXT("StaticMesh'/OptiX/Laser/laser3.laser3'"));
UStaticMesh* Asset = MeshAsset.Object;
......@@ -95,26 +95,26 @@ void AOptiXLaserActor::EndPlay(const EEndPlayReason::Type EndPlayReason)
UE_LOG(LogTemp, Warning, TEXT("OptiX Laser Actor EndPlay"));
}
void AOptiXLaserActor::Tick(float DeltaTime)
{
// We don't need to trace each tick, but only if either the optix scene changed, or the laser position moved.
Super::Tick(DeltaTime);
//LineInstancedStaticMeshComponent->UpdateLines();
//if (bLaserTraceEnabled)
//{
// // Check if there's anything in the queue
// if (!FOptiXModule::Get().GetOptiXContextManager()->LaserIntersectionQueue.IsEmpty())
//void AOptiXLaserActor::Tick(float DeltaTime)
//{
// DisplayLines();
// }
// // We don't need to trace each tick, but only if either the optix scene changed, or the laser position moved.
// Super::Tick(DeltaTime);
//
// //LineInstancedStaticMeshComponent->UpdateLines();
//
// //if (bLaserTraceEnabled)
// //{
// // // Check if there's anything in the queue
//
// // if (!FOptiXModule::Get().GetOptiXContextManager()->LaserIntersectionQueue.IsEmpty())
// // {
// // DisplayLines();
// // }
// //}
//
//
//}
}
//void AOptiXLaserActor::InitInstancedMeshData()
//{
// // We have a max number of LaserIndices * 20 instances
......
......@@ -63,9 +63,12 @@ public:
cudaGraphicsUnregisterResource(CudaResourceDepthRight);
cudaGraphicsUnregisterResource(CudaResourceColorLeft);
cudaGraphicsUnregisterResource(CudaResourceColorRight);
cudaGraphicsUnregisterResource(CudaResourceIntersections);
PrintLastCudaError("cudaGraphicsUnregisterResource");
cudaFree(CudaLinearMemoryDepth);
cudaFree(CudaLinearMemoryColor);
cudaFree(CudaLinearMemoryIntersections);
PrintLastCudaError("cudaFree");
}
......@@ -79,6 +82,16 @@ public:
ProgramToDeleteQueue.Empty();
TextureSamplersToDeleteQueue.Empty();
TransformsToDeleteQueue.Empty();
GroupChildrenToRemoveQueue.Empty();
GeometryGroupChildrenToRemoveQueue.Empty();
ComponentsToInitializeQueue.Empty();
ComponentsToUpdateQueue.Empty();
CubemapComponentsToUpdateQueue.Empty();
LaserActor.Reset();
CameraActor.Reset();
}
// ISceneViewExtension interface start, called by the render thread:
......@@ -526,11 +539,16 @@ private:
DepthTexture.Reset();
OutputTexture2.Reset();
DepthTexture2.Reset();
LaserIntersectionTexture.Reset();
DynamicMaterial.Reset();
RegularMaterial.Reset();
VRMaterial.Reset();
LaserMaterial.Reset();
LaserMaterialDynamic.Reset();
LaserActor.Reset();
TopObject.Reset();
TopAcceleration.Reset();
......
......@@ -32,7 +32,7 @@ public:
virtual void BeginPlay() override;
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
virtual void Tick(float DeltaTime) override;
//virtual void Tick(float DeltaTime) override;
//UFUNCTION(BlueprintCallable, /*meta = (BlueprintProtected)*/ Category = "OptiXActor")
//void DisplayLines();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment