# Frame buffer access

**URL:** <https://discourse.glfw.org/t/frame-buffer-access/329>\
**Category:** support\
**Created:** [February 24, 2005, 2:23pm UTC](https://discourse.glfw.org/t/frame-buffer-access/329 "2005-02-24T14:23:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [February 24, 2005, 2:23pm UTC](https://discourse.glfw.org/t/frame-buffer-access/329/1 "2005-02-24T14:23:37Z")

</div>

**nobody** wrote on [Thursday, February 24, 2005](https://sourceforge.net/p/glfw/discussion/247562/thread/51e760ee/#d2c2):

Is there an issue to access frame buffer to read pixels very fast (i need it to do a method like glVideoCapture)  
sorry for my bad english

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [March 5, 2005, 7:31pm UTC](https://discourse.glfw.org/t/frame-buffer-access/329/2 "2005-03-05T19:31:32Z")

</div>

**[marcus256](https://sourceforge.net/u/marcus256/)** wrote on [Saturday, March 05, 2005](https://sourceforge.net/p/glfw/discussion/247562/thread/51e760ee/#d2c2/ca81):

Well, glReadPixels/glWritePixels should work. I don’t know of any aleternate methods (except for using textures and rendering textured quads instead of glWritePixels).

Perhaps I’m missing the point here?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [April 4, 2005, 2:12pm UTC](https://discourse.glfw.org/t/frame-buffer-access/329/3 "2005-04-04T14:12:52Z")

</div>

**[shenron\_fr](https://sourceforge.net/u/shenron_fr/)** wrote on [Monday, April 04, 2005](https://sourceforge.net/p/glfw/discussion/247562/thread/51e760ee/#07d9):

Hello, i’m the guy who post the first request, thank for your answer, i know the glReadPixels feature but th GL engine (i mean opengl himself) convert pixels to the format needed and this is (relatively) time consumption.

Under win32, you can use a bitblt method to transfert memory to memory a big amount of data so using this method to transfert the framebuffer to an array used for video output is pretty fast, but i don’t know a faster method than glReadPixels

SDL also have a fast method to transfert frame buffer into a destination array without converting pixels (sorry but SDL web site is actually too slow and i can’t remember the method’s name)

I may use SDL but i like (and prefer) GLFW specially because this is a statically linkable library (not a dll) and this is a small library without unneeded stuffs  
good work

ps: sorry if my english is not so good

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [April 4, 2005, 2:19pm UTC](https://discourse.glfw.org/t/frame-buffer-access/329/4 "2005-04-04T14:19:40Z")

</div>

**[shenron\_fr](https://sourceforge.net/u/shenron_fr/)** wrote on [Monday, April 04, 2005](https://sourceforge.net/p/glfw/discussion/247562/thread/51e760ee/#72ee):

the method for direct access to frame buffer under SDL is SDL\_GetVideoSurface (eventually, you need to use SDL\_LockSurface to access it)

you can see documention about the method here :  
[http://sdldoc.csn.ul.ie/sdlgetvideosurface.php](http://sdldoc.csn.ul.ie/sdlgetvideosurface.php)
