-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #284 from ivanpopelyshev/feat-base-instance
BaseVertexBaseInstance without multidraw
- Loading branch information
Showing
5 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
src/backend/commands/drawArraysInstancedBaseInstanceWEBGL.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { BaseCommand } from "./baseCommand"; | ||
import { WebGlConstants } from "../types/webglConstants"; | ||
|
||
export class DrawArraysInstancedBaseInstanceWEBGL extends BaseCommand { | ||
public static readonly commandName = "drawArraysInstancedBaseInstanceWEBGL"; | ||
|
||
protected get spiedCommandName(): string { | ||
return DrawArraysInstancedBaseInstanceWEBGL.commandName; | ||
} | ||
|
||
protected stringifyArgs(args: IArguments): string[] { | ||
const stringified = []; | ||
stringified.push(WebGlConstants.stringifyWebGlConstant(args[0], "drawArraysInstanced")); | ||
stringified.push(args[1]); | ||
stringified.push(args[2]); | ||
stringified.push(args[3]); | ||
stringified.push(`baseInstance = ${args[4]}`); | ||
|
||
return stringified; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/backend/commands/drawElementsInstancedBaseVertexBaseInstanceWEBGL.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { BaseCommand } from "./baseCommand"; | ||
import { WebGlConstants } from "../types/webglConstants"; | ||
|
||
export class DrawElementsInstancedBaseVertexBaseInstanceWEBGL extends BaseCommand { | ||
public static readonly commandName = "drawElementsInstancedBaseVertexBaseInstanceWEBGL"; | ||
|
||
protected get spiedCommandName(): string { | ||
return DrawElementsInstancedBaseVertexBaseInstanceWEBGL .commandName; | ||
} | ||
|
||
protected stringifyArgs(args: IArguments): string[] { | ||
const stringified = []; | ||
stringified.push(WebGlConstants.stringifyWebGlConstant(args[0], "drawElementsInstanced")); | ||
stringified.push(args[1]); | ||
stringified.push(WebGlConstants.stringifyWebGlConstant(args[2], "drawElementsInstanced")); | ||
stringified.push(args[3]); | ||
stringified.push(args[4]); | ||
|
||
stringified.push(`baseVertex = ${args[5]}`); | ||
stringified.push(`baseInstance = ${args[6]}`); | ||
|
||
return stringified; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters