mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
complete ui render pipeline
This commit is contained in:
@@ -254,9 +254,11 @@ export class WebGLGFXDevice extends GFXDevice {
|
||||
};
|
||||
|
||||
this._webGLRC = this._canvas.getContext('webgl', webGLCtxAttribs);
|
||||
/*
|
||||
if (this._webGLRC && info.debug) {
|
||||
this._webGLRC = WebGLDeveloperTools.makeDebugContext(this._webGLRC, this._onWebGLError.bind(this));
|
||||
}
|
||||
*/
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
return false;
|
||||
|
||||
@@ -279,8 +279,8 @@ export class UI {
|
||||
if (curCamera) {
|
||||
cmdBuff.endRenderPass();
|
||||
}
|
||||
this._renderArea.width = camera.width;
|
||||
this._renderArea.height = camera.height;
|
||||
this._renderArea.width = camera.orthoHeight * camera.aspect;
|
||||
this._renderArea.height = camera.orthoHeight;
|
||||
|
||||
camera.update();
|
||||
|
||||
@@ -292,7 +292,7 @@ export class UI {
|
||||
|
||||
curCamera = camera;
|
||||
|
||||
cmdBuff.beginRenderPass(framebuffer, this._renderArea, [camera.clearColor], camera.clearDepth, camera.clearStencil);
|
||||
cmdBuff.beginRenderPass(framebuffer, this._renderArea, [], camera.clearDepth, camera.clearStencil);
|
||||
}
|
||||
|
||||
material.bindingLayout.bindBuffer(0, this._uiUBO!);
|
||||
|
||||
Reference in New Issue
Block a user