David Catuhe 7 年之前
父节点
当前提交
da2e7a5b93
共有 1 个文件被更改,包括 17 次插入0 次删除
  1. 17 0
      src/Engine/babylon.engine.ts

+ 17 - 0
src/Engine/babylon.engine.ts

@@ -3393,6 +3393,14 @@
                 ["diffuseSampler"].concat(samplers), defines, fallbacks, onCompiled, onError);
                 ["diffuseSampler"].concat(samplers), defines, fallbacks, onCompiled, onError);
         }
         }
 
 
+        /**
+         * Directly creates a webGL program
+         * @param vertexCode defines the vertex shader code to use
+         * @param fragmentCode defines the fragment shader code to use
+         * @param context defines the webGL context to use (if not set, the current one will be used)
+         * @param transformFeedbackVaryings defines the list of transform feedback varyings to use
+         * @returns the new webGL program
+         */
         public createRawShaderProgram(vertexCode: string, fragmentCode: string, context?: WebGLRenderingContext, transformFeedbackVaryings: Nullable<string[]> = null): WebGLProgram {
         public createRawShaderProgram(vertexCode: string, fragmentCode: string, context?: WebGLRenderingContext, transformFeedbackVaryings: Nullable<string[]> = null): WebGLProgram {
             context = context || this._gl;
             context = context || this._gl;
 
 
@@ -3402,6 +3410,15 @@
             return this._createShaderProgram(vertexShader, fragmentShader, context, transformFeedbackVaryings);
             return this._createShaderProgram(vertexShader, fragmentShader, context, transformFeedbackVaryings);
         }
         }
 
 
+        /**
+         * Creates a webGL program
+         * @param vertexCode  defines the vertex shader code to use
+         * @param fragmentCode defines the fragment shader code to use
+         * @param defines defines the string containing the defines to use to compile the shaders
+         * @param context defines the webGL context to use (if not set, the current one will be used)
+         * @param transformFeedbackVaryings defines the list of transform feedback varyings to use
+         * @returns the new webGL program
+         */
         public createShaderProgram(vertexCode: string, fragmentCode: string, defines: Nullable<string>, context?: WebGLRenderingContext, transformFeedbackVaryings: Nullable<string[]> = null): WebGLProgram {
         public createShaderProgram(vertexCode: string, fragmentCode: string, defines: Nullable<string>, context?: WebGLRenderingContext, transformFeedbackVaryings: Nullable<string[]> = null): WebGLProgram {
             context = context || this._gl;
             context = context || this._gl;