/** * Force all of the textures to load. This prevents pauses later during the application as you pan around the world. */ public void preloadTextures(final Renderer r) { for (int x = 0; x < 6; x++) { final TextureState ts = (TextureState) _skyboxQuads[x].getLocalRenderState(RenderState.StateType.Texture); if (ts != null) { r.applyState(StateType.Texture, ts); } } }
/** * Force all of the textures to load. This prevents pauses later during the application as you pan around the world. */ public void preloadTextures(final Renderer r) { for (int x = 0; x < 6; x++) { final TextureState ts = (TextureState) _skyboxQuads[x].getLocalRenderState(RenderState.StateType.Texture); if (ts != null) { r.applyState(StateType.Texture, ts); } } }
protected void applyRenderStates(final Renderer renderer, final Mesh mesh) { for (final StateType type : StateType.values) { renderer.applyState(type, mesh.getWorldRenderState(type)); } } }
public void visit(final Spatial spatial) { if (spatial instanceof Mesh) { final Mesh mesh = (Mesh) spatial; final TextureState state = (TextureState) mesh.getWorldRenderState(StateType.Texture); if (state != null) { _renderer.applyState(state.getType(), state); } } }
public void preloadTexture(final Face face, final Renderer r) { final TextureState ts = (TextureState) _skyboxQuads[face.ordinal()] .getLocalRenderState(RenderState.StateType.Texture); if (ts != null) { r.applyState(StateType.Texture, ts); } }
public void preloadTexture(final Face face, final Renderer r) { final TextureState ts = (TextureState) _skyboxQuads[face.ordinal()] .getLocalRenderState(RenderState.StateType.Texture); if (ts != null) { r.applyState(StateType.Texture, ts); } }
renderer.applyState(type, _states.get(type)); renderer.applyState(StateType.GLSLShader, _states.get(StateType.GLSLShader)); renderer.applyState(StateType.FragmentProgram, _states.get(StateType.FragmentProgram)); renderer.applyState(StateType.VertexProgram, _states.get(StateType.VertexProgram)); while (instancing.apply(this, renderer, glsl)) { renderer.applyState(StateType.GLSLShader, _states.get(StateType.GLSLShader)); renderer.applyState(StateType.FragmentProgram, _states.get(StateType.FragmentProgram)); renderer.applyState(StateType.VertexProgram, _states.get(StateType.VertexProgram));