complete ui render pipeline

This commit is contained in:
jerrywwl
2019-01-24 19:06:05 +08:00
parent 5a97eca1fd
commit fada40faa0
2 changed files with 5 additions and 3 deletions
+2
View File
@@ -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;
+3 -3
View File
@@ -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!);