From fce3fb8977f9cbdbaa3870a02b3c698e698656ee Mon Sep 17 00:00:00 2001 From: Michael Fabian Dirks Date: Sun, 17 Sep 2017 22:12:19 +0200 Subject: [PATCH] filter-shape: Use new GS classes --- source/filter-shape.cpp | 6 +++--- source/filter-shape.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/filter-shape.cpp b/source/filter-shape.cpp index 410de56e..bd6e67ef 100644 --- a/source/filter-shape.cpp +++ b/source/filter-shape.cpp @@ -245,7 +245,7 @@ void Filter::Shape::video_render(void *ptr, gs_effect_t *effect) { Filter::Shape::Instance::Instance(obs_data_t *data, obs_source_t *context) : context(context) { obs_enter_graphics(); - m_vertexHelper = new Helper::VertexBuffer(maximumPoints); + m_vertexHelper = new GS::VertexBuffer(maximumPoints); m_vertexHelper->set_uv_layers(1); m_texRender = gs_texrender_create(GS_RGBA, GS_Z32F); obs_leave_graphics(); @@ -263,7 +263,7 @@ void Filter::Shape::Instance::update(obs_data_t *data) { uint32_t points = (uint32_t)obs_data_get_int(data, P_SHAPE_POINTS); m_vertexHelper->resize(points); for (uint32_t point = 0; point < points; point++) { - Helper::Vertex& v = m_vertexHelper->at(point); + GS::Vertex& v = m_vertexHelper->at(point); { auto strings = cache.find(std::make_pair(point, P_SHAPE_POINT_X)); @@ -301,7 +301,7 @@ void Filter::Shape::Instance::update(obs_data_t *data) { } drawmode = (gs_draw_mode)obs_data_get_int(data, P_SHAPE_MODE); obs_enter_graphics(); - m_vertexBuffer = m_vertexHelper->update(); + m_vertexBuffer = m_vertexHelper->get(); obs_leave_graphics(); } diff --git a/source/filter-shape.h b/source/filter-shape.h index 7d4b4f3f..cd9829ee 100644 --- a/source/filter-shape.h +++ b/source/filter-shape.h @@ -19,7 +19,7 @@ #pragma once #include "plugin.h" -#include "gs-helper.h" +#include "gs-vertexbuffer.h" #define P_SHAPE "Shape" #define P_SHAPE_LOOP "Shape.Loop" @@ -78,7 +78,7 @@ namespace Filter { private: obs_source_t *context; gs_effect_t *customEffect; - Helper::VertexBuffer *m_vertexHelper; + GS::VertexBuffer *m_vertexHelper; gs_vertbuffer_t *m_vertexBuffer; gs_draw_mode drawmode; gs_texrender_t *m_texRender;