Skip to content

class to easily "render screen to texture and save to a file" without intervention in shaders

License

Notifications You must be signed in to change notification settings

fgfuchs/OpenGLScreenToHost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenGLScreenToHost

class allowing to render to a texture and save the texture to a file (without intervention in the shaders)

USAGE:

  1. Include the header

    #include "ScreenDump.hpp"

  2. Create an instance of the class

    ScreenDump screenDump(width,height);

  3. Use bool for triggering

    bool dump_toFile;

  4. Do the following in the render loop:

    if (dump_toFile) { screenDump->bindData(width, height); // width, height of the screen }

    draw();

    if (dump_toFile) { screenDump->dumpTexImage(fileName); screenDump->unbindData(); dump_toFile = false; }

About

class to easily "render screen to texture and save to a file" without intervention in shaders

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages