Search found 5 matches

by wan-may
Thu Apr 04, 2024 3:21 am
Forum: Support and Development
Topic: Avoid table overhead by using Data when creating a mesh
Replies: 6
Views: 1351

Re: Avoid table overhead by using Data when creating a mesh

Thank you both! Love the thorough explanation of these functions, as well as the working, benchmarked example code! Just to make something explicit for posterity: struct alignment is not a huge concern because LOVE 11.5 does not support custom vertex attributes that aren't aligned to 4 bytes, or tha...
by wan-may
Mon Apr 01, 2024 1:56 am
Forum: Support and Development
Topic: Avoid table overhead by using Data when creating a mesh
Replies: 6
Views: 1351

Avoid table overhead by using Data when creating a mesh

The usual prototype for love.graphics.newMesh has you making a large number of tables: one for each vertex. This isn't ideal when I could be loading large bespoke third-party models, especially if I'm not interested in changing any vertex data on the CPU. Can I use ByteData or FFI buffers everywhere...
by wan-may
Tue Sep 19, 2023 3:53 am
Forum: Support and Development
Topic: How can I scale my tilemap within the camera
Replies: 2
Views: 1079

Re: How can I scale my tilemap within the camera

You're passing the zoom parameter to currAnim:draw - but this function only draws the player. Instead, try passing it to the camera. Use cam:zoom( 2 ) or cam:zoomTo( 2 ) to make everything twice as zoomed. Without looking at your code I recommend using some camera lib to handle this: https://github....
by wan-may
Thu Sep 14, 2023 8:50 pm
Forum: Support and Development
Topic: Validate UTF8 strings?
Replies: 2
Views: 1284

Re: Validate UTF8 strings?

I see, thank you!
by wan-may
Thu Sep 14, 2023 5:59 am
Forum: Support and Development
Topic: Validate UTF8 strings?
Replies: 2
Views: 1284

Validate UTF8 strings?

I read, via the FFI, some nasty untrusted binary sludge sent from who-knows-where. Sometimes this sludge contains a possibly strange UTF-8 string I might want to display - maybe I want an Elvish localisation when 12.0 adds all that custom ligature support. The utf8 library is only concerned with enc...