mirror of
https://github.com/love2d/love.git
synced 2026-08-15 07:41:11 +02:00
Merge branch '12.0-development' into text-shaping
This commit is contained in:
@@ -1264,11 +1264,10 @@ void Graphics::createVulkanInstance()
|
||||
createInfo.pApplicationInfo = &appInfo;
|
||||
createInfo.pNext = nullptr;
|
||||
|
||||
auto window = Module::getInstance<love::window::Window>(M_WINDOW);
|
||||
const void *handle = window->getHandle();
|
||||
|
||||
// GetInstanceExtensions works with a null window parameter as long as
|
||||
// SDL_Vulkan_LoadLibrary has been called (which we do earlier).
|
||||
unsigned int count;
|
||||
if (SDL_Vulkan_GetInstanceExtensions((SDL_Window*)handle, &count, nullptr) != SDL_TRUE)
|
||||
if (SDL_Vulkan_GetInstanceExtensions(nullptr, &count, nullptr) != SDL_TRUE)
|
||||
throw love::Exception("couldn't retrieve sdl vulkan extensions");
|
||||
|
||||
std::vector<const char*> extensions = {};
|
||||
@@ -1281,7 +1280,7 @@ void Graphics::createVulkanInstance()
|
||||
size_t additional_extension_count = extensions.size();
|
||||
extensions.resize(additional_extension_count + count);
|
||||
|
||||
if (SDL_Vulkan_GetInstanceExtensions((SDL_Window*)handle, &count, extensions.data() + additional_extension_count) != SDL_TRUE)
|
||||
if (SDL_Vulkan_GetInstanceExtensions(nullptr, &count, extensions.data() + additional_extension_count) != SDL_TRUE)
|
||||
throw love::Exception("couldn't retrieve sdl vulkan extensions");
|
||||
|
||||
createInfo.enabledExtensionCount = static_cast<uint32_t>(extensions.size());
|
||||
|
||||
@@ -420,6 +420,8 @@ int w_Texture_renderTo(lua_State *L)
|
||||
{
|
||||
Graphics::RenderTarget rt(luax_checktexture(L, 1));
|
||||
|
||||
int args = lua_gettop(L);
|
||||
|
||||
int startidx = 2;
|
||||
|
||||
if (rt.texture->getTextureType() != TEXTURE_2D)
|
||||
@@ -455,8 +457,7 @@ int w_Texture_renderTo(lua_State *L)
|
||||
}
|
||||
);
|
||||
|
||||
lua_settop(L, 2); // make sure the function is on top of the stack
|
||||
int status = lua_pcall(L, 0, 0, 0);
|
||||
int status = lua_pcall(L, args - startidx, 0, 0);
|
||||
|
||||
graphics->setRenderTargets(oldtargets);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user