Skip to main content
gamedev.net
🔒 Locked

Texture buffer or frame buffer?

Started by mlt Dec 20, 2008 at 11:22 AM 2 replies 400+ views
Original Post
mlt
mlt
In the red bible I can only find documentation about a framebuffer. But I have also heard that there is something called a texture buffer, what are the difference between a frame buffer and a texture buffer? I need to render a frame to a texture so I assume that I need the texture buffer and not the frame buffer. Are there any tutorials around regarding how to write a frame to a texture?
V-man
V-man
Yes, there is one here on gamedev.net....somewhere

there is also sample code here
http://www.opengl.org/wiki/index.php/GL_EXT_framebuffer_object
mlt
mlt
Thanks, but are there any difference between a texture buffer and a framebuffer?
V-man
V-man
That's an GPU implementation detail which GL doesn't care about.
Usually, the framebuffer is layed out in a linear format, very much like a bmp file. A texture, there might be arranged differently
http://www.opengl.org/wiki/index.php/Texture_Mapping

Quote:
GL_TEXTURE_2D has width and height and usually the GPU stores this in memory in a format that is quick to access.
For example, small blocks of the texture are stored in sequence so that cache memory works better. This has been part of GL since 1.0
Texture coordinates are normalized. That means if you have a dimension like 256x256, texcoords are from 0.0 to 1.0.
Of course, if you go beyond that, such as -1.0 to 5.0, then the texture will repeat over your polygon.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.