mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-10 22:05:06 +00:00
filter-transform: Destructor comes before Constructors
This commit is contained in:
parent
c1441e72c0
commit
ff6176d7bc
2 changed files with 10 additions and 10 deletions
|
@ -297,6 +297,15 @@ void filter::TransformAddon::video_render(void* ptr, gs_effect_t* effect)
|
|||
reinterpret_cast<Transform*>(ptr)->video_render(effect);
|
||||
}
|
||||
|
||||
filter::Transform::~Transform()
|
||||
{
|
||||
obs_enter_graphics();
|
||||
shape_rt.reset();
|
||||
source_rt.reset();
|
||||
vertex_buffer.reset();
|
||||
obs_leave_graphics();
|
||||
}
|
||||
|
||||
filter::Transform::Transform(obs_data_t* data, obs_source_t* context)
|
||||
: source_context(context), is_orthographic(true), field_of_view(90.0), is_inactive(false), is_hidden(false),
|
||||
is_mesh_update_required(false), rotation_order(RotationOrder::ZXY)
|
||||
|
@ -323,15 +332,6 @@ filter::Transform::Transform(obs_data_t* data, obs_source_t* context)
|
|||
update(data);
|
||||
}
|
||||
|
||||
filter::Transform::~Transform()
|
||||
{
|
||||
obs_enter_graphics();
|
||||
shape_rt.reset();
|
||||
source_rt.reset();
|
||||
vertex_buffer.reset();
|
||||
obs_leave_graphics();
|
||||
}
|
||||
|
||||
void filter::Transform::update(obs_data_t* data)
|
||||
{
|
||||
// Camera
|
||||
|
|
|
@ -84,8 +84,8 @@ namespace filter {
|
|||
std::unique_ptr<util::vec3a> shear;
|
||||
|
||||
public:
|
||||
Transform(obs_data_t*, obs_source_t*);
|
||||
~Transform();
|
||||
Transform(obs_data_t*, obs_source_t*);
|
||||
|
||||
void update(obs_data_t*);
|
||||
uint32_t get_width();
|
||||
|
|
Loading…
Reference in a new issue