aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.c2
-rw-r--r--src/render.c20
-rw-r--r--src/types.h4
3 files changed, 2 insertions, 24 deletions
diff --git a/src/main.c b/src/main.c
index 26f0cb6..3b644dc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -50,7 +50,7 @@ int main(int argc, char *argv[]) {
int c;
Uint32 video_flags;
ScreenResolution res;
- Uint32 t;
+ Uint32 t = 0;
int disable_vbos = 0;
int disable_fbos = 0;
diff --git a/src/render.c b/src/render.c
index e6c19d4..890a011 100644
--- a/src/render.c
+++ b/src/render.c
@@ -208,24 +208,6 @@ RenderContext *render_setup(int width, int height, int disable_vbos, int disable
if ( r->fbos ) {
- /* Create a small FBO for rendering reflections with */
- glGenFramebuffersEXT(1, &r->fbo);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, r->fbo);
- /* Add a (texture) colour buffer to the FBO */
- glGenTextures(1, &r->fbotex);
- glBindTexture(GL_TEXTURE_2D, r->fbotex);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 128, 128, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
- glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, r->fbotex, 0);
- /* Add a depth buffer to the FBO */
- glGenRenderbuffersEXT(1, &r->fbodepth);
- glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, r->fbodepth);
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_STENCIL_EXT, 128, 128);
- glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, r->fbodepth);
- glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, r->fbodepth);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
-
/* FBO for rendering swirlyness */
glGenFramebuffersEXT(1, &r->swirly_fbo);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, r->swirly_fbo);
@@ -676,7 +658,7 @@ void render_draw(Game *game, Uint32 t) {
}
- /* Second pass: Main view */
+ /* Main view */
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glViewport(0, 0, r->width, r->height);
glMatrixMode(GL_PROJECTION);
diff --git a/src/types.h b/src/types.h
index aec6ee8..e997a6a 100644
--- a/src/types.h
+++ b/src/types.h
@@ -125,10 +125,6 @@ typedef struct {
/* Textures */
Texture textures[MAX_TEXTURES];
unsigned int num_textures;
-
- GLuint fbo;
- GLuint fbotex;
- GLuint fbodepth;
/* Swirlyness stuff */
GLuint swirly_vert;