Typo correctness for some render module files (#5846)

This commit is contained in:
Lelie Leight (李的序)
2019-12-05 15:19:26 +08:00
committed by pandamicro
parent b72b661feb
commit 5a40b2d01a
5 changed files with 19 additions and 19 deletions
+4 -4
View File
@@ -238,20 +238,20 @@ export class WebGLGFXCommandBuffer extends GFXCommandBuffer {
}
}
public setDepthBias (depthBiasConstantFacotr: number, depthBiasClamp: number, depthBiasSlopeFactor: number) {
public setDepthBias (depthBiasConstantFactor: number, depthBiasClamp: number, depthBiasSlopeFactor: number) {
if (!this._curDepthBias) {
this._curDepthBias = {
constantFactor: depthBiasConstantFacotr,
constantFactor: depthBiasConstantFactor,
clamp: depthBiasClamp,
slopeFactor: depthBiasSlopeFactor,
};
this._isStateInvalied = true;
} else {
if (this._curDepthBias.constantFactor !== depthBiasConstantFacotr ||
if (this._curDepthBias.constantFactor !== depthBiasConstantFactor ||
this._curDepthBias.clamp !== depthBiasClamp ||
this._curDepthBias.slopeFactor !== depthBiasSlopeFactor) {
this._curDepthBias.constantFactor = depthBiasConstantFacotr;
this._curDepthBias.constantFactor = depthBiasConstantFactor;
this._curDepthBias.clamp = depthBiasClamp;
this._curDepthBias.slopeFactor = depthBiasSlopeFactor;
this._isStateInvalied = true;
+5 -5
View File
@@ -1195,7 +1195,7 @@ export function WebGLCmdFuncCreateShader (device: WebGLGFXDevice, gpuShader: Web
gl.linkProgram(gpuShader.glProgram);
if (gl.getProgramParameter(gpuShader.glProgram, gl.LINK_STATUS)) {
console.info('Shader \'' + gpuShader.name + '\' compilation successed.');
console.info('Shader \'' + gpuShader.name + '\' compilation succeeded.');
} else {
console.error('Failed to link shader \'' + gpuShader.name + '\'.');
console.error(gl.getProgramInfoLog(gpuShader.glProgram));
@@ -1545,7 +1545,7 @@ export function WebGLCmdFuncExecuteCmds (device: WebGLGFXDevice, cmdPackage: Web
if (colorAttachment.format !== GFXFormat.UNKNOWN) {
switch (colorAttachment.loadOp) {
case GFXLoadOp.LOAD: break; // GL default behaviour
case GFXLoadOp.LOAD: break; // GL default behavior
case GFXLoadOp.CLEAR: {
if (cmd0.clearFlag & GFXClearFlag.COLOR) {
if (cache.bs.targets[0].blendColorMask !== GFXColorMask.ALL) {
@@ -1572,7 +1572,7 @@ export function WebGLCmdFuncExecuteCmds (device: WebGLGFXDevice, cmdPackage: Web
if (curGPURenderPass.depthStencilAttachment.format !== GFXFormat.UNKNOWN) {
switch (curGPURenderPass.depthStencilAttachment.depthLoadOp) {
case GFXLoadOp.LOAD: break; // GL default behaviour
case GFXLoadOp.LOAD: break; // GL default behavior
case GFXLoadOp.CLEAR: {
if (cmd0.clearFlag & GFXClearFlag.DEPTH) {
if (!cache.dss.depthWrite) {
@@ -1595,7 +1595,7 @@ export function WebGLCmdFuncExecuteCmds (device: WebGLGFXDevice, cmdPackage: Web
if (GFXFormatInfos[curGPURenderPass.depthStencilAttachment.format].hasStencil) {
switch (curGPURenderPass.depthStencilAttachment.stencilLoadOp) {
case GFXLoadOp.LOAD: break; // GL default behaviour
case GFXLoadOp.LOAD: break; // GL default behavior
case GFXLoadOp.CLEAR: {
if (cmd0.clearFlag & GFXClearFlag.STENCIL) {
if (!cache.dss.stencilWriteMaskFront) {
@@ -1666,7 +1666,7 @@ export function WebGLCmdFuncExecuteCmds (device: WebGLGFXDevice, cmdPackage: Web
/*
case WebGLCmd.END_RENDER_PASS: {
// WebGL 1.0 doesn't support store operation of attachments.
// GFXStoreOp.Store is the default GL behaviour.
// GFXStoreOp.Store is the default GL behavior.
break;
}
*/
@@ -237,20 +237,20 @@ export class WebGL2GFXCommandBuffer extends GFXCommandBuffer {
}
}
public setDepthBias (depthBiasConstantFacotr: number, depthBiasClamp: number, depthBiasSlopeFactor: number) {
public setDepthBias (depthBiasConstantFactor: number, depthBiasClamp: number, depthBiasSlopeFactor: number) {
if (!this._curDepthBias) {
this._curDepthBias = {
constantFactor: depthBiasConstantFacotr,
constantFactor: depthBiasConstantFactor,
clamp: depthBiasClamp,
slopeFactor: depthBiasSlopeFactor,
};
this._isStateInvalied = true;
} else {
if (this._curDepthBias.constantFactor !== depthBiasConstantFacotr ||
if (this._curDepthBias.constantFactor !== depthBiasConstantFactor ||
this._curDepthBias.clamp !== depthBiasClamp ||
this._curDepthBias.slopeFactor !== depthBiasSlopeFactor) {
this._curDepthBias.constantFactor = depthBiasConstantFacotr;
this._curDepthBias.constantFactor = depthBiasConstantFactor;
this._curDepthBias.clamp = depthBiasClamp;
this._curDepthBias.slopeFactor = depthBiasSlopeFactor;
this._isStateInvalied = true;
+4 -4
View File
@@ -1784,7 +1784,7 @@ export function WebGL2CmdFuncExecuteCmds (device: WebGL2GFXDevice, cmdPackage: W
if (colorAttachment.format !== GFXFormat.UNKNOWN) {
switch (colorAttachment.loadOp) {
case GFXLoadOp.LOAD: break; // GL default behaviour
case GFXLoadOp.LOAD: break; // GL default behavior
case GFXLoadOp.CLEAR: {
if (cmd0.clearFlag & GFXClearFlag.COLOR) {
if (cache.bs.targets[0].blendColorMask !== GFXColorMask.ALL) {
@@ -1819,7 +1819,7 @@ export function WebGL2CmdFuncExecuteCmds (device: WebGL2GFXDevice, cmdPackage: W
if (curGPURenderPass.depthStencilAttachment.format !== GFXFormat.UNKNOWN) {
switch (curGPURenderPass.depthStencilAttachment.depthLoadOp) {
case GFXLoadOp.LOAD: break; // GL default behaviour
case GFXLoadOp.LOAD: break; // GL default behavior
case GFXLoadOp.CLEAR: {
if (cmd0.clearFlag & GFXClearFlag.DEPTH) {
if (!cache.dss.depthWrite) {
@@ -1842,7 +1842,7 @@ export function WebGL2CmdFuncExecuteCmds (device: WebGL2GFXDevice, cmdPackage: W
if (GFXFormatInfos[curGPURenderPass.depthStencilAttachment.format].hasStencil) {
switch (curGPURenderPass.depthStencilAttachment.stencilLoadOp) {
case GFXLoadOp.LOAD: break; // GL default behaviour
case GFXLoadOp.LOAD: break; // GL default behavior
case GFXLoadOp.CLEAR: {
if (cmd0.clearFlag & GFXClearFlag.STENCIL) {
if (!cache.dss.stencilWriteMaskFront) {
@@ -1910,7 +1910,7 @@ export function WebGL2CmdFuncExecuteCmds (device: WebGL2GFXDevice, cmdPackage: W
}
case WebGL2Cmd.END_RENDER_PASS: {
// WebGL 2.0 doesn't support store operation of attachments.
// GFXStoreOp.Store is the default GL behaviour.
// GFXStoreOp.Store is the default GL behavior.
break;
}
case WebGL2Cmd.BIND_STATES: {
+2 -2
View File
@@ -151,13 +151,13 @@ export class MeshBuffer {
return;
}
const vertexsData = new Float32Array(this.vData!.buffer, 0, this.byteOffset >> 2);
const verticesData = new Float32Array(this.vData!.buffer, 0, this.byteOffset >> 2);
const indicesData = new Uint16Array(this.iData!.buffer, 0, this.indiceOffset);
if (this.byteOffset > this.vb!.size) {
this.vb!.resize(this.byteOffset);
}
this.vb!.update(vertexsData);
this.vb!.update(verticesData);
if (this.indiceOffset * 2 > this.ib!.size) {
this.ib!.resize(this.indiceOffset * 2);