/*
    Copyright 2016 Arnaud Guyon

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
 */
package fr.arnaudguyon.smartgl.opengl;

/**
 * Created by arnaud on 20/11/2016.
 */

public class RenderPassObject3D extends RenderPass {

    public RenderPassObject3D() {
        super(true, true);
        ShaderTexture shader = new ShaderTexture();
        setShader(shader);
    }

    public void addObject(Object3D object3D) {
        getRenderObjects().add(object3D);
    }
}

@@ -743,58 +743,545 @@
 lic 
-RenderPassObject3D() %7B%0A        super(true, true);%0A
+enum ShaderType %7B%0A        SHADER_TEXTURE,%0A        SHADER_COLOR%0A    %7D%0A%0A    public RenderPassObject3D() %7B%0A        super(true, true);%0A        setShader(ShaderType.SHADER_TEXTURE);%0A    %7D%0A    public RenderPassObject3D(ShaderType shaderType, boolean useZBuffer, boolean clearZBuffer) %7B%0A        super(useZBuffer, clearZBuffer);%0A        setShader(shaderType);%0A    %7D%0A    // TODO: see if change shader during renderpass...%0A%0A    private void setShader(ShaderType shaderType) %7B%0A        switch (shaderType) %7B%0A            case SHADER_TEXTURE:%0A        
     
@@ -1304,16 +1304,23 @@
 e shader
+Texture
  = new S
@@ -1335,16 +1335,24 @@
 ture();%0A
+        
         
@@ -1367,18 +1367,213 @@
 r(shader
-);
+Texture);%0A                break;%0A            case SHADER_COLOR:%0A                ShaderColor shaderColor = new ShaderColor();%0A                setShader(shaderColor);%0A                break;%0A        %7D
 %0A    %7D%0A%0A

Allow the RenderPassObject3D to be initialized with a ShaderTexture or ShaderColor