WebGPU-Direct
view release on metacpan or search on metacpan
examples/rotatingCube.pl view on Meta::CPAN
use v5.30;
use Data::Dumper;
use Time::HiRes qw/time/;
use WebGPU::Direct qw/:all/;
use Math::Trig qw/:pi tan/;
use Math::3Space qw/space vec3 perspective_projection/;
use FindBin qw/$Bin $Script/;
my $cube = require "$Bin/$Script.cube.pl";
my $wgpu = WebGPU::Direct->new;
my $width = 600;
my $height = 600;
my $wgsl = do { local $/; <DATA> };
my ( $basicVertWGSL, $vertexPositionColorWGSL ) = split /^---\n/xms, $wgsl;
my $context = $wgpu->createSurface(
xs/webgpu.xs.PL view on Meta::CPAN
use autodie;
my $add_trace = $ENV{WGPU_PL_TRACE} // 0;
open my $h, '<', "$Bin/../webgpu/webgpu.h";
open my $xs, '>', "$Bin/webgpu.xs";
open my $c, '>', "$Bin/webgpu.c";
open my $tm, '>', "$Bin/../typemap";
open my $pm, '>', "$Bin/../lib/WebGPU/Direct/XS.pm";
my $class_defaults = require "$Bin/$Script.default";
my $constants = require "$Bin/$Script.constant";
my %typedefs = (
bool => 'bool',
double => 'double',
float => 'float',
uint16_t => 'uint16_t',
uint32_t => 'uint32_t',
uint64_t => 'uint64_t',
int32_t => 'int32_t',
size_t => 'size_t',
( run in 0.502 second using v1.01-cache-2.11-cpan-05444aca049 )