user181351
user181351

Reputation:

Copy texture to screen buffer without drawing quad (opengl)

Is there a fast function to blit a texture to the screen buffer (without using extensions)? I need an Inverse of glCopyTexImage2D().

Does such a function exist?

Upvotes: 14

Views: 14886

Answers (1)

Nicol Bolas
Nicol Bolas

Reputation: 474136

The closest you will get is glBlitFramebuffer. Which, as the name suggests, is for framebuffers. Yes, framebuffers can include textures, but I wouldn't attempt to use this as a replacement for drawing textures with quads. You'll get far better performance for drawing lots of textures by using quads than blitting framebuffers.

Also, drawing a quad is a fast function for drawing a texture.

Upvotes: 18

Related Questions