mirror of
https://github.com/servo/servo.git
synced 2025-07-16 11:53:39 +01:00
WebGL2: support TexImage3D (#37718)
Add TexImage3D method to WebGL2RenderingContext Testing: conformance2 should pass. Also it should get http://webglsamples.org/WebGL2Samples/#texture_2d_array and http://webglsamples.org/WebGL2Samples/#texture_3d running. Fixes: #26511 Now Servo can run texture_2d_array and texture_3d samples!   And it can now run three.js too!  --------- Signed-off-by: Wu Yu Wei <yuweiwu@pm.me>
This commit is contained in:
parent
4499fdeb2b
commit
34c31ee418
43 changed files with 1341 additions and 980 deletions
|
@ -364,6 +364,22 @@ pub enum WebGLCommand {
|
|||
VertexAttribPointer(u32, i32, u32, bool, i32, u32),
|
||||
VertexAttribPointer2f(u32, i32, bool, i32, u32),
|
||||
SetViewport(i32, i32, i32, i32),
|
||||
TexImage3D {
|
||||
target: u32,
|
||||
level: u32,
|
||||
internal_format: TexFormat,
|
||||
size: Size2D<u32>,
|
||||
depth: u32,
|
||||
format: TexFormat,
|
||||
data_type: TexDataType,
|
||||
// FIXME: This should be computed on the WebGL thread.
|
||||
effective_data_type: u32,
|
||||
unpacking_alignment: u32,
|
||||
alpha_treatment: Option<AlphaTreatment>,
|
||||
y_axis_treatment: YAxisTreatment,
|
||||
pixel_format: Option<PixelFormat>,
|
||||
data: TruncatedDebug<IpcSharedMemory>,
|
||||
},
|
||||
TexImage2D {
|
||||
target: u32,
|
||||
level: u32,
|
||||
|
@ -1437,6 +1453,7 @@ pub struct GLContextAttributes {
|
|||
pub struct GLLimits {
|
||||
pub max_vertex_attribs: u32,
|
||||
pub max_tex_size: u32,
|
||||
pub max_3d_tex_size: u32,
|
||||
pub max_cube_map_tex_size: u32,
|
||||
pub max_combined_texture_image_units: u32,
|
||||
pub max_fragment_uniform_vectors: u32,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue