// (c) Tuomas J. Lukka package gzz.gfx.gl; import gzz.vob.Vob; import java.util.HashMap; /** Cache some renderables' creation. */ public class GLCache { static HashMap callListCache = new HashMap(); public static Vob getCallList(String s) { Vob ret = (Vob)callListCache.get(s); if(ret == null) { ret = GLRen.createCallList(s); callListCache.put(s, ret); } return ret; } static HashMap callListCoordedCache = new HashMap(); public static Vob getCallListCoorded(String s) { Vob ret = (Vob)callListCoordedCache.get(s); if(ret == null) { ret = GLRen.createCallListCoorded(s); callListCoordedCache.put(s, ret); } return ret; } }