Skip to content

Commit

Permalink
Runtime: Rename the exported glfw3wgpi function
Browse files Browse the repository at this point in the history
  • Loading branch information
rdw-software committed Jan 10, 2025
1 parent ec0c291 commit b4c911c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Runtime/Bindings/FFI/glfw/glfw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct static_glfw_exports_table {
const char* (*glfw_version)(void);
int (*glfw_find_constant)(const char* name);
WGPUSurface (*glfw_get_wgpu_surface)(WGPUInstance instance, GLFWwindow* window);
WGPUSurface (*glfw_create_window_wgpu_surface)(WGPUInstance instance, GLFWwindow* window);
int (*glfw_init)(void);
void (*glfw_terminate)(void);
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Bindings/FFI/glfw/glfw_exports.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ struct static_glfw_exports_table {
const char* (*glfw_version)(void);
int (*glfw_find_constant)(const char* name);

WGPUSurface (*glfw_get_wgpu_surface)(WGPUInstance instance, GLFWwindow* window);
WGPUSurface (*glfw_create_window_wgpu_surface)(WGPUInstance instance, GLFWwindow* window);

int (*glfw_init)(void);
void (*glfw_terminate)(void);
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Bindings/FFI/glfw/glfw_ffi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ namespace glfw_ffi {
exports.glfw_version = glfw_version;
exports.glfw_find_constant = glfw_find_constant;

exports.glfw_get_wgpu_surface = glfwGetWGPUSurface;
exports.glfw_create_window_wgpu_surface = glfwCreateWindowWGPUSurface;

exports.glfw_init = glfwInit;
exports.glfw_terminate = glfwTerminate;
Expand Down
2 changes: 1 addition & 1 deletion Tests/BDD/glfw-library.spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe("glfw", function()
local exportedApiSurface = {
"glfw_version",
"glfw_find_constant",
"glfw_get_wgpu_surface",
"glfw_create_window_wgpu_surface",
"glfw_init",
"glfw_terminate",
"glfw_poll_events",
Expand Down
2 changes: 1 addition & 1 deletion Tests/Integration/glfw-webgpu-surface.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ local window = glfw.bindings.glfw_create_window(640, 480, "WebGPU Surface Test",
assert(window, "Failed to create window")

print("Requesting adapter...")
local surface = glfw.bindings.glfw_get_wgpu_surface(instance, window)
local surface = glfw.bindings.glfw_create_window_wgpu_surface(instance, window)
assert(surface, "Failed to create WebGPU surface")

local adapterOpts = ffi.new("WGPURequestAdapterOptions")
Expand Down
2 changes: 1 addition & 1 deletion Tests/Integration/rml-glfw-wgpu-setup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ local function createDevice(window)
error("Could not initialize WebGPU!")
end

local surface = glfw.bindings.glfw_get_wgpu_surface(instance, window)
local surface = glfw.bindings.glfw_create_window_wgpu_surface(instance, window)
assert(surface, "Failed to create WebGPU surface")

local adapterOptions = ffi.new("WGPURequestAdapterOptions")
Expand Down

0 comments on commit b4c911c

Please sign in to comment.