mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Implement Array, Cubemap, and Volume texture types (issue #1111).
- Add love.graphics.newArrayImage, newCubeImage, and newVolumeImage.
- Add love.graphics.newCanvas(w, h, layers) and newCanvas(w, h, layers, settings). Add ‘type’ field to the settings table of newCanvas.
- Add new love.graphics.setCanvas variants: setCanvas(canvas, slice), and setCanvas(canvastable) where canvastable is in the format: {{canvas1, layer=2}, {canvas2, face=5}}
- Add Texture:getTextureType, getDepth, getLayerCount, getMipmapCount, and getFormat.
- Remove Image:getData and Image:refresh.
- Add Image:replacePixels(imagedata [, slice] [, mipmap]).
- Update Canvas:newImageData to accept a slice argument.
- Add love.image.newCubeFaces(imagedata).
--HG--
branch : minor
This commit is contained in:
@@ -119,6 +119,7 @@ public:
|
||||
};
|
||||
|
||||
UniformType baseType;
|
||||
TextureType textureType;
|
||||
std::string name;
|
||||
|
||||
union
|
||||
@@ -144,11 +145,8 @@ public:
|
||||
|
||||
/**
|
||||
* Binds this Shader's program to be used when rendering.
|
||||
*
|
||||
* @param temporary True if we just want to send values to the shader with
|
||||
* no intention of rendering.
|
||||
**/
|
||||
virtual void attach(bool temporary = false) = 0;
|
||||
virtual void attach() = 0;
|
||||
|
||||
/**
|
||||
* Attach the default shader.
|
||||
@@ -161,9 +159,11 @@ public:
|
||||
virtual std::string getWarnings() const = 0;
|
||||
|
||||
virtual const UniformInfo *getUniformInfo(const std::string &name) const = 0;
|
||||
virtual void updateUniform(const UniformInfo *info, int count, bool internalUpdate = false) = 0;
|
||||
virtual const UniformInfo *getUniformInfo(BuiltinUniform builtin) const = 0;
|
||||
|
||||
virtual void sendTextures(const UniformInfo *info, Texture **textures, int count, bool internalUpdate = false) = 0;
|
||||
virtual void updateUniform(const UniformInfo *info, int count) = 0;
|
||||
|
||||
virtual void sendTextures(const UniformInfo *info, Texture **textures, int count) = 0;
|
||||
|
||||
/**
|
||||
* Gets whether a uniform with the specified name exists and is actively
|
||||
@@ -174,7 +174,9 @@ public:
|
||||
/**
|
||||
* Sets the textures used when rendering a video. For internal use only.
|
||||
**/
|
||||
virtual void setVideoTextures(ptrdiff_t ytexture, ptrdiff_t cbtexture, ptrdiff_t crtexture) = 0;
|
||||
virtual void setVideoTextures(Texture *ytexture, Texture *cbtexture, Texture *crtexture) = 0;
|
||||
|
||||
void checkMainTextureType(TextureType textype) const;
|
||||
|
||||
virtual ptrdiff_t getHandle() const = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user