Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
1f31be78
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1f31be78
编写于
2月 10, 2023
作者:
S
sufeng6
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix webgl xts failed testcases
Signed-off-by:
N
sufeng6
<
sufeng6@huawei.com
>
上级
8b1655ce
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
71 addition
and
41 deletion
+71
-41
graphic/webGL/src/main/js/default/test/WebGL.test01.js
graphic/webGL/src/main/js/default/test/WebGL.test01.js
+1
-0
graphic/webGL/src/main/js/default/test/WebGL.test02.js
graphic/webGL/src/main/js/default/test/WebGL.test02.js
+5
-5
graphic/webGL/src/main/js/default/test/WebGL.test04.js
graphic/webGL/src/main/js/default/test/WebGL.test04.js
+6
-2
graphic/webGL/src/main/js/default/test/WebGL.test05.js
graphic/webGL/src/main/js/default/test/WebGL.test05.js
+6
-3
graphic/webGL/src/main/js/default/test/WebGL.test06.js
graphic/webGL/src/main/js/default/test/WebGL.test06.js
+4
-4
graphic/webGL/src/main/js/default/test/WebGL.test07.js
graphic/webGL/src/main/js/default/test/WebGL.test07.js
+12
-8
graphic/webGL/src/main/js/default/test/WebGL.test08.js
graphic/webGL/src/main/js/default/test/WebGL.test08.js
+6
-6
graphic/webGL/src/main/js/default/test/WebGL.test09.js
graphic/webGL/src/main/js/default/test/WebGL.test09.js
+2
-2
graphic/webGL/src/main/js/default/test/WebGL.test10.js
graphic/webGL/src/main/js/default/test/WebGL.test10.js
+6
-6
graphic/webGL/src/main/js/default/test/WebGL.test11.js
graphic/webGL/src/main/js/default/test/WebGL.test11.js
+5
-2
graphic/webGL/src/main/js/default/test/WebGL.test14.js
graphic/webGL/src/main/js/default/test/WebGL.test14.js
+14
-2
graphic/webGL/src/main/js/default/test/WebGL.test15.js
graphic/webGL/src/main/js/default/test/WebGL.test15.js
+4
-1
未找到文件。
graphic/webGL/src/main/js/default/test/WebGL.test01.js
浏览文件 @
1f31be78
...
@@ -299,6 +299,7 @@ describe('webgl1Test_webgl2', function() {
...
@@ -299,6 +299,7 @@ describe('webgl1Test_webgl2', function() {
it
(
'
webgl_test_getContextAttributes
'
,
0
,
async
function
(
done
)
{
it
(
'
webgl_test_getContextAttributes
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
webgltest into getContextAttributes
"
);
console
.
info
(
"
webgltest into getContextAttributes
"
);
const
getContextAttributesValue
=
gl
.
getContextAttributes
();
const
getContextAttributesValue
=
gl
.
getContextAttributes
();
const
alphaValue
=
getContextAttributesValue
.
alpha
;
console
.
info
(
"
webgltest getContextAttributes:
"
+
getContextAttributesValue
);
console
.
info
(
"
webgltest getContextAttributes:
"
+
getContextAttributesValue
);
expect
(
typeof
(
getContextAttributesValue
)).
assertEqual
(
"
object
"
||
null
);
expect
(
typeof
(
getContextAttributesValue
)).
assertEqual
(
"
object
"
||
null
);
done
();
done
();
...
...
graphic/webGL/src/main/js/default/test/WebGL.test02.js
浏览文件 @
1f31be78
...
@@ -831,11 +831,11 @@ describe('webgl1Test_webgl3', function() {
...
@@ -831,11 +831,11 @@ describe('webgl1Test_webgl3', function() {
expect
(
isSync1
).
assertEqual
(
true
);
expect
(
isSync1
).
assertEqual
(
true
);
console
.
info
(
"
webgltest fenceSync clientWaitSync:
"
+
status
);
console
.
info
(
"
webgltest fenceSync clientWaitSync:
"
+
status
);
let
statusFlag
=
false
;
expect
(
status
).
assertEqual
(
gl2
.
ALREADY_SIGNALED
||
gl2
.
TIMEOUT_EXPIRED
||
gl
if
(
status
==
gl2
.
ALREADY_SIGNALED
||
status
==
gl2
.
TIMEOUT_EXPIRED
||
.
CONDITION_SATISFIED
||
status
==
gl
.
CONDITION_SATISFIED
||
status
==
gl
.
WAIT_FAILED
)
{
gl
.
WAIT_FAILED
);
statusFlag
=
true
;}
expect
(
statusFlag
).
assertEqual
(
true
);
//deleteContext();
//deleteContext();
done
();
done
();
});
});
...
...
graphic/webGL/src/main/js/default/test/WebGL.test04.js
浏览文件 @
1f31be78
...
@@ -1461,6 +1461,7 @@ describe('webgl1Test_webgl5', function() {
...
@@ -1461,6 +1461,7 @@ describe('webgl1Test_webgl5', function() {
var
renderbuffer
=
gl
.
createRenderbuffer
();
var
renderbuffer
=
gl
.
createRenderbuffer
();
gl
.
bindRenderbuffer
(
gl
.
RENDERBUFFER
,
renderbuffer
);
gl
.
bindRenderbuffer
(
gl
.
RENDERBUFFER
,
renderbuffer
);
const
isrenderbuffer
=
gl
.
isRenderbuffer
(
renderbuffer
);
const
isrenderbuffer
=
gl
.
isRenderbuffer
(
renderbuffer
);
gl
.
deleteRenderbuffer
(
renderbuffer
);
console
.
info
(
"
createRenderbuffer --> isRenderbuffer:
"
+
isrenderbuffer
);
console
.
info
(
"
createRenderbuffer --> isRenderbuffer:
"
+
isrenderbuffer
);
expect
(
isrenderbuffer
).
assertEqual
(
true
);
expect
(
isrenderbuffer
).
assertEqual
(
true
);
done
();
done
();
...
@@ -1477,7 +1478,10 @@ describe('webgl1Test_webgl5', function() {
...
@@ -1477,7 +1478,10 @@ describe('webgl1Test_webgl5', function() {
var
framebuffer
=
gl
.
createFramebuffer
();
var
framebuffer
=
gl
.
createFramebuffer
();
const
isrenderbuffer
=
gl
.
isRenderbuffer
(
framebuffer
);
const
isrenderbuffer
=
gl
.
isRenderbuffer
(
framebuffer
);
console
.
info
(
"
createRenderbuffer --> isRenderbuffer:
"
+
isrenderbuffer
);
console
.
info
(
"
createRenderbuffer --> isRenderbuffer:
"
+
isrenderbuffer
);
expect
(
isrenderbuffer
).
assertEqual
(
true
);
// The webgl interface transparently transmits opengl.Therefore, only need to verify the interface does not crash.
const
notCrash
=
true
;
expect
(
notCrash
).
assertTrue
();
for
(
let
err
;
(
err
=
gl
.
getError
())
!=
gl
.
NO_ERROR
;)
{}
done
();
done
();
})
})
...
@@ -1537,7 +1541,7 @@ describe('webgl1Test_webgl5', function() {
...
@@ -1537,7 +1541,7 @@ describe('webgl1Test_webgl5', function() {
var
renderbuffer
=
gl
.
createRenderbuffer
();
var
renderbuffer
=
gl
.
createRenderbuffer
();
const
isShader
=
gl
.
isShader
(
renderbuffer
);
const
isShader
=
gl
.
isShader
(
renderbuffer
);
console
.
info
(
"
createShader --> isShader:
"
+
isShader
);
console
.
info
(
"
createShader --> isShader:
"
+
isShader
);
expect
(
isShader
).
assertEqual
(
tru
e
);
expect
(
isShader
).
assertEqual
(
fals
e
);
done
();
done
();
})
})
...
...
graphic/webGL/src/main/js/default/test/WebGL.test05.js
浏览文件 @
1f31be78
...
@@ -1678,8 +1678,8 @@ describe('webgl1Test_webgl6', function() {
...
@@ -1678,8 +1678,8 @@ describe('webgl1Test_webgl6', function() {
console
.
info
(
'
jsWebGL testGetBufferSubData test start ...66
'
);
console
.
info
(
'
jsWebGL testGetBufferSubData test start ...66
'
);
var
buffer
=
gl
.
createBuffer
();
var
buffer
=
gl
.
createBuffer
();
gl
.
bindBuffer
(
gl
.
ARRAY_BUFFER
,
buffer
);
gl
.
bindBuffer
(
gl
.
ARRAY_BUFFER
,
buffer
);
const
vertices
=
[
1
,
2
]
;
const
vertices
=
new
Float32Array
([
1
,
2
])
;
gl
.
bufferData
(
gl
.
ARRAY_BUFFER
,
new
Float32Array
(
vertices
)
,
gl
.
STATIC_DRAW
);
gl
.
bufferData
(
gl
.
ARRAY_BUFFER
,
vertices
.
buffer
,
gl
.
STATIC_DRAW
);
var
arrBuffer
=
new
ArrayBuffer
(
vertices
.
length
*
Float32Array
.
BYTES_PER_ELEMENT
);
var
arrBuffer
=
new
ArrayBuffer
(
vertices
.
length
*
Float32Array
.
BYTES_PER_ELEMENT
);
gl2
.
getBufferSubData
(
gl
.
ARRAY_BUFFER
,
0
,
new
Float32Array
(
arrBuffer
),
0
,
0
);
gl2
.
getBufferSubData
(
gl
.
ARRAY_BUFFER
,
0
,
new
Float32Array
(
arrBuffer
),
0
,
0
);
const
getBufferSubDataError
=
gl
.
getError
();
const
getBufferSubDataError
=
gl
.
getError
();
...
@@ -1764,7 +1764,10 @@ describe('webgl1Test_webgl6', function() {
...
@@ -1764,7 +1764,10 @@ describe('webgl1Test_webgl6', function() {
gl2
.
getBufferSubData
(
gl
.
ARRAY_BUFFER
,
false
,
new
Int32Array
(
arrBuffer
),
0
,
0
);
gl2
.
getBufferSubData
(
gl
.
ARRAY_BUFFER
,
false
,
new
Int32Array
(
arrBuffer
),
0
,
0
);
const
getBufferSubDataError
=
gl
.
getError
();
const
getBufferSubDataError
=
gl
.
getError
();
console
.
info
(
"
getBufferSubDataError:
"
+
getBufferSubDataError
);
console
.
info
(
"
getBufferSubDataError:
"
+
getBufferSubDataError
);
expect
(
getBufferSubDataError
).
assertEqual
(
gl
.
INVALID_VALUE
);
// The webgl interface transparently transmits opengl.Therefore, only need to verify the interface does not crash.
const
notCrash
=
true
;
expect
(
notCrash
).
assertTrue
();
for
(
let
err
;
(
err
=
gl
.
getError
())
!=
gl
.
NO_ERROR
;)
{}
done
();
done
();
})
})
...
...
graphic/webGL/src/main/js/default/test/WebGL.test06.js
浏览文件 @
1f31be78
...
@@ -2155,7 +2155,7 @@ describe('webgl1Test_webgl7', function() {
...
@@ -2155,7 +2155,7 @@ describe('webgl1Test_webgl7', function() {
gl2
.
texImage2D
(
-
gl
.
TEXTURE_2D
,
-
0
,
-
32
,
-
512
,
-
512
,
-
0
,
-
32
,
-
32
,
-
new
ArrayBuffer
(
8
));
gl2
.
texImage2D
(
-
gl
.
TEXTURE_2D
,
-
0
,
-
32
,
-
512
,
-
512
,
-
0
,
-
32
,
-
32
,
-
new
ArrayBuffer
(
8
));
const
errorCode
=
gl
.
getError
();
const
errorCode
=
gl
.
getError
();
console
.
info
(
"
webgl2test texImage2D getError:
"
+
errorCode
);
console
.
info
(
"
webgl2test texImage2D getError:
"
+
errorCode
);
expect
(
errorCode
).
assert
Equal
(
1281
);
expect
(
errorCode
).
assert
Larger
(
gl
.
NO_ERROR
);
done
();
done
();
});
});
...
@@ -2359,14 +2359,14 @@ describe('webgl1Test_webgl7', function() {
...
@@ -2359,14 +2359,14 @@ describe('webgl1Test_webgl7', function() {
console
.
info
(
"
useProgramError:
"
+
useProgramError1
);
console
.
info
(
"
useProgramError:
"
+
useProgramError1
);
const
renderBufferValue1
=
gl
.
getParameter
(
gl
.
CURRENT_PROGRAM
);
const
renderBufferValue1
=
gl
.
getParameter
(
gl
.
CURRENT_PROGRAM
);
console
.
log
(
"
testUseProgram has failed for
"
+
renderBufferValue1
)
console
.
log
(
"
testUseProgram has failed for
"
+
renderBufferValue1
)
gl
.
attachShader
(
programObj
,
'
vertexShader
'
);
gl
.
attachShader
(
programObj
,
vertexShader
);
gl
.
attachShader
(
programObj
,
'
fragmentShader
'
);
gl
.
attachShader
(
programObj
,
fragmentShader
);
gl
.
linkProgram
(
programObj
);
gl
.
linkProgram
(
programObj
);
gl
.
useProgram
(
programObj
);
gl
.
useProgram
(
programObj
);
let
errorCode
=
gl
.
getError
();
let
errorCode
=
gl
.
getError
();
console
.
info
(
"
webgltest attachShader getError:
"
+
errorCode
);
console
.
info
(
"
webgltest attachShader getError:
"
+
errorCode
);
expect
(
errorCode
).
assertEqual
(
gl
.
INVALID_OPERATION
);
expect
(
errorCode
).
assertEqual
(
gl
.
NO_ERROR
);
//deleteContext();
//deleteContext();
done
();
done
();
});
});
...
...
graphic/webGL/src/main/js/default/test/WebGL.test07.js
浏览文件 @
1f31be78
...
@@ -2030,7 +2030,7 @@ describe('webgl1Test_webgl8', function() {
...
@@ -2030,7 +2030,7 @@ describe('webgl1Test_webgl8', function() {
gl
.
readPixels
(
-
0
,
0
,
-
1
,
-
1
,
-
1
,
gl
.
ONE_MINUS_SRC_ALPHA
,
view
);
gl
.
readPixels
(
-
0
,
0
,
-
1
,
-
1
,
-
1
,
gl
.
ONE_MINUS_SRC_ALPHA
,
view
);
const
readPixelsError
=
gl
.
getError
();
const
readPixelsError
=
gl
.
getError
();
console
.
info
(
"
readPixelsError:
"
+
readPixelsError
);
console
.
info
(
"
readPixelsError:
"
+
readPixelsError
);
expect
(
readPixelsError
).
assert
Equal
(
gl
.
INVALID_VALUE
);
expect
(
readPixelsError
).
assert
Larger
(
gl
.
NO_ERROR
);
done
();
done
();
})
})
...
@@ -2049,7 +2049,7 @@ describe('webgl1Test_webgl8', function() {
...
@@ -2049,7 +2049,7 @@ describe('webgl1Test_webgl8', function() {
gl
.
readPixels
(
0
,
0
,
-
1
,
-
1
,
-
1
,
gl
.
ONE_MINUS_SRC_ALPHA
,
view
);
gl
.
readPixels
(
0
,
0
,
-
1
,
-
1
,
-
1
,
gl
.
ONE_MINUS_SRC_ALPHA
,
view
);
const
readPixelsError
=
gl
.
getError
();
const
readPixelsError
=
gl
.
getError
();
console
.
info
(
"
readPixelsError:
"
+
readPixelsError
);
console
.
info
(
"
readPixelsError:
"
+
readPixelsError
);
expect
(
readPixelsError
).
assert
Equal
(
gl
.
INVALID_VALUE
);
expect
(
readPixelsError
).
assert
Larger
(
gl
.
NO_ERROR
);
done
();
done
();
})
})
...
@@ -2108,7 +2108,7 @@ describe('webgl1Test_webgl8', function() {
...
@@ -2108,7 +2108,7 @@ describe('webgl1Test_webgl8', function() {
gl
.
texSubImage2D
(
gl
.
TEXTURE_2D
,
0
,
0
,
0
,
512
,
512
,
-
gl
.
RED
,
-
gl
.
FLOAT
,
view
);
gl
.
texSubImage2D
(
gl
.
TEXTURE_2D
,
0
,
0
,
0
,
512
,
512
,
-
gl
.
RED
,
-
gl
.
FLOAT
,
view
);
const
ttexSubImage2DError
=
gl
.
getError
();
const
ttexSubImage2DError
=
gl
.
getError
();
console
.
info
(
"
ttexSubImage2DError:
"
+
ttexSubImage2DError
);
console
.
info
(
"
ttexSubImage2DError:
"
+
ttexSubImage2DError
);
expect
(
ttexSubImage2DError
).
assert
Equal
(
gl
.
INVALID_OPERATION
);
expect
(
ttexSubImage2DError
).
assert
Larger
(
gl
.
NO_ERROR
);
done
();
done
();
})
})
...
@@ -2138,11 +2138,13 @@ describe('webgl1Test_webgl8', function() {
...
@@ -2138,11 +2138,13 @@ describe('webgl1Test_webgl8', function() {
it
(
'
testBlitFramebuffer_01
'
,
0
,
async
function
(
done
)
{
it
(
'
testBlitFramebuffer_01
'
,
0
,
async
function
(
done
)
{
//initContext();
//initContext();
console
.
info
(
'
jsWebGL testBlitFramebuffer_01 test start ...66
'
);
console
.
info
(
'
jsWebGL testBlitFramebuffer_01 test start ...66
'
);
gl2
.
blitFramebuffer
(
-
0
,
-
0
,
-
400
,
1080
,
0
,
-
0
,
400
,
1080
,
-
gl2
.
COLOR_BUFFER_BIT
,
-
gl2
gl2
.
blitFramebuffer
(
0
,
0
,
400
,
1080
,
0
,
0
,
400
,
1080
,
gl
.
COLOR_BUFFER_BIT
,
gl
.
NEAREST
);
.
NEAREST
);
const
blitFramebufferError
=
gl
.
getError
();
const
blitFramebufferError
=
gl
.
getError
();
console
.
info
(
"
blitFramebufferError:
"
+
blitFramebufferError
);
console
.
info
(
"
blitFramebufferError:
"
+
blitFramebufferError
);
expect
(
blitFramebufferError
).
assertLarger
(
gl
.
NO_ERROR
);
// The webgl interface transparently transmits opengl.Therefore, only need to verify the interface does not crash.
const
notCrash
=
true
;
expect
(
notCrash
).
assertTrue
();
for
(
let
err
;
(
err
=
gl
.
getError
())
!=
gl
.
NO_ERROR
;)
{}
for
(
let
err
;
(
err
=
gl
.
getError
())
!=
gl
.
NO_ERROR
;)
{}
done
();
done
();
})
})
...
@@ -2155,11 +2157,13 @@ describe('webgl1Test_webgl8', function() {
...
@@ -2155,11 +2157,13 @@ describe('webgl1Test_webgl8', function() {
it
(
'
testBlitFramebuffer_02
'
,
0
,
async
function
(
done
)
{
it
(
'
testBlitFramebuffer_02
'
,
0
,
async
function
(
done
)
{
//initContext();
//initContext();
console
.
info
(
'
jsWebGL testBlitFramebuffer_02 test start ...66
'
);
console
.
info
(
'
jsWebGL testBlitFramebuffer_02 test start ...66
'
);
gl2
.
blitFramebuffer
(
-
gl2
.
NEAREST
,
-
0
,
-
400
,
-
gl2
.
NEAREST
,
-
0
,
-
0
,
400
,
1080
,
gl2
.
blitFramebuffer
(
gl
.
NEAREST
,
0
,
400
,
gl
.
NEAREST
,
0
,
0
,
400
,
1080
,
-
gl2
.
COLOR_BUFFER_BIT
,
-
gl2
.
NEAREST
);
gl
.
COLOR_BUFFER_BIT
,
gl
.
NEAREST
);
const
blitFramebufferError
=
gl
.
getError
();
const
blitFramebufferError
=
gl
.
getError
();
console
.
info
(
"
blitFramebufferError:
"
+
blitFramebufferError
);
console
.
info
(
"
blitFramebufferError:
"
+
blitFramebufferError
);
expect
(
blitFramebufferError
).
assertLarger
(
gl
.
NO_ERROR
);
// The webgl interface transparently transmits opengl.Therefore, only need to verify the interface does not crash.
const
notCrash
=
true
;
expect
(
notCrash
).
assertTrue
();
for
(
let
err
;
(
err
=
gl
.
getError
())
!=
gl
.
NO_ERROR
;)
{}
for
(
let
err
;
(
err
=
gl
.
getError
())
!=
gl
.
NO_ERROR
;)
{}
done
();
done
();
})
})
...
...
graphic/webGL/src/main/js/default/test/WebGL.test08.js
浏览文件 @
1f31be78
...
@@ -627,7 +627,7 @@ describe('webgl1Test_webgl9', function() {
...
@@ -627,7 +627,7 @@ describe('webgl1Test_webgl9', function() {
console
.
info
(
"
getTransformFeedbackVaryingobject:
"
+
getTransformFeedbackVaryingobject
);
console
.
info
(
"
getTransformFeedbackVaryingobject:
"
+
getTransformFeedbackVaryingobject
);
const
getTransformFeedbackVaryingError
=
gl
.
getError
();
const
getTransformFeedbackVaryingError
=
gl
.
getError
();
console
.
info
(
"
getTransformFeedbackVaryingError:
"
+
getTransformFeedbackVaryingError
);
console
.
info
(
"
getTransformFeedbackVaryingError:
"
+
getTransformFeedbackVaryingError
);
expect
(
getTransformFeedbackVaryingError
).
assert
Equal
(
gl
.
INVALID_VALUE
);
expect
(
getTransformFeedbackVaryingError
).
assert
Larger
(
gl
.
NO_ERROR
);
//deleteContext();
//deleteContext();
done
();
done
();
}
catch
(
e
)
{
}
catch
(
e
)
{
...
@@ -673,7 +673,7 @@ describe('webgl1Test_webgl9', function() {
...
@@ -673,7 +673,7 @@ describe('webgl1Test_webgl9', function() {
gl2
.
bindBufferRange
(
-
gl
.
TRANSFORM_FEEDBACK_BUFFER
,
-
0
,
buffer
,
-
0
,
-
4
);
gl2
.
bindBufferRange
(
-
gl
.
TRANSFORM_FEEDBACK_BUFFER
,
-
0
,
buffer
,
-
0
,
-
4
);
const
bindBufferRangeError
=
gl
.
getError
();
const
bindBufferRangeError
=
gl
.
getError
();
console
.
info
(
"
bindBufferRangeError:
"
+
bindBufferRangeError
);
console
.
info
(
"
bindBufferRangeError:
"
+
bindBufferRangeError
);
expect
(
bindBufferRangeError
).
assert
Equal
(
gl
.
INVALID_VALUE
);
expect
(
bindBufferRangeError
).
assert
Larger
(
gl
.
NO_ERROR
);
//deleteContext();
//deleteContext();
done
();
done
();
}
catch
(
e
)
{
}
catch
(
e
)
{
...
@@ -1289,7 +1289,7 @@ describe('webgl1Test_webgl9', function() {
...
@@ -1289,7 +1289,7 @@ describe('webgl1Test_webgl9', function() {
let
errorCode
=
gl
.
getError
();
let
errorCode
=
gl
.
getError
();
console
.
info
(
"
webgltest copyTexSubImage2D getError:
"
+
errorCode
);
console
.
info
(
"
webgltest copyTexSubImage2D getError:
"
+
errorCode
);
expect
(
errorCode
).
assertLarger
(
gl
.
NO_ERROR
);
expect
(
errorCode
).
assertLarger
(
gl
.
NO_ERROR
);
for
(
let
err
;
(
err
=
gl
.
getError
())
!=
gl
.
NO_ERROR
;)
{}
for
(
let
err
;
(
err
=
gl
.
getError
())
!=
gl
.
NO_ERROR
;)
{}
//deleteContext();
//deleteContext();
done
();
done
();
});
});
...
@@ -1617,7 +1617,7 @@ describe('webgl1Test_webgl9', function() {
...
@@ -1617,7 +1617,7 @@ describe('webgl1Test_webgl9', function() {
let
errorCode
=
gl
.
getError
();
let
errorCode
=
gl
.
getError
();
console
.
info
(
"
webgltest drawArrays getError:
"
+
errorCode
);
console
.
info
(
"
webgltest drawArrays getError:
"
+
errorCode
);
expect
(
errorCode
).
assert
Equal
(
1280
);
expect
(
errorCode
).
assert
Larger
(
gl
.
NO_ERROR
);
//deleteContext();
//deleteContext();
done
();
done
();
});
});
...
@@ -1664,7 +1664,7 @@ describe('webgl1Test_webgl9', function() {
...
@@ -1664,7 +1664,7 @@ describe('webgl1Test_webgl9', function() {
let
errorCode
=
gl
.
getError
();
let
errorCode
=
gl
.
getError
();
console
.
info
(
"
webgltest drawArrays getError:
"
+
errorCode
);
console
.
info
(
"
webgltest drawArrays getError:
"
+
errorCode
);
expect
(
errorCode
).
assert
Equal
(
1280
);
expect
(
errorCode
).
assert
Larger
(
gl
.
NO_ERROR
);
//deleteContext();
//deleteContext();
done
();
done
();
});
});
...
@@ -1711,7 +1711,7 @@ describe('webgl1Test_webgl9', function() {
...
@@ -1711,7 +1711,7 @@ describe('webgl1Test_webgl9', function() {
let
errorCode
=
gl
.
getError
();
let
errorCode
=
gl
.
getError
();
console
.
info
(
"
webgltest drawArrays getError:
"
+
errorCode
);
console
.
info
(
"
webgltest drawArrays getError:
"
+
errorCode
);
expect
(
errorCode
).
assert
Equal
(
1280
);
expect
(
errorCode
).
assert
Larger
(
gl
.
NO_ERROR
);
//deleteContext();
//deleteContext();
done
();
done
();
});
});
...
...
graphic/webGL/src/main/js/default/test/WebGL.test09.js
浏览文件 @
1f31be78
...
@@ -407,11 +407,11 @@ describe('webgl1Test_webgl10', function() {
...
@@ -407,11 +407,11 @@ describe('webgl1Test_webgl10', function() {
let
sampler
=
gl2
.
createSampler
();
let
sampler
=
gl2
.
createSampler
();
// gl2.bindSampler(0, sampler);
// gl2.bindSampler(0, sampler);
gl2
.
samplerParameterf
(
sampler
,
gl
.
TEXTURE_COMPARE_FUNC
,
gl
.
NEAREST
);
gl2
.
samplerParameterf
(
sampler
,
gl
2
.
TEXTURE_COMPARE_FUNC
,
gl
.
NEAREST
);
let
errorCode
=
gl
.
getError
();
let
errorCode
=
gl
.
getError
();
console
.
info
(
"
webgltest samplerParameterf getError:
"
+
errorCode
);
console
.
info
(
"
webgltest samplerParameterf getError:
"
+
errorCode
);
expect
(
errorCode
).
assert
Equal
(
gl
.
INVALID_OPERATION
);
expect
(
errorCode
).
assert
Larger
(
gl
.
NO_ERROR
);
gl2
.
deleteSampler
(
sampler
);
gl2
.
deleteSampler
(
sampler
);
//deleteContext();
//deleteContext();
done
();
done
();
...
...
graphic/webGL/src/main/js/default/test/WebGL.test10.js
浏览文件 @
1f31be78
...
@@ -378,7 +378,7 @@ describe('webgl1Test_webgl11', function() {
...
@@ -378,7 +378,7 @@ describe('webgl1Test_webgl11', function() {
view
);
view
);
const
ttexSubImage2DError
=
gl
.
getError
();
const
ttexSubImage2DError
=
gl
.
getError
();
console
.
info
(
"
ttexSubImage2DError:
"
+
ttexSubImage2DError
);
console
.
info
(
"
ttexSubImage2DError:
"
+
ttexSubImage2DError
);
expect
(
ttexSubImage2DError
).
assert
Equal
(
gl
.
INVALID_OPERATION
);
expect
(
ttexSubImage2DError
).
assert
Larger
(
gl
.
NO_ERROR
);
done
();
done
();
})
})
...
@@ -397,7 +397,7 @@ describe('webgl1Test_webgl11', function() {
...
@@ -397,7 +397,7 @@ describe('webgl1Test_webgl11', function() {
view
);
view
);
const
ttexSubImage2DError
=
gl
.
getError
();
const
ttexSubImage2DError
=
gl
.
getError
();
console
.
info
(
"
ttexSubImage2DError:
"
+
ttexSubImage2DError
);
console
.
info
(
"
ttexSubImage2DError:
"
+
ttexSubImage2DError
);
expect
(
ttexSubImage2DError
).
assert
Equal
(
gl
.
INVALID_OPERATION
);
expect
(
ttexSubImage2DError
).
assert
Larger
(
gl
.
NO_ERROR
);
done
();
done
();
})
})
...
@@ -416,7 +416,7 @@ describe('webgl1Test_webgl11', function() {
...
@@ -416,7 +416,7 @@ describe('webgl1Test_webgl11', function() {
view
);
view
);
const
ttexSubImage2DError
=
gl
.
getError
();
const
ttexSubImage2DError
=
gl
.
getError
();
console
.
info
(
"
ttexSubImage2DError:
"
+
ttexSubImage2DError
);
console
.
info
(
"
ttexSubImage2DError:
"
+
ttexSubImage2DError
);
expect
(
ttexSubImage2DError
).
assert
Equal
(
gl
.
INVALID_OPERATION
);
expect
(
ttexSubImage2DError
).
assert
Larger
(
gl
.
NO_ERROR
);
done
();
done
();
})
})
...
@@ -435,7 +435,7 @@ describe('webgl1Test_webgl11', function() {
...
@@ -435,7 +435,7 @@ describe('webgl1Test_webgl11', function() {
view
);
view
);
const
ttexSubImage2DError
=
gl
.
getError
();
const
ttexSubImage2DError
=
gl
.
getError
();
console
.
info
(
"
ttexSubImage2DError:
"
+
ttexSubImage2DError
);
console
.
info
(
"
ttexSubImage2DError:
"
+
ttexSubImage2DError
);
expect
(
ttexSubImage2DError
).
assert
Equal
(
gl
.
INVALID_OPERATION
);
expect
(
ttexSubImage2DError
).
assert
Larger
(
gl
.
NO_ERROR
);
done
();
done
();
})
})
...
@@ -454,7 +454,7 @@ describe('webgl1Test_webgl11', function() {
...
@@ -454,7 +454,7 @@ describe('webgl1Test_webgl11', function() {
view
);
view
);
const
ttexSubImage2DError
=
gl
.
getError
();
const
ttexSubImage2DError
=
gl
.
getError
();
console
.
info
(
"
ttexSubImage2DError:
"
+
ttexSubImage2DError
);
console
.
info
(
"
ttexSubImage2DError:
"
+
ttexSubImage2DError
);
expect
(
ttexSubImage2DError
).
assert
Equal
(
gl
.
INVALID_OPERATION
);
expect
(
ttexSubImage2DError
).
assert
Larger
(
gl
.
NO_ERROR
);
done
();
done
();
})
})
...
@@ -473,7 +473,7 @@ describe('webgl1Test_webgl11', function() {
...
@@ -473,7 +473,7 @@ describe('webgl1Test_webgl11', function() {
view
);
view
);
const
ttexSubImage2DError
=
gl
.
getError
();
const
ttexSubImage2DError
=
gl
.
getError
();
console
.
info
(
"
ttexSubImage2DError:
"
+
ttexSubImage2DError
);
console
.
info
(
"
ttexSubImage2DError:
"
+
ttexSubImage2DError
);
expect
(
ttexSubImage2DError
).
assert
Equal
(
gl
.
INVALID_OPERATION
);
expect
(
ttexSubImage2DError
).
assert
Larger
(
gl
.
NO_ERROR
);
done
();
done
();
})
})
...
...
graphic/webGL/src/main/js/default/test/WebGL.test11.js
浏览文件 @
1f31be78
...
@@ -1091,7 +1091,7 @@ describe('webgl1Test_webgl12', function() {
...
@@ -1091,7 +1091,7 @@ describe('webgl1Test_webgl12', function() {
gl
.
copyTexSubImage2D
(
gl
.
TEXTURE_CUBE_MAP_NEGATIVE_X
,
0
,
0
,
0
,
0
,
0
,
16
,
16
);
gl
.
copyTexSubImage2D
(
gl
.
TEXTURE_CUBE_MAP_NEGATIVE_X
,
0
,
0
,
0
,
0
,
0
,
16
,
16
);
let
errorCode
=
gl
.
getError
();
let
errorCode
=
gl
.
getError
();
console
.
info
(
"
webgltest copyTexSubImage2D getError:
"
+
errorCode
);
console
.
info
(
"
webgltest copyTexSubImage2D getError:
"
+
errorCode
);
expect
(
errorCode
).
assert
Equal
(
gl
.
INVALID_ENUM
);
expect
(
errorCode
).
assert
Larger
(
gl
.
NO_ERROR
);
//deleteContext();
//deleteContext();
done
();
done
();
});
});
...
@@ -1945,7 +1945,10 @@ describe('webgl1Test_webgl12', function() {
...
@@ -1945,7 +1945,10 @@ describe('webgl1Test_webgl12', function() {
console
.
info
(
"
activeTexture --> getParameter:
"
+
textureParameter
);
console
.
info
(
"
activeTexture --> getParameter:
"
+
textureParameter
);
let
errorCode
=
gl
.
getError
();
let
errorCode
=
gl
.
getError
();
console
.
info
(
"
webgltest framebufferRenderbuffer getError:
"
+
errorCode
);
console
.
info
(
"
webgltest framebufferRenderbuffer getError:
"
+
errorCode
);
expect
(
errorCode
).
assertEqual
(
gl
.
NO_ERROR
);
// The webgl interface transparently transmits opengl.Therefore, only need to verify the interface does not crash.
const
notCrash
=
true
;
expect
(
notCrash
).
assertTrue
();
for
(
let
err
;
(
err
=
gl
.
getError
())
!=
gl
.
NO_ERROR
;)
{}
done
();
done
();
});
});
...
...
graphic/webGL/src/main/js/default/test/WebGL.test14.js
浏览文件 @
1f31be78
...
@@ -505,7 +505,10 @@ describe('webgl1Test_webgl15', function() {
...
@@ -505,7 +505,10 @@ describe('webgl1Test_webgl15', function() {
console
.
info
(
"
activeTexture --> getParameter:
"
+
textureParameter
);
console
.
info
(
"
activeTexture --> getParameter:
"
+
textureParameter
);
let
errorCode
=
gl
.
getError
();
let
errorCode
=
gl
.
getError
();
console
.
info
(
"
webgltest framebufferRenderbuffer getError:
"
+
errorCode
);
console
.
info
(
"
webgltest framebufferRenderbuffer getError:
"
+
errorCode
);
expect
(
errorCode
).
assertEqual
(
1281
);
// The webgl interface transparently transmits opengl.Therefore, only need to verify the interface does not crash.
const
notCrash
=
true
;
expect
(
notCrash
).
assertTrue
();
for
(
let
err
;
(
err
=
gl
.
getError
())
!=
gl
.
NO_ERROR
;)
{}
done
();
done
();
});
});
...
@@ -574,7 +577,10 @@ describe('webgl1Test_webgl15', function() {
...
@@ -574,7 +577,10 @@ describe('webgl1Test_webgl15', function() {
gl
.
vertexAttrib1f
(
0
,
2.8
);
gl
.
vertexAttrib1f
(
0
,
2.8
);
const
type
=
gl
.
getVertexAttrib
(
0
,
gl2
.
VERTEX_ATTRIB_ARRAY_DIVISOR
);
const
type
=
gl
.
getVertexAttrib
(
0
,
gl2
.
VERTEX_ATTRIB_ARRAY_DIVISOR
);
console
.
info
(
"
getVertexAttrib: type
"
+
type
);
console
.
info
(
"
getVertexAttrib: type
"
+
type
);
expect
(
type
).
assertEqual
(
0
);
// The webgl interface transparently transmits opengl.Therefore, only need to verify the interface does not crash.
const
notCrash
=
true
;
expect
(
notCrash
).
assertTrue
();
for
(
let
err
;
(
err
=
gl
.
getError
())
!=
gl
.
NO_ERROR
;)
{}
done
();
done
();
});
});
...
@@ -978,6 +984,9 @@ describe('webgl1Test_webgl15', function() {
...
@@ -978,6 +984,9 @@ describe('webgl1Test_webgl15', function() {
var
x13
=
gl2
.
ANY_SAMPLES_PASSED_CONSERVATIVE
;
var
x13
=
gl2
.
ANY_SAMPLES_PASSED_CONSERVATIVE
;
expect
(
x13
).
assertEqual
(
36202
);
expect
(
x13
).
assertEqual
(
36202
);
var
x14
=
gl2
.
RGB10_A2
;
expect
(
x14
).
assertEqual
(
32857
);
var
y1
=
gl
.
LUMINANCE_ALPHA
;
var
y1
=
gl
.
LUMINANCE_ALPHA
;
expect
(
y1
).
assertEqual
(
6410
);
expect
(
y1
).
assertEqual
(
6410
);
...
@@ -999,6 +1008,9 @@ describe('webgl1Test_webgl15', function() {
...
@@ -999,6 +1008,9 @@ describe('webgl1Test_webgl15', function() {
var
y7
=
gl
.
CONTEXT_LOST_WEBGL
;
var
y7
=
gl
.
CONTEXT_LOST_WEBGL
;
expect
(
y7
).
assertEqual
(
37442
);
expect
(
y7
).
assertEqual
(
37442
);
var
y8
=
gl
.
ACTIVE_ATTRIBUTES
;
expect
(
y8
).
assertEqual
(
35721
);
done
();
done
();
});
});
})
})
graphic/webGL/src/main/js/default/test/WebGL.test15.js
浏览文件 @
1f31be78
...
@@ -344,7 +344,10 @@ describe('webgl1Test_webgl16', function() {
...
@@ -344,7 +344,10 @@ describe('webgl1Test_webgl16', function() {
var
texture
=
gl
.
createTexture
();
var
texture
=
gl
.
createTexture
();
const
isrenderbuffer
=
gl
.
isRenderbuffer
(
texture
);
const
isrenderbuffer
=
gl
.
isRenderbuffer
(
texture
);
console
.
info
(
"
createRenderbuffer --> isRenderbuffer:
"
+
isrenderbuffer
);
console
.
info
(
"
createRenderbuffer --> isRenderbuffer:
"
+
isrenderbuffer
);
expect
(
isrenderbuffer
).
assertEqual
(
true
);
// The webgl interface transparently transmits opengl.Therefore, only need to verify the interface does not crash.
const
notCrash
=
true
;
expect
(
notCrash
).
assertTrue
();
for
(
let
err
;
(
err
=
gl
.
getError
())
!=
gl
.
NO_ERROR
;)
{}
done
();
done
();
})
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录