Merge pull request #51 from YunHsiao/gfx

pipeline defines
This commit is contained in:
Weiliang Wang
2019-01-15 11:22:43 +08:00
committed by GitHub
6 changed files with 10 additions and 9 deletions
+1 -1
View File
@@ -404,7 +404,7 @@ export class Mesh extends Asset {
* !#en
* Gets the specified submesh.
* @param index Index of the specified submesh.
* @deprecated Using this.renderingMesh.getSubmesh(index)inputAssembler instead.
* @deprecated Use this.renderingMesh.getSubmesh(index).inputAssembler instead.
*/
public getSubMesh (index: number) {
const renderingSubmesh = this.renderingMesh ? this.renderingMesh.getSubmesh(index) : null;
+1 -1
View File
@@ -39,13 +39,13 @@ export function createJointsTexture (skinning: { joints: any[]; }) {
return texture;
}
const copyAttribute = (attribute: IVertexAttribute) => Object.assign({}, attribute);
export function createMesh (geometry: IGeometry) {
// Collect attributes and calculate length of result vertex buffer.
const attributes: IVertexAttribute[] = [];
let stride = 0;
const channels: Array<{ offset: number; data: number[]; attribute: IVertexAttribute; }> = [];
let verticesCount = 0;
const copyAttribute = (attribute: IVertexAttribute) => Object.assign({}, attribute);
const addAttribute = (attribute: IVertexAttribute, data: number[]) => {
const componentCount = _getComponentCount(attribute);
const componentBytesLength = _getComponentByteLength(attribute);
+4
View File
@@ -0,0 +1,4 @@
export enum RenderPassStage {
DEFAULT = 100,
}
+2 -1
View File
@@ -1 +1,2 @@
import "./render-view";
import './define';
import './render-view';
+1 -6
View File
@@ -1,7 +1,6 @@
import { intersect } from '../3d/geom-utils';
import { Root } from '../core/root';
import { vec3 } from '../core/vmath';
import mat4 from '../core/vmath/mat4';
import { mat4, vec3 } from '../core/vmath';
import { GFXBuffer } from '../gfx/buffer';
import { GFXBufferUsageBit, GFXFormat, GFXMemoryUsageBit, GFXType } from '../gfx/define';
import { GFXDevice } from '../gfx/device';
@@ -15,10 +14,6 @@ import { IRenderFlowInfo, RenderFlow } from './render-flow';
import { RenderQueue } from './render-queue';
import { RenderView } from './render-view';
export enum RenderPassStage {
DEFAULT = 100,
}
export class UBOGlobal {
public static TIME_OFFSET: number = 0;
public static SCREEN_SIZE_OFFSET: number = UBOGlobal.TIME_OFFSET + 4;
+1
View File
@@ -41,5 +41,6 @@ export * from './cocos/components';
export * from './cocos/animation';
export * from './cocos/3d';
export * from './cocos/gfx';
export * from './cocos/pipeline';
// export default cc;