Git Product home page Git Product logo

opengl-dynamic-shader-editing's Introduction

opengl-dynamic-shader-editing

This Shader Program Wrapper enables the user to dynamically edit shaders at runtime. It can be either used for debugging shaders or while presenting the effects of changes to the shader code.

Note

Tested with GLFW and GLAD. Header file might have to be modified to fit your project.

How to use

  1. Initialize the Shader Program Wrapper with a Vertex Shader and a Fragment Shader:
ShaderProgramWrapper spw("shaders/vertex_shader.shader", 
  "shaders/fragment_shader.shader", 
  true);

If the last parameter is set to false, the shader files will not be watched.

  1. Use the underlying Shader Program to render:
spw.UseShaderProgram();
  1. You can edit the shader files at runtime and changes will apply after saving.

Impressions

Window, console and fragment shader which is ready to be edited: 1

Saving with errors in the shader does show them in the console: 2

Saving without errors in the shader yields the expected results: 3

opengl-dynamic-shader-editing's People

Contributors

haehnpt avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.