set output FBO connection for ToneMappingNode
import org.terasology.engine.SimpleUri;
import org.terasology.monitoring.PerformanceMonitor;
import org.terasology.rendering.assets.material.Material;
-import org.terasology.rendering.dag.AbstractNode;
-import org.terasology.rendering.dag.gsoc.EdgeConnection;
import org.terasology.rendering.dag.gsoc.NewAbstractNode;
import org.terasology.rendering.dag.stateChanges.BindFbo;
import org.terasology.rendering.dag.stateChanges.EnableMaterial;
public ToneMappingNode(String nodeUri, Context context) {
super(nodeUri, context);
- this.addOutputFBOConnection(1,TONE_MAPPING_FBO_URI);
-
screenGrabber = context.get(ScreenGrabber.class);
- DisplayResolutionDependentFBOs displayResolutionDependentFBOs = context.get(DisplayResolutionDependentFBOs.class);
- FBO toneMappingFbo = requiresFBO(new FBOConfig(TONE_MAPPING_FBO_URI, FULL_SCALE, FBO.Type.HDR), displayResolutionDependentFBOs);
+ DisplayResolutionDependentFBOs displayResolutionDependentFboManager = context.get(DisplayResolutionDependentFBOs.class);
+ FBO toneMappingFbo = requiresFbo(new FBOConfig(TONE_MAPPING_FBO_URI, FULL_SCALE, FBO.Type.HDR), displayResolutionDependentFboManager);
+
+ addOutputFboConnection(1,toneMappingFbo);
+
+ //DisplayResolutionDependentFBOs displayResolutionDependentFBOs = context.get(DisplayResolutionDependentFBOs.class);
+ //FBO toneMappingFbo = requiresFbo(new FBOConfig(TONE_MAPPING_FBO_URI, FULL_SCALE, FBO.Type.HDR), displayResolutionDependentFBOs);
addDesiredStateChange(new BindFbo(toneMappingFbo));
addDesiredStateChange(new SetViewportToSizeOf(toneMappingFbo));
@@ -79,11 +80,11 @@ public ToneMappingNode(String nodeUri, Context context) {
toneMappingMaterial = getMaterial(TONE_MAPPING_MATERIAL_URN);
int textureSlot = 0;
- addDesiredStateChange(new SetInputTextureFromFbo(textureSlot, INITIAL_POST_FBO_URI, ColorTexture, displayResolutionDependentFBOs, TONE_MAPPING_MATERIAL_URN, "texScene"));
+ addDesiredStateChange(new SetInputTextureFromFbo(textureSlot, INITIAL_POST_FBO_URI, ColorTexture, displayResolutionDependentFboManager, TONE_MAPPING_MATERIAL_URN, "texScene"));
}
@Override
- public void setDependencies(){
+ public void setDependencies(Context context){
}
