this must have been in previous commit
This commit is contained in:
@@ -8,9 +8,7 @@
|
||||
#include "vulkan/vulkan.h"
|
||||
#include "SDL3/SDL.h"
|
||||
#include "vulkan/vulkan_core.h"
|
||||
#include <SDL3/SDL_keycode.h>
|
||||
#define SDL_MAIN_HANDLED
|
||||
#include "SDL3/SDL_main.h"
|
||||
#include "SDL3/SDL_keycode.h"
|
||||
#include "SDL3/SDL_vulkan.h"
|
||||
#include "SDL3/SDL_events.h"
|
||||
|
||||
@@ -234,7 +232,8 @@ EInputKey ISDL_KeyName(SDL_Keycode key)
|
||||
|
||||
void IVideo::Init()
|
||||
{
|
||||
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS);
|
||||
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS))
|
||||
V_printf("%s\n",SDL_GetError());
|
||||
g_window = SDL_CreateWindow("rtt", 1280, 720, SDL_WINDOW_VULKAN);
|
||||
|
||||
unsigned int nExtensionCount = 0;
|
||||
@@ -466,6 +465,16 @@ void IVideo::Frame( float fDelta )
|
||||
beginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
|
||||
vkBeginCommandBuffer(g_vkCommandBuffer, &beginInfo);
|
||||
IVulkan::Frame();
|
||||
VkClearColorValue clear = {
|
||||
.float32 = {
|
||||
1,1,0,1
|
||||
}
|
||||
};
|
||||
VkImageSubresourceRange range = {
|
||||
.levelCount = 1,
|
||||
.layerCount = 1,
|
||||
};
|
||||
vkCmdClearColorImage(g_vkCommandBuffer, g_swapchainImage, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, &clear, 1, &range);
|
||||
vkEndCommandBuffer(g_vkCommandBuffer);
|
||||
|
||||
VkPipelineStageFlags waitStages[] = {VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT};
|
||||
|
||||
Reference in New Issue
Block a user