]> git.sesse.net Git - casparcg/commitdiff
2.1.0: Renamed ogl::context to ogl::device.
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Thu, 16 Feb 2012 16:24:45 +0000 (16:24 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Thu, 16 Feb 2012 16:24:45 +0000 (16:24 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.1.0@2434 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

18 files changed:
accelerator/accelerator.cpp
accelerator/accelerator.vcxproj
accelerator/accelerator.vcxproj.filters
accelerator/cpu/image/image_mixer.cpp
accelerator/ogl/image/image_kernel.cpp
accelerator/ogl/image/image_kernel.h
accelerator/ogl/image/image_mixer.cpp
accelerator/ogl/image/image_mixer.h
accelerator/ogl/image/image_shader.cpp
accelerator/ogl/image/image_shader.h
accelerator/ogl/util/data_frame.cpp
accelerator/ogl/util/data_frame.h
accelerator/ogl/util/device.cpp [moved from accelerator/ogl/util/context.cpp with 80% similarity]
accelerator/ogl/util/device.h [moved from accelerator/ogl/util/context.h with 92% similarity]
accelerator/ogl/util/device_buffer.cpp
accelerator/ogl/util/device_buffer.h
accelerator/ogl/util/host_buffer.cpp
accelerator/ogl/util/shader.h

index 19d93ca8f4487b6aba5641ef26b635b021c41cc1..9291c82f0c75573ea0c5978fd6f94d7a1ffebba1 100644 (file)
@@ -5,7 +5,7 @@
 #include "cpu/image/image_mixer.h"\r
 #include "ogl/image/image_mixer.h"\r
 \r
-#include "ogl/util/context.h"\r
+#include "ogl/util/device.h"\r
 \r
 #include <tbb/mutex.h>\r
 \r
@@ -15,7 +15,7 @@ struct accelerator::impl
 {\r
        const std::wstring                              path_;\r
        tbb::mutex                                              mutex_;\r
-       std::shared_ptr<ogl::context>   ogl_context_;\r
+       std::shared_ptr<ogl::device>    ogl_device_;\r
 \r
        impl(const std::wstring& path)\r
                : path_(path)\r
@@ -30,10 +30,10 @@ struct accelerator::impl
                        {\r
                                tbb::mutex::scoped_lock lock(mutex_);\r
 \r
-                               if(!ogl_context_)\r
-                                       ogl_context_.reset(new ogl::context());\r
+                               if(!ogl_device_)\r
+                                       ogl_device_.reset(new ogl::device());\r
 \r
-                               return spl::make_unique<ogl::image_mixer>(spl::make_shared_ptr(ogl_context_));\r
+                               return spl::make_unique<ogl::image_mixer>(spl::make_shared_ptr(ogl_device_));\r
                        }\r
                }\r
                catch(...)\r
index 79bc8d896be79dddd3e77be59177eedf96646692..713c9f82bbf3d60764a7e6ccad8df508fbe17e7d 100644 (file)
     <ClInclude Include="ogl\image\image_kernel.h" />\r
     <ClInclude Include="ogl\image\image_mixer.h" />\r
     <ClInclude Include="ogl\image\image_shader.h" />\r
-    <ClInclude Include="ogl\util\context.h" />\r
+    <ClInclude Include="ogl\util\device.h" />\r
     <ClInclude Include="ogl\util\device_buffer.h" />\r
     <ClInclude Include="ogl\util\host_buffer.h" />\r
     <ClInclude Include="ogl\util\shader.h" />\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../../StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../../StdAfx.h</PrecompiledHeaderFile>\r
     </ClCompile>\r
-    <ClCompile Include="ogl\util\context.cpp">\r
+    <ClCompile Include="ogl\util\device.cpp">\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../../StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../../StdAfx.h</PrecompiledHeaderFile>\r
     </ClCompile>\r
index 57822db080ac5365f3c1d1267751d08601b6d2b2..4f852f9f3ecd47a6cd698afb09398a47dc87d3be 100644 (file)
@@ -37,9 +37,6 @@
     <ClInclude Include="ogl\image\image_kernel.h">\r
       <Filter>source\ogl\image</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="ogl\util\context.h">\r
-      <Filter>source\ogl\util</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="ogl\util\device_buffer.h">\r
       <Filter>source\ogl\util</Filter>\r
     </ClInclude>\r
@@ -64,6 +61,9 @@
     <ClInclude Include="ogl\util\data_frame.h">\r
       <Filter>source\ogl\util</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="ogl\util\device.h">\r
+      <Filter>source\ogl\util</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClCompile Include="StdAfx.cpp" />\r
@@ -76,9 +76,6 @@
     <ClCompile Include="ogl\image\image_kernel.cpp">\r
       <Filter>source\ogl\image</Filter>\r
     </ClCompile>\r
-    <ClCompile Include="ogl\util\context.cpp">\r
-      <Filter>source\ogl\util</Filter>\r
-    </ClCompile>\r
     <ClCompile Include="ogl\util\device_buffer.cpp">\r
       <Filter>source\ogl\util</Filter>\r
     </ClCompile>\r
     <ClCompile Include="ogl\util\data_frame.cpp">\r
       <Filter>source\ogl\util</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="ogl\util\device.cpp">\r
+      <Filter>source\ogl\util</Filter>\r
+    </ClCompile>\r
   </ItemGroup>\r
 </Project>
\ No newline at end of file
index 3d9423f2b13471337e050de46cbcf8c223a3efae..b11d0accc80a807522b699d1b9f65fcacdf771d5 100644 (file)
@@ -151,7 +151,7 @@ static void kernel(uint8_t* dest, const uint8_t* source, size_t count)
 class image_renderer\r
 {\r
        std::pair<std::vector<item>, boost::shared_future<boost::iterator_range<const uint8_t*>>>               last_image_;\r
-       tbb::concurrent_unordered_map<int, tbb::concurrent_bounded_queue<std::shared_ptr<SwsContext>>>  sws_contexts_;\r
+       tbb::concurrent_unordered_map<int, tbb::concurrent_bounded_queue<std::shared_ptr<SwsContext>>>  sws_devices_;\r
        tbb::concurrent_bounded_queue<spl::shared_ptr<host_buffer>>                                                                             temp_buffers_;\r
 public:        \r
        boost::shared_future<boost::iterator_range<const uint8_t*>> operator()(std::vector<item> items, const core::video_format_desc& format_desc)\r
@@ -261,17 +261,17 @@ private:
                                                                \r
                        int key = ((input_av_frame->width << 22) & 0xFFC00000) | ((input_av_frame->height << 6) & 0x003FC000) | ((input_av_frame->format << 7) & 0x00007F00);\r
                                                \r
-                       auto& pool = sws_contexts_[key];\r
+                       auto& pool = sws_devices_[key];\r
 \r
-                       std::shared_ptr<SwsContext> sws_context;\r
-                       if(!pool.try_pop(sws_context))\r
+                       std::shared_ptr<SwsContext> sws_device;\r
+                       if(!pool.try_pop(sws_device))\r
                        {\r
                                double param;\r
-                               sws_context.reset(sws_getContext(input_av_frame->width, input_av_frame->height, static_cast<PixelFormat>(input_av_frame->format), width, height, PIX_FMT_BGRA, SWS_BILINEAR, nullptr, nullptr, &param), sws_freeContext);\r
+                               sws_device.reset(sws_getContext(input_av_frame->width, input_av_frame->height, static_cast<PixelFormat>(input_av_frame->format), width, height, PIX_FMT_BGRA, SWS_BILINEAR, nullptr, nullptr, &param), sws_freeContext);\r
                        }\r
                        \r
-                       if(!sws_context)                                \r
-                               BOOST_THROW_EXCEPTION(operation_failed() << msg_info("Could not create software scaling context.") << boost::errinfo_api_function("sws_getContext"));                           \r
+                       if(!sws_device)                         \r
+                               BOOST_THROW_EXCEPTION(operation_failed() << msg_info("Could not create software scaling device.") << boost::errinfo_api_function("sws_getContext"));                            \r
                \r
                        auto dest_frame = spl::make_shared<host_buffer>(width*height*4);\r
                        temp_buffers_.push(dest_frame);\r
@@ -281,8 +281,8 @@ private:
                                avcodec_get_frame_defaults(dest_av_frame.get());                        \r
                                avpicture_fill(reinterpret_cast<AVPicture*>(dest_av_frame.get()), dest_frame->data(), PIX_FMT_BGRA, width, height);\r
                                \r
-                               sws_scale(sws_context.get(), input_av_frame->data, input_av_frame->linesize, 0, input_av_frame->height, dest_av_frame->data, dest_av_frame->linesize);                          \r
-                               pool.push(sws_context);\r
+                               sws_scale(sws_device.get(), input_av_frame->data, input_av_frame->linesize, 0, input_av_frame->height, dest_av_frame->data, dest_av_frame->linesize);                           \r
+                               pool.push(sws_device);\r
                        }\r
                                        \r
                        for(std::size_t n = 0; n < source_items.size(); ++n)\r
index dd16d2596054431e8b8036439afa244415e6fe67..2c55183f76aaf516dbc5d5af97537d758ce94462 100644 (file)
@@ -28,7 +28,7 @@
 \r
 #include "../util/shader.h"\r
 #include "../util/device_buffer.h"\r
-#include "../util/context.h"\r
+#include "../util/device.h"\r
 \r
 #include <common/except.h>\r
 #include <common/gl/gl_check.h>\r
@@ -56,11 +56,11 @@ GLubyte lower_pattern[] = {
 \r
 struct image_kernel::impl : boost::noncopyable\r
 {      \r
-       spl::shared_ptr<context>        ogl_;\r
+       spl::shared_ptr<device> ogl_;\r
        spl::shared_ptr<shader>         shader_;\r
        bool                                    blend_modes_;\r
                                                        \r
-       impl(const spl::shared_ptr<context>& ogl)\r
+       impl(const spl::shared_ptr<device>& ogl)\r
                : ogl_(ogl)\r
                , shader_(ogl_->invoke([&]{return get_image_shader(blend_modes_);}))\r
        {\r
@@ -226,7 +226,7 @@ struct image_kernel::impl : boost::noncopyable
        }\r
 };\r
 \r
-image_kernel::image_kernel(const spl::shared_ptr<context>& ogl) : impl_(new impl(ogl)){}\r
+image_kernel::image_kernel(const spl::shared_ptr<device>& ogl) : impl_(new impl(ogl)){}\r
 void image_kernel::draw(draw_params&& params)\r
 {\r
        impl_->draw(std::move(params));\r
index 96387bebff5e7baad4e0835a43d965d224b27a90..000739a4868095e0e4812bc5d3688ea0ee046120 100644 (file)
@@ -65,7 +65,7 @@ struct draw_params sealed
 class image_kernel sealed : boost::noncopyable\r
 {\r
 public:\r
-       image_kernel(const spl::shared_ptr<class context>& ogl);\r
+       image_kernel(const spl::shared_ptr<class device>& ogl);\r
        void draw(draw_params&& params);\r
        bool has_blend_modes() const;\r
 private:\r
index 433592a6964afb5f7799a89ecfe4e4b7f03d042d..d2d8509bc7433e6e488dbb719bb143a1096d56ed 100644 (file)
@@ -26,7 +26,7 @@
 #include "image_kernel.h"\r
 \r
 #include "../util/data_frame.h"\r
-#include "../util/context.h"\r
+#include "../util/device.h"\r
 #include "../util/host_buffer.h"\r
 #include "../util/device_buffer.h"\r
 \r
@@ -110,11 +110,11 @@ bool operator!=(const layer& lhs, const layer& rhs)
 \r
 class image_renderer\r
 {\r
-       spl::shared_ptr<context>                                                                                                                                                ogl_;\r
+       spl::shared_ptr<device>                                                                                                                                         ogl_;\r
        image_kernel                                                                                                                                                                    kernel_;\r
        std::pair<std::vector<layer>, boost::shared_future<boost::iterator_range<const uint8_t*>>>              last_image_;    \r
 public:\r
-       image_renderer(const spl::shared_ptr<context>& ogl)\r
+       image_renderer(const spl::shared_ptr<device>& ogl)\r
                : ogl_(ogl)\r
                , kernel_(ogl_)\r
        {\r
@@ -377,12 +377,12 @@ private:
                \r
 struct image_mixer::impl : boost::noncopyable\r
 {      \r
-       spl::shared_ptr<context>                        ogl_;\r
+       spl::shared_ptr<device>                 ogl_;\r
        image_renderer                                          renderer_;\r
        std::vector<core::image_transform>      transform_stack_;\r
        std::vector<layer>                                      layers_; // layer/stream/items\r
 public:\r
-       impl(const spl::shared_ptr<context>& ogl) \r
+       impl(const spl::shared_ptr<device>& ogl) \r
                : ogl_(ogl)\r
                , renderer_(ogl)\r
                , transform_stack_(1)   \r
@@ -450,7 +450,7 @@ public:
        }\r
 };\r
 \r
-image_mixer::image_mixer(const spl::shared_ptr<context>& ogl) : impl_(new impl(ogl)){}\r
+image_mixer::image_mixer(const spl::shared_ptr<device>& ogl) : impl_(new impl(ogl)){}\r
 void image_mixer::push(const core::frame_transform& transform){impl_->push(transform);}\r
 void image_mixer::visit(const core::data_frame& frame){impl_->visit(frame);}\r
 void image_mixer::pop(){impl_->pop();}\r
index b530a5e65da65872d0242d1751e7c2a0cd110ee2..49414136ad165b9a227e78be2ddfabe2d2265eac 100644 (file)
@@ -42,7 +42,7 @@ namespace caspar { namespace accelerator { namespace ogl {
 class image_mixer sealed : public core::image_mixer\r
 {\r
 public:\r
-       image_mixer(const spl::shared_ptr<class context>& ogl);\r
+       image_mixer(const spl::shared_ptr<class device>& ogl);\r
        \r
        virtual void push(const core::frame_transform& frame);\r
        virtual void visit(const core::data_frame& frame);\r
index 1e78424338d1041c24cb9fdf6343ce46e1d002d9..504e70bbad3f764bd2d390ef9b44fb4d84b3f1ee 100644 (file)
@@ -24,7 +24,7 @@
 #include "image_shader.h"\r
 \r
 #include "../util/shader.h"\r
-#include "../util/context.h"\r
+#include "../util/device.h"\r
 \r
 #include "blending_glsl.h"\r
 \r
index 0cb72e7e442a6cf952e6a3f8a880bc4ebf1d2aab..f9b2c9f718a491fa5e522cbb223c6d1ae9fe40c5 100644 (file)
@@ -26,7 +26,7 @@
 namespace caspar { namespace accelerator { namespace ogl {\r
 \r
 class shader;\r
-class context;\r
+class device;\r
 \r
 struct texture_id\r
 {\r
index 591a6195c8501764ad06a9c9e9716f4c2583dd55..2bd6c6a7bdff8c0764cf3066cb2b5938919b3a15 100644 (file)
@@ -23,7 +23,7 @@
 \r
 #include "data_frame.h"\r
 \r
-#include "context.h"\r
+#include "device.h"\r
 #include "host_buffer.h"\r
 #include "device_buffer.h"\r
 \r
@@ -37,7 +37,7 @@ namespace caspar { namespace accelerator { namespace ogl {
                                                                                                                                                                                                                                                                                                                        \r
 struct data_frame::impl : boost::noncopyable\r
 {                      \r
-       std::shared_ptr<context>                                                ogl_;\r
+       std::shared_ptr<device>                                         ogl_;\r
        std::vector<spl::shared_ptr<ogl::host_buffer>>  buffers_;\r
        core::audio_buffer                                                              audio_data_;\r
        const core::pixel_format_desc                                   desc_;\r
@@ -52,7 +52,7 @@ struct data_frame::impl : boost::noncopyable
        {\r
        }\r
 \r
-       impl(const spl::shared_ptr<ogl::context>& ogl, const void* tag, const core::pixel_format_desc& desc, double frame_rate, core::field_mode field_mode) \r
+       impl(const spl::shared_ptr<ogl::device>& ogl, const void* tag, const core::pixel_format_desc& desc, double frame_rate, core::field_mode field_mode) \r
                : ogl_(ogl)\r
                , desc_(desc)\r
                , tag_(tag)\r
@@ -75,7 +75,7 @@ struct data_frame::impl : boost::noncopyable
 };\r
        \r
 data_frame::data_frame(const void* tag) : impl_(new impl(tag)){}\r
-data_frame::data_frame(const spl::shared_ptr<ogl::context>& ogl, const void* tag, const core::pixel_format_desc& desc, double frame_rate, core::field_mode field_mode) \r
+data_frame::data_frame(const spl::shared_ptr<ogl::device>& ogl, const void* tag, const core::pixel_format_desc& desc, double frame_rate, core::field_mode field_mode) \r
        : impl_(new impl(ogl, tag, desc, frame_rate, field_mode)){}\r
 data_frame::data_frame(data_frame&& other) : impl_(std::move(other.impl_)){}\r
 data_frame& data_frame::operator=(data_frame&& other)\r
index b85c4eae1a9af1a0fa5734fbdf7d97df02f3f16b..a8d4921003ad8bfec7d34897e7af9431c455c4a3 100644 (file)
@@ -44,7 +44,7 @@ class data_frame sealed : public core::data_frame
        data_frame& operator=(const data_frame);\r
 public:        \r
        explicit data_frame(const void* tag);\r
-       explicit data_frame(const spl::shared_ptr<class context>& ogl, const void* tag, const core::pixel_format_desc& desc, double frame_rate, core::field_mode field_mode);\r
+       explicit data_frame(const spl::shared_ptr<class device>& ogl, const void* tag, const core::pixel_format_desc& desc, double frame_rate, core::field_mode field_mode);\r
 \r
        data_frame(data_frame&& other);\r
        data_frame& operator=(data_frame&& other);\r
similarity index 80%
rename from accelerator/ogl/util/context.cpp
rename to accelerator/ogl/util/device.cpp
index 32163eef3cf25006a0d207d620fa2e94964cb253..72b4432540db68cd3942b5b78788a9fedae98616 100644 (file)
@@ -23,7 +23,7 @@
 \r
 #include "../../stdafx.h"\r
 \r
-#include "context.h"\r
+#include "device.h"\r
 \r
 #include "shader.h"\r
 \r
@@ -50,10 +50,10 @@ tbb::atomic<int> g_count = tbb::atomic<int>();
 \r
 namespace caspar { namespace accelerator { namespace ogl {\r
                \r
-struct context::impl : public std::enable_shared_from_this<impl>\r
+struct device::impl : public std::enable_shared_from_this<impl>\r
 {\r
-       std::unique_ptr<sf::Context> context_;\r
-       std::unique_ptr<sf::Context> host_alloc_context_;\r
+       std::unique_ptr<sf::Context> device_;\r
+       std::unique_ptr<sf::Context> host_alloc_device_;\r
        \r
        std::array<tbb::concurrent_unordered_map<int, tbb::concurrent_bounded_queue<std::shared_ptr<device_buffer>>>, 4>        device_pools_;\r
        std::array<tbb::concurrent_unordered_map<int, tbb::concurrent_bounded_queue<std::shared_ptr<host_buffer>>>, 2>          host_pools_;\r
@@ -65,17 +65,17 @@ struct context::impl : public std::enable_shared_from_this<impl>
                                \r
        impl(executor& executor) \r
                : executor_(executor)\r
-               , host_alloc_executor_(L"OpenGL allocation context")\r
+               , host_alloc_executor_(L"OpenGL allocation device")\r
        {\r
                if(g_count++ > 1)\r
-                       CASPAR_LOG(warning) << L"Multiple OGL contexts.";\r
+                       CASPAR_LOG(warning) << L"Multiple OGL devices.";\r
 \r
                CASPAR_LOG(info) << L"Initializing OpenGL Device.";\r
                \r
                auto ctx1 = executor_.invoke([=]() -> HGLRC \r
                {\r
-                       context_.reset(new sf::Context());\r
-                       context_->SetActive(true);              \r
+                       device_.reset(new sf::Context());\r
+                       device_->SetActive(true);               \r
                                                \r
                        if (glewInit() != GLEW_OK)\r
                                BOOST_THROW_EXCEPTION(gl::ogl_exception() << msg_info("Failed to initialize GLEW."));\r
@@ -88,24 +88,24 @@ struct context::impl : public std::enable_shared_from_this<impl>
                        \r
                        auto ctx1 = wglGetCurrentContext();\r
                        \r
-                       context_->SetActive(false);\r
+                       device_->SetActive(false);\r
 \r
                        return ctx1;\r
                });\r
 \r
                host_alloc_executor_.invoke([=]\r
                {\r
-                       host_alloc_context_.reset(new sf::Context());\r
-                       host_alloc_context_->SetActive(true);   \r
+                       host_alloc_device_.reset(new sf::Context());\r
+                       host_alloc_device_->SetActive(true);    \r
                        auto ctx2 = wglGetCurrentContext();\r
 \r
                        if(!wglShareLists(ctx1, ctx2))\r
-                               BOOST_THROW_EXCEPTION(gl::ogl_exception() << msg_info("Failed to share OpenGL contexts."));\r
+                               BOOST_THROW_EXCEPTION(gl::ogl_exception() << msg_info("Failed to share OpenGL devices."));\r
                });\r
 \r
                executor_.invoke([=]\r
                {               \r
-                       context_->SetActive(true);\r
+                       device_->SetActive(true);\r
                });\r
                \r
                CASPAR_LOG(info) << L"Successfully initialized OpenGL " << version();\r
@@ -115,7 +115,7 @@ struct context::impl : public std::enable_shared_from_this<impl>
        {\r
                host_alloc_executor_.invoke([=]\r
                {\r
-                       host_alloc_context_.reset();\r
+                       host_alloc_device_.reset();\r
                        BOOST_FOREACH(auto& pool, host_pools_)\r
                                pool.clear();\r
                });\r
@@ -126,7 +126,7 @@ struct context::impl : public std::enable_shared_from_this<impl>
                                pool.clear();\r
                        glDeleteFramebuffers(1, &fbo_);\r
 \r
-                       context_.reset();\r
+                       device_.reset();\r
                });\r
        }\r
 \r
@@ -242,16 +242,16 @@ struct context::impl : public std::enable_shared_from_this<impl>
        }\r
 };\r
 \r
-context::context() \r
-       : executor_(L"context")\r
+device::device() \r
+       : executor_(L"device")\r
        , impl_(new impl(executor_))\r
 {\r
 }\r
        \r
-spl::shared_ptr<device_buffer>                                                 context::create_device_buffer(int width, int height, int stride){return impl_->create_device_buffer(width, height, stride);}\r
-spl::shared_ptr<host_buffer>                                                   context::create_host_buffer(int size, host_buffer::usage usage){return impl_->create_host_buffer(size, usage);}\r
-boost::unique_future<spl::shared_ptr<device_buffer>>   context::copy_async(spl::shared_ptr<host_buffer>& source, int width, int height, int stride){return impl_->copy_async(source, width, height, stride);}\r
-std::wstring                                                                                   context::version(){return impl_->version();}\r
+spl::shared_ptr<device_buffer>                                                 device::create_device_buffer(int width, int height, int stride){return impl_->create_device_buffer(width, height, stride);}\r
+spl::shared_ptr<host_buffer>                                                   device::create_host_buffer(int size, host_buffer::usage usage){return impl_->create_host_buffer(size, usage);}\r
+boost::unique_future<spl::shared_ptr<device_buffer>>   device::copy_async(spl::shared_ptr<host_buffer>& source, int width, int height, int stride){return impl_->copy_async(source, width, height, stride);}\r
+std::wstring                                                                                   device::version(){return impl_->version();}\r
 \r
 \r
 }}}\r
similarity index 92%
rename from accelerator/ogl/util/context.h
rename to accelerator/ogl/util/device.h
index 331db0b5bad178447b9cfc6a6184e3fe97476ca1..540e510456381305b719870ffd0cac2e52c96331 100644 (file)
 \r
 namespace caspar { namespace accelerator { namespace ogl {\r
        \r
-class context : public std::enable_shared_from_this<context>, boost::noncopyable\r
+class device : public std::enable_shared_from_this<device>, boost::noncopyable\r
 {      \r
        executor executor_;\r
 public:                \r
-       context();\r
+       device();\r
                \r
        spl::shared_ptr<device_buffer>                                                  create_device_buffer(int width, int height, int stride);\r
        spl::shared_ptr<host_buffer>                                                    create_host_buffer(int size, host_buffer::usage usage);\r
index 18cc0a297e4bab20ce3f28f5ae5dc9f20cf93517..d9b317b421f754dcf53a12f59dee9ce5972fb026 100644 (file)
@@ -22,7 +22,7 @@
 #include "../../stdafx.h"\r
 \r
 #include "device_buffer.h"\r
-#include "context.h"\r
+#include "device.h"\r
 \r
 #include <common/except.h>\r
 #include <common/gl/gl_check.h>\r
index cae7570bd10689e010ded562e28793eb92f5a815..c827d11e1681b4e7d270c1f69a15f94ef748448c 100644 (file)
@@ -31,7 +31,7 @@ FORWARD1(boost, template<typename> class unique_future);
 namespace caspar { namespace accelerator { namespace ogl {\r
                \r
 class host_buffer;\r
-class context;\r
+class device;\r
 \r
 class device_buffer : boost::noncopyable\r
 {\r
index d5f7cd64b01b39333f66a6b08648d65e2714ac09..b866b0aaf9b150e60576431c4a7a42eb1e87c34a 100644 (file)
@@ -24,7 +24,7 @@
 #include "host_buffer.h"\r
 \r
 #include "device_buffer.h"\r
-#include "context.h"\r
+#include "device.h"\r
 \r
 #include <common/except.h>\r
 #include <common/gl/gl_check.h>\r
index 426d011704c0957d6856d779e5a33bb57fd01c5b..d1e7f24de208e57aab6c97f6e9a396e3811303e4 100644 (file)
@@ -39,7 +39,7 @@ public:
        void set(const std::string& name, double value);\r
        void use() const;\r
 private:\r
-       friend class context;\r
+       friend class device;\r
        struct impl;\r
        spl::shared_ptr<impl> impl_;\r
 \r