Hallo!

One question. How can i render normals to a texture with a FBO?
I currently use this code:
Code :
normaltexture = glGenTextures();
glBindTexture(GL_TEXTURE_2D, normaltexture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, Display.getWidth(), Display.getHeight(), 0, GL_RGBA, GL_FLOAT, (ByteBuffer) null);
 
glBindTexture(GL_TEXTURE_2D, 0);

And thats the way how i bind the texture to the FBO:
Code :
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT1, GL_TEXTURE_2D, normaltexture, 0);

But it does not seem to work. If i render the result texture to a quad like a simple post process, the screen gets black.
The default color texture and the depth texture work well, but, yeah, as i said, the normals texture won't work...