|
|
@ -161,6 +161,7 @@ public class LwjglContext extends Context { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Buffer bindVertexBuffer(VertexBuffer vb, MemoryAccess access) { |
|
|
|
public Buffer bindVertexBuffer(VertexBuffer vb, MemoryAccess access) { |
|
|
|
|
|
|
|
Utils.assertSharingPossible(); |
|
|
|
int id = vb.getId(); |
|
|
|
int id = vb.getId(); |
|
|
|
if (id == -1) { |
|
|
|
if (id == -1) { |
|
|
|
throw new IllegalArgumentException("vertex buffer was not yet uploaded to the GPU or is CPU only"); |
|
|
|
throw new IllegalArgumentException("vertex buffer was not yet uploaded to the GPU or is CPU only"); |
|
|
@ -174,6 +175,7 @@ public class LwjglContext extends Context { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Image bindImage(com.jme3.texture.Image image, Texture.Type textureType, int miplevel, MemoryAccess access) { |
|
|
|
public Image bindImage(com.jme3.texture.Image image, Texture.Type textureType, int miplevel, MemoryAccess access) { |
|
|
|
|
|
|
|
Utils.assertSharingPossible(); |
|
|
|
int imageID = image.getId(); |
|
|
|
int imageID = image.getId(); |
|
|
|
if (imageID == -1) { |
|
|
|
if (imageID == -1) { |
|
|
|
throw new IllegalArgumentException("image was not yet uploaded to the GPU"); |
|
|
|
throw new IllegalArgumentException("image was not yet uploaded to the GPU"); |
|
|
@ -188,6 +190,7 @@ public class LwjglContext extends Context { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected Image bindPureRenderBuffer(FrameBuffer.RenderBuffer buffer, MemoryAccess access) { |
|
|
|
protected Image bindPureRenderBuffer(FrameBuffer.RenderBuffer buffer, MemoryAccess access) { |
|
|
|
|
|
|
|
Utils.assertSharingPossible(); |
|
|
|
int renderbuffer = buffer.getId(); |
|
|
|
int renderbuffer = buffer.getId(); |
|
|
|
if (renderbuffer == -1) { |
|
|
|
if (renderbuffer == -1) { |
|
|
|
throw new IllegalArgumentException("renderbuffer was not yet uploaded to the GPU"); |
|
|
|
throw new IllegalArgumentException("renderbuffer was not yet uploaded to the GPU"); |
|
|
|