1 /*
2  * Copyright (c) 2009-2010 jMonkeyEngine
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are
7  * met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  *   notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  *   notice, this list of conditions and the following disclaimer in the
14  *   documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
17  *   may be used to endorse or promote products derived from this software
18  *   without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
33 package com.jme3.system;
34 
35 import com.jme3.light.LightList;
36 import com.jme3.material.RenderState;
37 import com.jme3.math.ColorRGBA;
38 import com.jme3.math.Matrix4f;
39 import com.jme3.renderer.Caps;
40 import com.jme3.renderer.Renderer;
41 import com.jme3.renderer.Statistics;
42 import com.jme3.scene.Mesh;
43 import com.jme3.scene.VertexBuffer;
44 import com.jme3.shader.Shader;
45 import com.jme3.shader.Shader.ShaderSource;
46 import com.jme3.texture.FrameBuffer;
47 import com.jme3.texture.Image;
48 import com.jme3.texture.Texture;
49 import java.nio.ByteBuffer;
50 import java.util.EnumSet;
51 
52 public class NullRenderer implements Renderer {
53 
54     private static final EnumSet<Caps> caps = EnumSet.noneOf(Caps.class);
55     private static final Statistics stats = new Statistics();
56 
getCaps()57     public EnumSet<Caps> getCaps() {
58         return caps;
59     }
60 
getStatistics()61     public Statistics getStatistics() {
62         return stats;
63     }
64 
invalidateState()65     public void invalidateState(){
66     }
67 
clearBuffers(boolean color, boolean depth, boolean stencil)68     public void clearBuffers(boolean color, boolean depth, boolean stencil) {
69     }
70 
setBackgroundColor(ColorRGBA color)71     public void setBackgroundColor(ColorRGBA color) {
72     }
73 
applyRenderState(RenderState state)74     public void applyRenderState(RenderState state) {
75     }
76 
setDepthRange(float start, float end)77     public void setDepthRange(float start, float end) {
78     }
79 
onFrame()80     public void onFrame() {
81     }
82 
setWorldMatrix(Matrix4f worldMatrix)83     public void setWorldMatrix(Matrix4f worldMatrix) {
84     }
85 
setViewProjectionMatrices(Matrix4f viewMatrix, Matrix4f projMatrix)86     public void setViewProjectionMatrices(Matrix4f viewMatrix, Matrix4f projMatrix) {
87     }
88 
setViewPort(int x, int y, int width, int height)89     public void setViewPort(int x, int y, int width, int height) {
90     }
91 
setClipRect(int x, int y, int width, int height)92     public void setClipRect(int x, int y, int width, int height) {
93     }
94 
clearClipRect()95     public void clearClipRect() {
96     }
97 
setLighting(LightList lights)98     public void setLighting(LightList lights) {
99     }
100 
setShader(Shader shader)101     public void setShader(Shader shader) {
102     }
103 
deleteShader(Shader shader)104     public void deleteShader(Shader shader) {
105     }
106 
deleteShaderSource(ShaderSource source)107     public void deleteShaderSource(ShaderSource source) {
108     }
109 
copyFrameBuffer(FrameBuffer src, FrameBuffer dst)110     public void copyFrameBuffer(FrameBuffer src, FrameBuffer dst) {
111     }
112 
copyFrameBuffer(FrameBuffer src, FrameBuffer dst, boolean copyDepth)113     public void copyFrameBuffer(FrameBuffer src, FrameBuffer dst, boolean copyDepth) {
114     }
115 
setMainFrameBufferOverride(FrameBuffer fb)116     public void setMainFrameBufferOverride(FrameBuffer fb) {
117     }
118 
setFrameBuffer(FrameBuffer fb)119     public void setFrameBuffer(FrameBuffer fb) {
120     }
121 
readFrameBuffer(FrameBuffer fb, ByteBuffer byteBuf)122     public void readFrameBuffer(FrameBuffer fb, ByteBuffer byteBuf) {
123     }
124 
deleteFrameBuffer(FrameBuffer fb)125     public void deleteFrameBuffer(FrameBuffer fb) {
126     }
127 
setTexture(int unit, Texture tex)128     public void setTexture(int unit, Texture tex) {
129     }
130 
updateBufferData(VertexBuffer vb)131     public void updateBufferData(VertexBuffer vb) {
132     }
133 
deleteBuffer(VertexBuffer vb)134     public void deleteBuffer(VertexBuffer vb) {
135     }
136 
renderMesh(Mesh mesh, int lod, int count)137     public void renderMesh(Mesh mesh, int lod, int count) {
138     }
139 
resetGLObjects()140     public void resetGLObjects() {
141     }
142 
cleanup()143     public void cleanup() {
144     }
145 
deleteImage(Image image)146     public void deleteImage(Image image) {
147     }
148 
setAlphaToCoverage(boolean value)149     public void setAlphaToCoverage(boolean value) {
150     }
151 
152 }
153