Delete src/main directory

This commit is contained in:
JoeMolinelli authored and GitHub committed 2026-07-09 22:29:08 -04:00
1 parent e1d7f70eda
commit 800569688a
42 files changed
-7693

No files matched your search

-46
View File
@@ -1,46 +0,0 @@
package renderer;
import static org.lwjgl.opengl.GL30.glGenFramebuffers;
import static org.lwjgl.opengl.GL30.GL_FRAMEBUFFER;
import static org.lwjgl.opengl.GL30.glBindFramebuffer;
import static org.lwjgl.opengl.GL30.*;
public class FrameBuffer {
private int fboID = 0;
private Texture texture = null;
public FrameBuffer(int width, int height) {
fboID = glGenFramebuffers();
glBindFramebuffer(GL_FRAMEBUFFER, fboID);
this.texture = new Texture(width, height);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, this.texture.getId(), 0);
int rboID = glGenRenderbuffers();
glBindRenderbuffer(GL_RENDERBUFFER, rboID);
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT32, width, height);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, rboID);
if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) {
assert false : "Error: Framebuffer is not complete";
}
glBindFramebuffer(GL_FRAMEBUFFER, 0);
}
public void bind() {
glBindFramebuffer(GL_FRAMEBUFFER, fboID);
}
public void unbind() {
glBindFramebuffer(GL_FRAMEBUFFER, 0);
}
public int getFboID() {
return fboID;
}
public int getTextureId() {
return texture.getId();
}
}