Lwjgl3Window(ApplicationListener listener, Lwjgl3ApplicationConfiguration config) { this.listener = listener; this.windowListener = config.windowListener; this.config = config; this.tmpBuffer = BufferUtils.createIntBuffer(1); this.tmpBuffer2 = BufferUtils.createIntBuffer(1); }
public OpenALAudioDevice (OpenALAudio audio, int sampleRate, boolean isMono, int bufferSize, int bufferCount) { this.audio = audio; channels = isMono ? 1 : 2; this.bufferSize = bufferSize; this.bufferCount = bufferCount; this.format = channels > 1 ? AL_FORMAT_STEREO16 : AL_FORMAT_MONO16; this.sampleRate = sampleRate; secondsPerBuffer = (float)bufferSize / bytesPerSample / channels / sampleRate; tempBuffer = BufferUtils.createByteBuffer(bufferSize); }
@Override public boolean openURI (String URI) { return Sys.openURL(URI); }
public String glGetActiveAttrib (int program, int index, IntBuffer size, Buffer type) { IntBuffer typeTmp = BufferUtils.createIntBuffer(2); String name = GL20.glGetActiveAttrib(program, index, 256, size, typeTmp); size.put(typeTmp.get(0)); if (type instanceof IntBuffer) ((IntBuffer)type).put(typeTmp.get(1)); return name; }
public String glGetActiveUniform (int program, int index, IntBuffer size, Buffer type) { // FIXME this is less than ideal of course... IntBuffer typeTmp = BufferUtils.createIntBuffer(2); String name = GL20.glGetActiveUniform(program, index, 256, typeTmp); size.put(typeTmp.get(0)); if (type instanceof IntBuffer) ((IntBuffer)type).put(typeTmp.get(1)); return name; }
@Override public Monitor[] getMonitors() { PointerBuffer glfwMonitors = GLFW.glfwGetMonitors(); Monitor[] monitors = new Monitor[glfwMonitors.limit()]; for (int i = 0; i < glfwMonitors.limit(); i++) { monitors[i] = Lwjgl3ApplicationConfiguration.toLwjgl3Monitor(glfwMonitors.get(i)); } return monitors; }
/** * Returns the pointer value at the specified offset. */ public long pointerValue(int offset) { return PointerBuffer.get(buffer, offset); }
@Override public long getRawTimeInMs() { return (Sys.getTime() * 1000) / Sys.getTimerResolution(); } }
public OpenALAudioDevice (OpenALAudio audio, int sampleRate, boolean isMono, int bufferSize, int bufferCount) { this.audio = audio; channels = isMono ? 1 : 2; this.bufferSize = bufferSize; this.bufferCount = bufferCount; this.format = channels > 1 ? AL_FORMAT_STEREO16 : AL_FORMAT_MONO16; this.sampleRate = sampleRate; secondsPerBuffer = (float)bufferSize / bytesPerSample / channels / sampleRate; tempBuffer = BufferUtils.createByteBuffer(bufferSize); }
public String glGetActiveAttrib (int program, int index, IntBuffer size, Buffer type) { IntBuffer typeTmp = BufferUtils.createIntBuffer(2); String name = GL20.glGetActiveAttrib(program, index, 256, size, typeTmp); size.put(typeTmp.get(0)); if (type instanceof IntBuffer) ((IntBuffer)type).put(typeTmp.get(1)); return name; }
public String glGetActiveUniform (int program, int index, IntBuffer size, Buffer type) { IntBuffer typeTmp = BufferUtils.createIntBuffer(2); String name = GL20.glGetActiveUniform(program, index, 256, size, typeTmp); size.put(typeTmp.get(0)); if (type instanceof IntBuffer) ((IntBuffer)type).put(typeTmp.get(1)); return name; }
Lwjgl3Window(ApplicationListener listener, Lwjgl3ApplicationConfiguration config) { this.listener = listener; this.windowListener = config.windowListener; this.config = config; this.tmpBuffer = BufferUtils.createIntBuffer(1); this.tmpBuffer2 = BufferUtils.createIntBuffer(1); }
@Override public Monitor[] getMonitors() { PointerBuffer glfwMonitors = GLFW.glfwGetMonitors(); Monitor[] monitors = new Monitor[glfwMonitors.limit()]; for (int i = 0; i < glfwMonitors.limit(); i++) { monitors[i] = Lwjgl3ApplicationConfiguration.toLwjgl3Monitor(glfwMonitors.get(i)); } return monitors; }
@Override public boolean openURI (String URI) { return Sys.openURL(URI); }
public OpenALAudioDevice (OpenALAudio audio, int sampleRate, boolean isMono, int bufferSize, int bufferCount) { this.audio = audio; channels = isMono ? 1 : 2; this.bufferSize = bufferSize; this.bufferCount = bufferCount; this.format = channels > 1 ? AL_FORMAT_STEREO16 : AL_FORMAT_MONO16; this.sampleRate = sampleRate; secondsPerBuffer = (float)bufferSize / bytesPerSample / channels / sampleRate; tempBuffer = BufferUtils.createByteBuffer(bufferSize); }
public String glGetActiveAttrib (int program, int index, IntBuffer size, Buffer type) { // FIXME this is less than ideal of course... IntBuffer typeTmp = BufferUtils.createIntBuffer(2); String name = GL20.glGetActiveAttrib(program, index, 256, typeTmp); size.put(typeTmp.get(0)); if (type instanceof IntBuffer) ((IntBuffer)type).put(typeTmp.get(1)); return name; }
public String glGetActiveUniform (int program, int index, IntBuffer size, Buffer type) { IntBuffer typeTmp = BufferUtils.createIntBuffer(2); String name = GL20.glGetActiveUniform(program, index, 256, size, typeTmp); size.put(typeTmp.get(0)); if (type instanceof IntBuffer) ((IntBuffer)type).put(typeTmp.get(1)); return name; }
public OpenALAudioDevice (OpenALAudio audio, int sampleRate, boolean isMono, int bufferSize, int bufferCount) { this.audio = audio; channels = isMono ? 1 : 2; this.bufferSize = bufferSize; this.bufferCount = bufferCount; this.format = channels > 1 ? AL_FORMAT_STEREO16 : AL_FORMAT_MONO16; this.sampleRate = sampleRate; secondsPerBuffer = (float)bufferSize / bytesPerSample / channels / sampleRate; tempBuffer = BufferUtils.createByteBuffer(bufferSize); }
public String glGetActiveAttrib (int program, int index, IntBuffer size, Buffer type) { // FIXME this is less than ideal of course... IntBuffer typeTmp = BufferUtils.createIntBuffer(2); String name = GL20.glGetActiveAttrib(program, index, 256, typeTmp); size.put(typeTmp.get(0)); if (type instanceof IntBuffer) ((IntBuffer)type).put(typeTmp.get(1)); return name; }
public String glGetActiveUniform (int program, int index, IntBuffer size, Buffer type) { // FIXME this is less than ideal of course... IntBuffer typeTmp = BufferUtils.createIntBuffer(2); String name = GL20.glGetActiveUniform(program, index, 256, typeTmp); size.put(typeTmp.get(0)); if (type instanceof IntBuffer) ((IntBuffer)type).put(typeTmp.get(1)); return name; }