Skip to content

Commit 9e03be9

Browse files
authored
Merge pull request #128 from WICG/progers-update-3d-idl
Update webgl/webgpu idl
2 parents 90ae570 + 97558b8 commit 9e03be9

1 file changed

Lines changed: 28 additions & 24 deletions

File tree

README.md

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -200,34 +200,38 @@ interface mixin CanvasDrawElementImage {
200200
CanvasRenderingContext2D includes CanvasDrawElementImage;
201201
OffscreenCanvasRenderingContext2D includes CanvasDrawElementImage;
202202
203+
dictionary WebGLCopyElementImageConfig {
204+
GLfloat sx;
205+
GLfloat sy;
206+
GLfloat swidth;
207+
GLfloat sheight;
208+
GLsizei width;
209+
GLsizei height;
210+
};
211+
203212
partial interface WebGLRenderingContext {
204-
void texElementImage2D(GLenum target, GLint level, GLint internalformat,
205-
GLenum format, GLenum type, (Element or ElementImage) element);
206-
void texElementImage2D(GLenum target, GLint level, GLint internalformat,
207-
GLsizei width, GLsizei height, GLenum format,
208-
GLenum type, (Element or ElementImage) element);
209-
void texElementImage2D(GLenum target, GLint level, GLint internalformat,
210-
GLfloat sx, GLfloat sy, GLfloat swidth, GLfloat sheight,
211-
GLenum format, GLenum type, (Element or ElementImage) element);
212-
void texElementImage2D(GLenum target, GLint level, GLint internalformat,
213-
GLfloat sx, GLfloat sy, GLfloat swidth, GLfloat sheight,
214-
GLsizei width, GLsizei height, GLenum format,
215-
GLenum type, (Element or ElementImage) element);
213+
void texElementImage2D(GLenum target, GLenum internalformat,
214+
(Element or ElementImage) element,
215+
optional WebGLCopyElementImageConfig config = {});
216+
};
217+
218+
dictionary GPUCopyElementImageDestination {
219+
required GPUImageCopyTextureTagged destination;
220+
GPUIntegerCoordinate width;
221+
GPUIntegerCoordinate height;
222+
};
223+
224+
dictionary GPUCopyElementImageSource {
225+
required (Element or ElementImage) source;
226+
float sx;
227+
float sy;
228+
float swidth;
229+
float sheight;
216230
};
217231
218232
partial interface GPUQueue {
219-
void copyElementImageToTexture((Element or ElementImage) source,
220-
GPUImageCopyTextureTagged destination);
221-
void copyElementImageToTexture((Element or ElementImage) source,
222-
GPUIntegerCoordinate width, GPUIntegerCoordinate height,
223-
GPUImageCopyTextureTagged destination);
224-
void copyElementImageToTexture((Element or ElementImage) source,
225-
float sx, float sy, float swidth, float sheight,
226-
GPUImageCopyTextureTagged destination);
227-
void copyElementImageToTexture((Element or ElementImage) source,
228-
float sx, float sy, float swidth, float sheight,
229-
GPUIntegerCoordinate width, GPUIntegerCoordinate height,
230-
GPUImageCopyTextureTagged destination);
233+
void copyElementImageToTexture(GPUCopyElementImageSource source,
234+
GPUCopyElementImageDestination destination);
231235
}
232236
233237
[Exposed=Window]

0 commit comments

Comments
 (0)