import MeshComponent from '../foundation/components/MeshComponent' ; import WebGLContextWrapper from './WebGLContextWrapper' ; import { Primitive } from '../foundation/geometry/Primitive' ; import Matrix44 from '../foundation/math/Matrix44' ; import Matrix33 from '../foundation/math/Matrix33' ; import Entity from '../foundation/core/Entity' ; import CubeTexture from '../foundation/textures/CubeTexture' ; import Material from '../foundation/materials/core/Material' ; import RenderPass from '../foundation/renderer/RenderPass' ; import MeshRendererComponent from '../foundation/components/MeshRendererComponent' ; import { WebGLResourceHandle , Index , Count , CGAPIResourceHandle , } from '../types/CommonTypes' ; import { IMatrix44 } from '../foundation/math/IMatrix' ; export type ShaderSources = { vertex : string ; pixel : string ; } ; export default interface WebGLStrategy { $load ( meshComponent ) : void ; $prerender ( meshComponent , meshRendererComponent , instanceIDBufferUid ) : void ; $render ? ( i , meshComponent , worldMatrix , normalMatrix , entity , renderPass , renderPassTickCount , diffuseCube ? , specularCube ? ) : void ; common_$prerender ( ) : void ; common_$render ( meshComponentSids , meshComponents , viewMatrix , projectionMatrix , renderPass , renderPassTickCount ) : boolean ; attachGPUData ( primitive ) : void ; attachVertexData ( i , primitive , glw , instanceIDBufferUid ) : void ; attachShaderProgram ( material ) : void ; setupShaderForMaterial ( material , updatedShaderSources ? ) : CGAPIResourceHandle ; }