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
Branches
No related tags found
No related merge requests found
...@@ -16,7 +16,7 @@ AOptiXLaserActor::AOptiXLaserActor(const FObjectInitializer& ObjectInitializer) ...@@ -16,7 +16,7 @@ AOptiXLaserActor::AOptiXLaserActor(const FObjectInitializer& ObjectInitializer)
{ {
UE_LOG(LogTemp, Display, TEXT("OptiX Laser Actor Constructor")); 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'")); static ConstructorHelpers::FObjectFinder<UStaticMesh>MeshAsset(TEXT("StaticMesh'/OptiX/Laser/laser3.laser3'"));
UStaticMesh* Asset = MeshAsset.Object; UStaticMesh* Asset = MeshAsset.Object;
...@@ -95,26 +95,26 @@ void AOptiXLaserActor::EndPlay(const EEndPlayReason::Type EndPlayReason) ...@@ -95,26 +95,26 @@ void AOptiXLaserActor::EndPlay(const EEndPlayReason::Type EndPlayReason)
UE_LOG(LogTemp, Warning, TEXT("OptiX Laser Actor EndPlay")); UE_LOG(LogTemp, Warning, TEXT("OptiX Laser Actor EndPlay"));
} }
void AOptiXLaserActor::Tick(float DeltaTime) //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())
//{ //{
// 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() //void AOptiXLaserActor::InitInstancedMeshData()
//{ //{
// // We have a max number of LaserIndices * 20 instances // // We have a max number of LaserIndices * 20 instances
......
...@@ -63,9 +63,12 @@ public: ...@@ -63,9 +63,12 @@ public:
cudaGraphicsUnregisterResource(CudaResourceDepthRight); cudaGraphicsUnregisterResource(CudaResourceDepthRight);
cudaGraphicsUnregisterResource(CudaResourceColorLeft); cudaGraphicsUnregisterResource(CudaResourceColorLeft);
cudaGraphicsUnregisterResource(CudaResourceColorRight); cudaGraphicsUnregisterResource(CudaResourceColorRight);
cudaGraphicsUnregisterResource(CudaResourceIntersections);
PrintLastCudaError("cudaGraphicsUnregisterResource"); PrintLastCudaError("cudaGraphicsUnregisterResource");
cudaFree(CudaLinearMemoryDepth); cudaFree(CudaLinearMemoryDepth);
cudaFree(CudaLinearMemoryColor); cudaFree(CudaLinearMemoryColor);
cudaFree(CudaLinearMemoryIntersections);
PrintLastCudaError("cudaFree"); PrintLastCudaError("cudaFree");
} }
...@@ -79,6 +82,16 @@ public: ...@@ -79,6 +82,16 @@ public:
ProgramToDeleteQueue.Empty(); ProgramToDeleteQueue.Empty();
TextureSamplersToDeleteQueue.Empty(); TextureSamplersToDeleteQueue.Empty();
TransformsToDeleteQueue.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: // ISceneViewExtension interface start, called by the render thread:
...@@ -526,11 +539,16 @@ private: ...@@ -526,11 +539,16 @@ private:
DepthTexture.Reset(); DepthTexture.Reset();
OutputTexture2.Reset(); OutputTexture2.Reset();
DepthTexture2.Reset(); DepthTexture2.Reset();
LaserIntersectionTexture.Reset();
DynamicMaterial.Reset(); DynamicMaterial.Reset();
RegularMaterial.Reset(); RegularMaterial.Reset();
VRMaterial.Reset(); VRMaterial.Reset();
LaserMaterial.Reset();
LaserMaterialDynamic.Reset();
LaserActor.Reset();
TopObject.Reset(); TopObject.Reset();
TopAcceleration.Reset(); TopAcceleration.Reset();
......
...@@ -32,7 +32,7 @@ public: ...@@ -32,7 +32,7 @@ public:
virtual void BeginPlay() override; virtual void BeginPlay() override;
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) 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") //UFUNCTION(BlueprintCallable, /*meta = (BlueprintProtected)*/ Category = "OptiXActor")
//void DisplayLines(); //void DisplayLines();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment