start clean-up of surface handling (onscreen and offscreen)

This commit is contained in:
codeanticode
2012-11-23 21:14:54 +00:00
parent 6876c9a5d4
commit d58d71f969
3 changed files with 178 additions and 14 deletions

View File

@@ -630,6 +630,12 @@ public class PGL {
}
// CLEANUP!
protected int primaryReadFramebuffer() {
if (capabilities.isFBO()) {
return context.getDefaultReadFramebuffer();
@@ -638,6 +644,7 @@ public class PGL {
}
}
protected int primaryDrawFramebuffer() {
if (capabilities.isFBO()) {
return context.getDefaultDrawFramebuffer();
@@ -662,26 +669,88 @@ public class PGL {
}
}
protected boolean primaryIsFboBacked() {
protected boolean isFBOBacked() {
return capabilities.isFBO();
}
protected int getFboTexTarget() {
return GL.GL_TEXTURE_2D;
}
protected int getFboTexName() {
protected int getBackTexName() {
return backTex.getName();
}
protected int getFboWidth() {
protected int getBackTexTarget() {
return GL.GL_TEXTURE_2D;
}
protected int getBackTexFormat() {
return backTex.format;
}
protected int getBackTexWidth() {
return backTex.getWidth();
}
protected int getFboHeight() {
protected int getBackTexHeight() {
return backTex.getHeight();
}
protected int getBackTexMinFilter() {
return backTex.minFilter;
}
protected int getBackTexMagFilter() {
return backTex.magFilter;
}
protected int getBackTexWrapS() {
return backTex.wrapS;
}
protected int getBackTexWrapT() {
return backTex.wrapT;
}
protected int getFrontTexName() {
return frontTex.getName();
}
protected int getFrontTexTarget() {
return GL.GL_TEXTURE_2D;
}
protected int getFrontTexFormat() {
return frontTex.format;
}
protected int getFrontTexWidth() {
return frontTex.getWidth();
}
protected int getFrontTexHeight() {
return frontTex.getHeight();
}
protected int getFrontTexMinFilter() {
return frontTex.minFilter;
}
protected int getFrontTexMagFilter() {
return frontTex.magFilter;
}
protected int getFrontTexWrapS() {
return frontTex.wrapS;
}
protected int getFrontTexWrapT() {
return frontTex.wrapT;
}
/*
protected void bindPrimaryColorFBO() {
if (multisample) {
@@ -775,6 +844,11 @@ public class PGL {
}
///////////////////////////////////////////////////////////
// Frame rendering