fully remove framebuffer linearized test
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2024-09-02 11:06:32 -04:00
parent 2a35bfeb6c
commit 058960727f
2 changed files with 0 additions and 49 deletions

View File

@ -328,8 +328,6 @@ public class RenderingEngine {
//default framebuffer
defaultFramebuffer = new Framebuffer(GL_DEFAULT_FRAMEBUFFER);
// FramebufferUtils.framebufferUtilsTest();
//generate framebuffers
screenTextureColor = FramebufferUtils.generateScreenTextureColorAlpha(openGLState, Globals.WINDOW_WIDTH, Globals.WINDOW_HEIGHT);

View File

@ -43,53 +43,6 @@ import static org.lwjgl.opengl.GL45.glNamedFramebufferReadBuffer;
*/
public class FramebufferUtils {
public static void framebufferUtilsTest(){
OpenGLState openGLState = Globals.renderingEngine.getOpenGLState();
int width = Globals.WINDOW_WIDTH;
int height = Globals.WINDOW_HEIGHT;
//
//Texture 1
//
Texture screenTextureColor = new Texture();
screenTextureColor.glTexImage2D(openGLState, width, height, GL_RGBA, GL_UNSIGNED_BYTE);
screenTextureColor.setMinFilter(openGLState, GL_LINEAR);
screenTextureColor.setMagFilter(openGLState, GL_LINEAR);
//these make sure the texture actually clamps to the borders of the quad
screenTextureColor.setWrap(openGLState, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
screenTextureColor.setWrap(openGLState, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
//guarantees that the texture object has actually been created (calling gen buffers does not guarantee object creation)
screenTextureColor.bind(openGLState);
openGLState.glBindTexture(GL40.GL_TEXTURE_2D, Texture.DEFAULT_TEXTURE);
screenTextureColor.checkStatus(openGLState);
//
//Texture 2
//
Texture screenTextureDepth = new Texture();
screenTextureDepth.glTexImage2D(openGLState, width, height, GL_DEPTH_COMPONENT, GL_FLOAT);
//guarantees that the texture object has actually been created (calling gen buffers does not guarantee object creation)
screenTextureDepth.bind(openGLState);
openGLState.glBindTexture(GL40.GL_TEXTURE_2D, Texture.DEFAULT_TEXTURE);
screenTextureDepth.checkStatus(openGLState);
//
//Franebuffer
//
Framebuffer screenFramebuffer = new Framebuffer();
//bind texture to fbo
screenFramebuffer.setMipMapLevel(0);
screenFramebuffer.attachTexture(openGLState,screenTextureColor);
screenFramebuffer.setDepthAttachment(openGLState,screenTextureDepth);
//check make sure compiled
screenFramebuffer.checkStatus();
}
public static Texture generateScreenTextureColor(OpenGLState openGLState, int width, int height){
Texture texture = new Texture();
texture.glTexImage2D(openGLState, width, height, GL_RGB, GL_UNSIGNED_BYTE);