Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
8bec0cae
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看板
未验证
提交
8bec0cae
编写于
2月 06, 2023
作者:
O
openharmony_ci
提交者:
Gitee
2月 06, 2023
浏览文件
操作
浏览文件
下载
差异文件
!7418 修复graphic webgl drawElements|drawElementsInstanced|drawRangeElements 用例错误
Merge pull request !7418 from xiahaiqin/master
上级
18c0acd2
ed734fd5
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
5 deletion
+15
-5
graphic/webGL/src/main/js/test/WebGL.test01.js
graphic/webGL/src/main/js/test/WebGL.test01.js
+4
-0
graphic/webGL/src/main/js/test/WebGL.test02.js
graphic/webGL/src/main/js/test/WebGL.test02.js
+8
-2
graphic/webGL/src/main/js/test/WebGL.test05.js
graphic/webGL/src/main/js/test/WebGL.test05.js
+3
-3
未找到文件。
graphic/webGL/src/main/js/test/WebGL.test01.js
浏览文件 @
8bec0cae
...
@@ -1989,6 +1989,10 @@ export default function webgl1Test_webgl1(){
...
@@ -1989,6 +1989,10 @@ export default function webgl1Test_webgl1(){
return
;
return
;
}
}
const
indexBuffer
=
gl
.
createBuffer
();
gl
.
bindBuffer
(
gl
.
ELEMENT_ARRAY_BUFFER
,
indexBuffer
);
gl
.
bufferData
(
gl
.
ELEMENT_ARRAY_BUFFER
,
indices
.
buffer
,
gl
.
STATIC_DRAW
);
var
maxViewPortDimsParameter
=
gl
.
getParameter
(
gl
.
MAX_VIEWPORT_DIMS
);
var
maxViewPortDimsParameter
=
gl
.
getParameter
(
gl
.
MAX_VIEWPORT_DIMS
);
console
.
log
(
'
maxViewPortDimsParameter:
'
+
maxViewPortDimsParameter
);
console
.
log
(
'
maxViewPortDimsParameter:
'
+
maxViewPortDimsParameter
);
var
viewPortParameter
=
gl
.
getParameter
(
gl
.
VIEWPORT
);
var
viewPortParameter
=
gl
.
getParameter
(
gl
.
VIEWPORT
);
...
...
graphic/webGL/src/main/js/test/WebGL.test02.js
浏览文件 @
8bec0cae
...
@@ -2433,12 +2433,15 @@ export default function webgl1Test_webgl2(){
...
@@ -2433,12 +2433,15 @@ export default function webgl1Test_webgl2(){
it
(
'
webgl_test_drawElementsInstanced
'
,
0
,
async
function
(
done
)
{
it
(
'
webgl_test_drawElementsInstanced
'
,
0
,
async
function
(
done
)
{
//initContext();
//initContext();
console
.
info
(
"
webgltest into drawElementsInstanced
"
);
console
.
info
(
"
webgltest into drawElementsInstanced
"
);
const
indexBuffer
=
gl
.
createBuffer
();
gl
.
bindBuffer
(
gl
.
ELEMENT_ARRAY_BUFFER
,
indexBuffer
);
gl
.
bufferData
(
gl
.
ELEMENT_ARRAY_BUFFER
,
indices
.
buffer
,
gl
.
STATIC_DRAW
);
const
a
=
gl2
.
drawElementsInstanced
(
gl
.
POINTS
,
2
,
gl
.
UNSIGNED_SHORT
,
0
,
4
);
const
a
=
gl2
.
drawElementsInstanced
(
gl
.
POINTS
,
2
,
gl
.
UNSIGNED_SHORT
,
0
,
4
);
let
errorCode
=
gl
.
getError
();
let
errorCode
=
gl
.
getError
();
console
.
info
(
"
webgltest drawElementsInstanced getError:
"
+
errorCode
);
console
.
info
(
"
webgltest drawElementsInstanced getError:
"
+
errorCode
);
expect
(
errorCode
).
assertEqual
(
gl
.
INVALID_VALUE
);
expect
(
errorCode
).
assertEqual
(
gl
.
NO_ERROR
);
//deleteContext();
//deleteContext();
done
();
done
();
});
});
...
@@ -2452,12 +2455,15 @@ export default function webgl1Test_webgl2(){
...
@@ -2452,12 +2455,15 @@ export default function webgl1Test_webgl2(){
it
(
'
webgl_test_drawRangeElements
'
,
0
,
async
function
(
done
)
{
it
(
'
webgl_test_drawRangeElements
'
,
0
,
async
function
(
done
)
{
//initContext();
//initContext();
console
.
info
(
"
webgltest into drawRangeElements
"
);
console
.
info
(
"
webgltest into drawRangeElements
"
);
const
indexBuffer
=
gl
.
createBuffer
();
gl
.
bindBuffer
(
gl
.
ELEMENT_ARRAY_BUFFER
,
indexBuffer
);
gl
.
bufferData
(
gl
.
ELEMENT_ARRAY_BUFFER
,
indices
.
buffer
,
gl
.
STATIC_DRAW
);
const
a
=
gl2
.
drawRangeElements
(
gl
.
POINTS
,
0
,
7
,
8
,
gl
.
UNSIGNED_BYTE
,
0
);
const
a
=
gl2
.
drawRangeElements
(
gl
.
POINTS
,
0
,
7
,
8
,
gl
.
UNSIGNED_BYTE
,
0
);
let
errorCode
=
gl
.
getError
();
let
errorCode
=
gl
.
getError
();
console
.
info
(
"
webgltest drawRangeElements getError:
"
+
errorCode
);
console
.
info
(
"
webgltest drawRangeElements getError:
"
+
errorCode
);
expect
(
errorCode
).
assertEqual
(
gl
.
INVALID_VALUE
);
expect
(
errorCode
).
assertEqual
(
gl
.
NO_ERROR
);
//deleteContext();
//deleteContext();
done
();
done
();
...
...
graphic/webGL/src/main/js/test/WebGL.test05.js
浏览文件 @
8bec0cae
...
@@ -380,7 +380,7 @@ export default function webgl1Test_webgl5() {
...
@@ -380,7 +380,7 @@ export default function webgl1Test_webgl5() {
gl
.
bufferData
(
gl
.
ELEMENT_ARRAY_BUFFER
,
new
ArrayBuffer
(
8
),
gl
.
STATIC_DRAW
);
gl
.
bufferData
(
gl
.
ELEMENT_ARRAY_BUFFER
,
new
ArrayBuffer
(
8
),
gl
.
STATIC_DRAW
);
const
bufferDataError
=
gl
.
getError
();
const
bufferDataError
=
gl
.
getError
();
console
.
info
(
"
bufferDataError:
"
+
bufferDataError
);
console
.
info
(
"
bufferDataError:
"
+
bufferDataError
);
expect
(
bufferDataError
).
assertEqual
(
gl
.
INVALID_OPERATION
);
expect
(
bufferDataError
).
assertEqual
(
gl
.
NO_ERROR
);
done
();
done
();
})
})
...
@@ -485,7 +485,7 @@ export default function webgl1Test_webgl5() {
...
@@ -485,7 +485,7 @@ export default function webgl1Test_webgl5() {
gl
.
bufferSubData
(
gl
.
COPY_READ_BUFFER
,
512
,
new
ArrayBuffer
(
8
));
gl
.
bufferSubData
(
gl
.
COPY_READ_BUFFER
,
512
,
new
ArrayBuffer
(
8
));
const
bufferSubDataError
=
gl
.
getError
();
const
bufferSubDataError
=
gl
.
getError
();
console
.
info
(
"
bufferSubDataError:
"
+
bufferSubDataError
);
console
.
info
(
"
bufferSubDataError:
"
+
bufferSubDataError
);
expect
(
bufferSubDataError
).
assertEqual
(
gl
.
INVALID_OPERATION
);
expect
(
bufferSubDataError
).
assertEqual
(
gl
.
NO_ERROR
);
done
();
done
();
})
})
...
@@ -1231,7 +1231,7 @@ export default function webgl1Test_webgl5() {
...
@@ -1231,7 +1231,7 @@ export default function webgl1Test_webgl5() {
gl
.
uniform4iv
(
uniformlocationObj
,
int32list
);
gl
.
uniform4iv
(
uniformlocationObj
,
int32list
);
const
uniform4ivError
=
gl
.
getError
();
const
uniform4ivError
=
gl
.
getError
();
console
.
info
(
"
testUniform4ivError:
"
+
uniform4ivError
);
console
.
info
(
"
testUniform4ivError:
"
+
uniform4ivError
);
expect
(
uniform4ivError
).
assertEqual
(
gl
.
INVALID_OPERATION
);
expect
(
uniform4ivError
).
assertEqual
(
gl
.
NO_ERROR
);
done
();
done
();
})
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录