-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathstb_image_write.nelua
22 lines (22 loc) · 2.03 KB
/
stb_image_write.nelua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
##[[
if not STB_IMAGE_WRITE_NO_IMPL then
cdefine 'STB_IMAGE_WRITE_STATIC'
cdefine 'STB_IMAGE_WRITE_IMPLEMENTATION'
end
cinclude 'stb_image_write.h'
]]
global stbi_write_tga_with_rle: cint <cimport,nodecl>
global stbi_write_png_compression_level: cint <cimport,nodecl>
global stbi_write_force_png_filter: cint <cimport,nodecl>
global function stbi_write_png(filename: cstring, w: cint, h: cint, comp: cint, data: pointer, stride_in_bytes: cint): cint <cimport,nodecl> end
global function stbi_write_bmp(filename: cstring, w: cint, h: cint, comp: cint, data: pointer): cint <cimport,nodecl> end
global function stbi_write_tga(filename: cstring, w: cint, h: cint, comp: cint, data: pointer): cint <cimport,nodecl> end
global function stbi_write_hdr(filename: cstring, w: cint, h: cint, comp: cint, data: *float32): cint <cimport,nodecl> end
global function stbi_write_jpg(filename: cstring, x: cint, y: cint, comp: cint, data: pointer, quality: cint): cint <cimport,nodecl> end
global stbi_write_func: type <cimport,nodecl> = @function(pointer, pointer, cint): void
global function stbi_write_png_to_func(func: function(pointer, pointer, cint): void, context: pointer, w: cint, h: cint, comp: cint, data: pointer, stride_in_bytes: cint): cint <cimport,nodecl> end
global function stbi_write_bmp_to_func(func: function(pointer, pointer, cint): void, context: pointer, w: cint, h: cint, comp: cint, data: pointer): cint <cimport,nodecl> end
global function stbi_write_tga_to_func(func: function(pointer, pointer, cint): void, context: pointer, w: cint, h: cint, comp: cint, data: pointer): cint <cimport,nodecl> end
global function stbi_write_hdr_to_func(func: function(pointer, pointer, cint): void, context: pointer, w: cint, h: cint, comp: cint, data: *float32): cint <cimport,nodecl> end
global function stbi_write_jpg_to_func(func: function(pointer, pointer, cint): void, context: pointer, x: cint, y: cint, comp: cint, data: pointer, quality: cint): cint <cimport,nodecl> end
global function stbi_flip_vertically_on_write(flip_boolean: cint): void <cimport,nodecl> end