ShaderImpl.h 775 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright (C) 2009-2021, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #pragma once
  6. #include <AnKi/Gr/Shader.h>
  7. #include <AnKi/Gr/gl/GlObject.h>
  8. namespace anki {
  9. // Forward
  10. class CString;
  11. /// @addtogroup opengl
  12. /// @{
  13. /// Shader program implementation.
  14. class ShaderImpl final : public Shader, public GlObject
  15. {
  16. public:
  17. GLenum m_glType = 0;
  18. ShaderImpl(GrManager* manager, CString name)
  19. : Shader(manager, name)
  20. {
  21. }
  22. ~ShaderImpl();
  23. void preInit(const ShaderInitInfo& init)
  24. {
  25. m_shaderType = init.m_shaderType;
  26. }
  27. ANKI_USE_RESULT Error init(CString source, ConstWeakArray<ShaderSpecializationConstValue> constValues);
  28. };
  29. /// @}
  30. } // end namespace anki