daily pastebin goal
14%
SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <irrlicht.h>
  2.  
  3. using namespace irr;
  4. using namespace core;
  5. using namespace scene;
  6. using namespace video;
  7. using namespace io;
  8. using namespace gui;
  9.  
  10. class Shader
  11. {
  12. private:
  13.     s32 material;
  14.     IMaterialRendererServices* services;
  15.  
  16. public:
  17.  
  18.     Shader(IGPUProgrammingServices* gpu, IReadFile *shader_path, c8 *vEntry, c8 *pEntry, E_VERTEX_SHADER_TYPE vTarget, E_PIXEL_SHADER_TYPE pTarget)
  19.     {
  20.         material = gpu->addHighLevelShaderMaterialFromFiles(shader_path, vEntry, vTarget,
  21.                                                             shader_path, pEntry, pTarget);
  22.     }
  23.  
  24.     void SetShaderValue(c8 *name, f32 *floats, int float_count)
  25.     {
  26.         services->setPixelShaderConstant(name, floats, float_count);
  27.     }
  28.  
  29.     s32 GetMaterial()
  30.     {
  31.         return material;
  32.     }
  33. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top