Browse Source

Texture docs;

bjorn 5 years ago
parent
commit
c255fe392d

File diff suppressed because it is too large
+ 1 - 1
api/init.lua


+ 2 - 1
api/lovr/data/newTextureData.lua

@@ -61,6 +61,7 @@ return {
     }
   },
   notes = [[
-    Right now the supported image file formats are png, jpg, and hdr.
+    Right now the supported image file formats are png, jpg, hdr, dds (DXT1, DXT3, DXT5), ktx, and
+    astc.
   ]]
 }

+ 2 - 2
api/lovr/graphics/newShader.lua

@@ -100,10 +100,10 @@ return {
         effects.  The default tonemapping in the standard shader is the ACES algorithm, but you can
         use this flag to turn off ACES and use your own tonemapping.
 
+    Currently, up to 32 shader flags are supported.
+
     The `stereo` option is only necessary for Android.  Currently on Android, only stereo shaders
     can be used with stereo Canvases, and mono Shaders can only be used with mono Canvases.
-
-    Currently, up to 32 shader flags are supported.
   ]],
   related = {
     'lovr.graphics.setShader',

+ 17 - 3
api/lovr/graphics/newTexture.lua

@@ -41,7 +41,7 @@ return {
           name = 'linear',
           type = 'boolean',
           default = 'false',
-          description = 'Whether the texture is in linear color space instead of sRGB.'
+          description = 'Whether the texture is in linear color space instead of the usual sRGB.'
         },
         {
           name = 'mipmaps',
@@ -58,6 +58,18 @@ return {
             single image, `array` for a table of images with numeric keys, or `cube` for a table
             of images with string keys.
           ]]
+        },
+        {
+          name = 'format',
+          type = 'TextureFormat',
+          default = 'rgba',
+          description = 'The format used for the Texture (when creating a blank texture).'
+        },
+        {
+          name = 'msaa',
+          type = 'number',
+          default = '0',
+          description = 'The antialiasing level to use (when attaching the Texture to a Canvas).'
         }
       }
     }
@@ -105,7 +117,9 @@ return {
   },
   notes = [[
     The "linear" flag should be set to true for textures that don't contain color information, such
-    as normal maps.  It is ignored if gamma correct rendering is disabled.  See
-    `lovr.graphics.isGammaCorrect` for more info.
+    as normal maps.
+
+    Right now the supported image file formats are png, jpg, hdr, dds (DXT1, DXT3, DXT5), ktx, and
+    astc.
   ]]
 }

Some files were not shown because too many files changed in this diff