Sign in to follow this  

Texture buffer or frame buffer?

Recommended Posts

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?

Share this post

Link to post
Share on other sites
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

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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this