mirror of
https://github.com/love2d/love.git
synced 2026-08-19 04:06:17 +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:
@@ -39,15 +39,19 @@ public:
|
||||
|
||||
struct Settings
|
||||
{
|
||||
int width = 1;
|
||||
int height = 1;
|
||||
int layers = 1; // depth for 3D textures
|
||||
PixelFormat format = PIXELFORMAT_NORMAL;
|
||||
TextureType type = TEXTURE_2D;
|
||||
float pixeldensity = 1.0f;
|
||||
int msaa = 0;
|
||||
};
|
||||
|
||||
Canvas();
|
||||
Canvas(TextureType textype);
|
||||
virtual ~Canvas();
|
||||
|
||||
virtual love::image::ImageData *newImageData(love::image::Image *module, int x, int y, int w, int h) = 0;
|
||||
virtual love::image::ImageData *newImageData(love::image::Image *module, int slice, int x, int y, int w, int h) = 0;
|
||||
|
||||
virtual int getMSAA() const = 0;
|
||||
virtual int getRequestedMSAA() const = 0;
|
||||
|
||||
Reference in New Issue
Block a user