diff options
Diffstat (limited to 'src/client/lua_api/video/iimage.cpp')
| -rw-r--r-- | src/client/lua_api/video/iimage.cpp | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/src/client/lua_api/video/iimage.cpp b/src/client/lua_api/video/iimage.cpp index 4c7795d..3655b64 100644 --- a/src/client/lua_api/video/iimage.cpp +++ b/src/client/lua_api/video/iimage.cpp @@ -4,10 +4,6 @@ #include <shared/lua_api/common.hpp> -/*** -@module video -*/ - using namespace irr; using namespace video; @@ -17,7 +13,7 @@ extern IVideoDriver* driver; /*** Creates a new irrlicht image. A newly created image will be fully white by default. -@function newiimage(format, size) +@function video.newiimage(format, size) @tparam enum_color_format format The format for the image @tparam vec2d size The size of the image @treturn iimage The image @@ -44,7 +40,7 @@ int newiimage(lua_State* L){ Creates a new irrlicht image. Creates a new irrlicht image from a file. The format and width/height will be taken from the image file. -@function newiimagefromfile(path) +@function video.newiimagefromfile(path) @tparam string path The file path of the image file @treturn iimage The loaded image */ @@ -138,7 +134,7 @@ int getiimagepixel(lua_State* L){ /*** Returns the dimensions of the image @function iimage:getDimensions() -@treturn vec2i dimensions The dimensions of the image +@treturn vec2i The dimensions of the image */ //getdimensions({self}) int getiimagedimensions(lua_State *L){ @@ -162,10 +158,29 @@ void iimage_register(lua_State* L){ driver = device->getVideoDriver(); lua_getglobal(L,"video");//{} +/*** +1 bit alpha, 5 bits red, blue, and green (16 bit) +@field video.ECF_A1R5G5B5 +*/ set_const(L,ECF_A1R5G5B5); +/*** +5 bit red, 6 bit green, 5 bit blue +@field video.ECF_R5G6B5 +*/ set_const(L,ECF_R5G6B5); +/*** +8 bit red, blue, green, and alpha +@field video.ECF_A8R8G8B8 +*/ set_const(L,ECF_A8R8G8B8); +/*** +1 channel with 16 bit floating point. +1 channel 16 bit floating point. Uses the red channel. Floating point images may only be used for render targets. +@field video.ECF_R16F +@see @{render_targets} +*/ set_const(L,ECF_R16F); +//TODO: finish documenting these set_const(L,ECF_G16R16F); set_const(L,ECF_A16B16G16R16F); set_const(L,ECF_R32F); |
