Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes for AwayFL Stage3D #10

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ npm-debug.log

# Misc
deploy_key
deploy_key.pub
deploy_key.pub
.vscode/settings.json
13 changes: 6 additions & 7 deletions lib/aglsl/AGALTokenizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,16 @@ export class AGALTokenizer {
}

public decribeAGALPart(array: ByteArray | Part): Description {
if (array instanceof ByteArray) {
if (array instanceof Part) {
const desc = this.decribeAGALByteArray(array.data);
desc.native = array.native;
return desc;
} else
return this.decribeAGALByteArray(array);
}

const desc = this.decribeAGALByteArray(array.data);
desc.native = array.native;

return desc;
}

public decribeAGALByteArray(bytes: ByteArray): Description {
bytes.position = 0;
const header: Header = new Header();

if (bytes.readUnsignedByte() != 0xa0) {
Expand Down
6 changes: 5 additions & 1 deletion lib/base/ContextGLProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@ export enum ContextGLProfile
{
BASELINE,
BASELINE_CONSTRAINED,
BASELINE_EXTENDED
BASELINE_EXTENDED,
STANDARD,
STANDARD_CONSTRAINED,
STANDARD_EXTENDED,
ENHANCED
}
6 changes: 3 additions & 3 deletions lib/webgl/ContextWebGL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -744,11 +744,11 @@ export class ContextWebGL implements IContextGL {
}

public setVertexBufferAt(
index: number, buffer: VertexBufferWebGL, bufferOffset: number = 0, format: number = 4
index: number, buffer: VertexBufferWebGL, bufferOffset: number = 0, format: number = 4, safeAttributeLocation:boolean = true
): void {
this.stateChangeCallback && this.stateChangeCallback('setVertexBufferAt');

const location = this._currentProgram ? this._currentProgram.getAttribLocation(index) : -1;
const location = safeAttributeLocation ? this._currentProgram ? this._currentProgram.getAttribLocation(index) : -1 : index;
const gl = this._gl;

// when we try bind any buffers without VAO we should unbound VAO
Expand Down