20 lines
		
	
	
		
			867 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			867 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#include "type.h"
 | 
						|
#include "render/renderapi.h"
 | 
						|
namespace vkn {
 | 
						|
	using api::BufferDesc;
 | 
						|
	struct VulkanContext : public api::RenderContext {
 | 
						|
		VkFence		surfaceFence;
 | 
						|
		VkSemaphore surfaceSemaphore;
 | 
						|
		VkSemaphore presentSemaphore;
 | 
						|
		VkCommandBuffer command;
 | 
						|
		void SetScissor(uint32_t x, uint32_t y, uint32_t width, uint32_t height) override;
 | 
						|
		void SetViewport(float x, float y, float width, float height, float min_depth, float max_depth) override;
 | 
						|
		void BindIndexBuffer(BufferDesc desc, uint32_t index_stride) override;
 | 
						|
		void BindVertexBuffer(BufferDesc desc) override;
 | 
						|
		void BindVertexBuffers(uint32_t buffer_count, const BufferDesc* descs, const uint32_t* offsets)override;
 | 
						|
		void DrawIndexed(uint32_t index_count, uint32_t first_index, uint32_t first_vertex) override;
 | 
						|
 | 
						|
		void BeginRecord(VkCommandBufferUsageFlags flag);
 | 
						|
		void EndRecord(VkQueue queue);
 | 
						|
	};
 | 
						|
} |