Skip to content

Commit 4db3200

Browse files
committed
add functions: glfwPlatformSupported, glfwGetPlatform, glfwGetError, glfwInitHint
Listed all with: (then selected from) perl -ne 'next if !/^GLFWAPI/; s/\(.*//; /(\w*)$/; print "$1\n"' \ /usr/local/opt/glfw/include/GLFW/glfw3.h >funcs for x in `cat funcs`; do echo -n "$x: "; grep -c $x GLFW.xs; done
1 parent ccf93fa commit 4db3200

3 files changed

Lines changed: 25 additions & 0 deletions

File tree

Changes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
- minimum Perl 5.10 for better Exporter
22
- add constants up to GLFW 3.4
3+
- add functions: glfwPlatformSupported, glfwGetPlatform, glfwGetError, glfwInitHint
34

45
0.0401 2025-03-27
56
- add GLFW_TRANSPARENT_FRAMEBUFFER and glfwGetMonitorWorkarea (#1) - thanks @SeHarrys

GLFW.xs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1682,6 +1682,26 @@ glfwGetTimerFrequency();
16821682
uint64_t
16831683
glfwGetTimerValue();
16841684

1685+
int
1686+
glfwPlatformSupported(int platform);
1687+
1688+
int
1689+
glfwGetPlatform();
1690+
1691+
void
1692+
glfwGetError();
1693+
PREINIT:
1694+
int errcode;
1695+
char* description;
1696+
PPCODE:
1697+
errcode = glfwGetError(&description);
1698+
EXTEND(SP, 2);
1699+
PUSHs(sv_2mortal(newSViv(errcode)));
1700+
PUSHs(!description ? &PL_sv_undef : sv_2mortal(newSVpv(description, 0)));
1701+
1702+
void
1703+
glfwInitHint(int hint, int value);
1704+
16851705
#//-------------------------------------------------------------------
16861706
#// OpenGL not supported (use GLEW)
16871707
#//-------------------------------------------------------------------

lib/OpenGL/GLFW.pm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,10 @@ use Exporter 'import';
352352

353353
my @const = (qw(NULL), sort keys %const_hash);
354354
my @functions = qw(
355+
glfwPlatformSupported
356+
glfwGetPlatform
357+
glfwGetError
358+
glfwInitHint
355359
glfwCreateCursor
356360
glfwCreateStandardCursor
357361
glfwCreateWindow

0 commit comments

Comments
 (0)