diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f7a92a..c1281c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,6 +82,8 @@ list (APPEND sources semaphore.hpp shader_module.cpp shader_module.hpp + surface.cpp + surface.hpp traits.hpp ) diff --git a/fwd.hpp b/fwd.hpp index 71d464c..e4ad036 100644 --- a/fwd.hpp +++ b/fwd.hpp @@ -45,6 +45,7 @@ namespace cruft::vk { struct device_memory; struct buffer; struct buffer_view; + struct surface; class error; template class error_code; @@ -59,7 +60,8 @@ namespace cruft::vk { #define VK_OWNED_TYPE_MAP(FUNC) \ MAP(FUNC, \ - queue) + queue, \ + surface) #define VK_TYPE_MAP(FUNC) \ MAP(FUNC,instance) \ diff --git a/surface.cpp b/surface.cpp new file mode 100644 index 0000000..4851431 --- /dev/null +++ b/surface.cpp @@ -0,0 +1,23 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright: + * 2017, Danny Robson + */ + +#include "./surface.hpp" + +#include "./instance.hpp" + +using cruft::vk::surface; + diff --git a/surface.hpp b/surface.hpp new file mode 100644 index 0000000..6419ae0 --- /dev/null +++ b/surface.hpp @@ -0,0 +1,32 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright: + * 2017, Danny Robson + */ + +#ifndef CRUFT_VK_SURFACE_HPP +#define CRUFT_VK_SURFACE_HPP + +#include "./vk.hpp" +#include "./instance.hpp" +#include "./object.hpp" + + +namespace cruft::vk { + struct surface : public owned { + using owned::owned; + }; +}; + +#endif