29 lines
554 B
Java
29 lines
554 B
Java
package electrosphere.opencl;
|
|
|
|
import org.lwjgl.system.MemoryStack;
|
|
|
|
/**
|
|
* A context for the lwjgl framework. Contains stack used by opencl api.
|
|
*/
|
|
public class LWJGLContext {
|
|
|
|
//The stack for memory allocation
|
|
MemoryStack stack;
|
|
|
|
/**
|
|
* Constructor
|
|
*/
|
|
public LWJGLContext(){
|
|
stack = MemoryStack.create(1000 * 1000 * 4 * 4);
|
|
}
|
|
|
|
/**
|
|
* Gets the memory stack for the current context
|
|
* @return The lwjgl context's memory stack
|
|
*/
|
|
public MemoryStack getStack(){
|
|
return stack;
|
|
}
|
|
|
|
}
|