save code
This commit is contained in:
@@ -54,7 +54,7 @@ public:
|
||||
virtual void render(VkCommandBuffer commandBuffer, long long frameTime);
|
||||
virtual bool isInited() { return inited; }
|
||||
|
||||
void processWithVulkan(uint8_t* data, int width, int height, int rowStride, size_t dataSize, Texture& out_texture, bool srgb);
|
||||
void processWithVulkan(uint8_t* data, int width, int height, int rowStride, size_t dataSize, Texture& out_texture, bool srgb, VkCommandPool pool);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -73,7 +73,9 @@ protected:
|
||||
std::vector<VkFramebuffer> swapChainFramebuffers; // 帧缓冲区
|
||||
VkQueue presentQueue; // 呈现队列
|
||||
|
||||
public:
|
||||
VkCommandPool commandPool;
|
||||
VkCommandPool commandPool_ex;
|
||||
std::vector<VkCommandBuffer> commandBuffers;
|
||||
std::vector<VkSemaphore> imageAvailableSemaphores; // 每个交换链图像一个
|
||||
std::vector<VkSemaphore> renderFinishedSemaphores; // 每个交换链图像一个
|
||||
@@ -85,10 +87,10 @@ protected:
|
||||
|
||||
|
||||
protected:
|
||||
void loadTexture(std::string path, Texture& tex, bool srgb);
|
||||
void loadTexture(std::vector<unsigned char>& image_data, size_t image_size, int w, int h, Texture& tex, bool srgb);
|
||||
void loadTexture(std::string path, Texture& tex, bool srgb, VkCommandPool pool);
|
||||
void loadTexture(std::vector<unsigned char>& image_data, size_t image_size, int w, int h, Texture& tex, bool srgb, VkCommandPool pool);
|
||||
#ifdef _WIN32
|
||||
void loadTextureExample(std::wstring path, Texture& tex, bool srgb);
|
||||
void loadTextureExample(std::wstring path, Texture& tex, bool srgb, VkCommandPool pool);
|
||||
#endif
|
||||
|
||||
uint32_t findMemoryType(VkPhysicalDevice physicalDevice, uint32_t typeFilter,
|
||||
|
||||
Reference in New Issue
Block a user