mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-10 22:05:06 +00:00
plugin: If CUDA is requested, ensure it is loaded first
This commit is contained in:
parent
0f92a4b499
commit
5279993f4b
2 changed files with 12 additions and 0 deletions
|
@ -975,6 +975,9 @@ if(HAVE_NVIDIA_CUDA)
|
|||
"source/nvidia/cuda/nvidia-cuda-stream.hpp"
|
||||
"source/nvidia/cuda/nvidia-cuda-stream.cpp"
|
||||
)
|
||||
list(APPEND PROJECT_DEFINITIONS
|
||||
ENABLE_NVIDIA_CUDA
|
||||
)
|
||||
endif()
|
||||
|
||||
if(REQUIRE_OBSFE AND HAVE_OBSFE)
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
#include "obs/gs/gs-vertexbuffer.hpp"
|
||||
#include "obs/obs-source-tracker.hpp"
|
||||
|
||||
#ifdef ENABLE_NVIDIA_CUDA
|
||||
#include "nvidia/cuda/nvidia-cuda-obs.hpp"
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_ENCODER_FFMPEG
|
||||
#include "encoders/encoder-ffmpeg.hpp"
|
||||
#endif
|
||||
|
@ -89,6 +93,11 @@ try {
|
|||
// Initialize Source Tracker
|
||||
streamfx::obs::source_tracker::initialize();
|
||||
|
||||
#ifdef ENABLE_NVIDIA_CUDA
|
||||
// Initialize CUDA if features requested it.
|
||||
auto cuda = ::streamfx::nvidia::cuda::obs::get();
|
||||
#endif
|
||||
|
||||
// GS Stuff
|
||||
{
|
||||
_gs_fstri_vb = std::make_shared<streamfx::obs::gs::vertex_buffer>(uint32_t(3), uint8_t(1));
|
||||
|
|
Loading…
Reference in a new issue