added a constructor that disables the program cache: used during development
This commit is contained in:
parent
a2df82b9e0
commit
e35bb7dcbc
@ -43,8 +43,8 @@ import java.util.logging.Logger;
|
|||||||
*/
|
*/
|
||||||
public class OpenCLObjectManager {
|
public class OpenCLObjectManager {
|
||||||
private static final Logger LOG = Logger.getLogger(OpenCLObjectManager.class.getName());
|
private static final Logger LOG = Logger.getLogger(OpenCLObjectManager.class.getName());
|
||||||
private static final Level LOG_LEVEL1 = Level.INFO;
|
private static final Level LOG_LEVEL1 = Level.FINER;
|
||||||
private static final Level LOG_LEVEL2 = Level.INFO;
|
private static final Level LOG_LEVEL2 = Level.FINE;
|
||||||
/**
|
/**
|
||||||
* Call Runtime.getRuntime().gc() every these frames
|
* Call Runtime.getRuntime().gc() every these frames
|
||||||
*/
|
*/
|
||||||
|
@ -59,6 +59,21 @@ public class ProgramCache {
|
|||||||
private final Device device;
|
private final Device device;
|
||||||
private final File tmpFolder;
|
private final File tmpFolder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a "disabled" program cache, no caching is done.
|
||||||
|
* {@link #loadFromCache(java.lang.String) } will always return {@code null}
|
||||||
|
* and {@link #saveToCache(java.lang.String, com.jme3.opencl.Program) } does
|
||||||
|
* nothing.<br>
|
||||||
|
* Use this during development if you still modify your kernel code.
|
||||||
|
* (Otherwise, you don't see the changes because you are still use the
|
||||||
|
* cached version of your program)
|
||||||
|
*/
|
||||||
|
public ProgramCache() {
|
||||||
|
this.context = null;
|
||||||
|
this.device = null;
|
||||||
|
this.tmpFolder = null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new program cache associated with the specified context and
|
* Creates a new program cache associated with the specified context and
|
||||||
* devices.
|
* devices.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user