aardappel / lobster

The Lobster Programming Language
http://strlen.com/lobster
2.21k stars 117 forks source link

gl_create_texture doesn't support cubemaps #263

Closed Dheu3 closed 10 months ago

Dheu3 commented 10 months ago
gl_create_texture(buf, texture_format_cubemap)

fails to create texture and results in GL errors.

looks like in the binding if the variable ys is divided by 6 before being passed to CreateTexture it will work as expected

aardappel commented 10 months ago

The fix is probably a bit more complicated because CreateTexture expects 6 buffers that follow eachother in memory, and the current construction code seems to simply create an interleaved 2D array.. but that should not be hard to fix.

I'll have a look.

aardappel commented 10 months ago

Fixed here: https://github.com/aardappel/lobster/commit/2edd07ac92f405cee2001ac9c4346af1a2887823