Browse Source

Merge pull request #90 from jmiskovic/fix/textureNewView

Fix/texture new view
Bjorn 2 years ago
parent
commit
e411e8cc5d

+ 1 - 5
api/lovr/graphics/Texture/newView.lua

@@ -15,10 +15,6 @@ return {
     - Binding a particular image or mipmap level to a shader.
   ]],
   arguments = {
-    parent = {
-      type = 'Texture',
-      description = 'The parent Texture to create the view of.'
-    },
     type = {
       type = 'TextureType',
       description = 'The texture type of the view.'
@@ -52,7 +48,7 @@ return {
   },
   variants = {
     {
-      arguments = { 'parent', 'type', 'layer', 'layerCount', 'mipmap', 'mipmapCount' },
+      arguments = { 'type', 'layer', 'layerCount', 'mipmap', 'mipmapCount' },
       returns = { 'view' }
     }
   },

+ 1 - 1
examples/Effects/Cubemap_Generate/main.lua

@@ -95,7 +95,7 @@ local unitZ = lovr.math.newVec3(0,0,1)
 function cubemap.load()
 	-- Create cubemap textures
 	local cubemapWidth, cubemapHeight = 256, 256
-	cubemap.texture = lovr.graphics.newTexture(cubemapWidth, cubemapHeight, { type = "cube", mipmaps = false })
+	cubemap.texture = lovr.graphics.newTexture(cubemapWidth, cubemapHeight, 6, { type = "cube", mipmaps = false })
 	cubemap.faces = {}
 
 	-- Precalculate cubemap View-Projection matrices