| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
- //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
- #pragma once
- #include "BsGLPrerequisites.h"
- #include "RenderAPI/BsGpuProgram.h"
- namespace bs { namespace ct
- {
- /** @addtogroup GL
- * @{
- */
- /** GPU program compiled from GLSL and usable by OpenGL. */
- class GLSLGpuProgram : public GpuProgram
- {
- public:
- ~GLSLGpuProgram();
- /** @copydoc GpuProgram::isSupported */
- bool isSupported() const override;
- /** Gets internal OpenGL handle to the program. */
- GLuint getGLHandle() const { return mGLHandle; }
- /** Gets an unique index for this GPU program. Each created GPU program is assigned a unique index on creation. */
- UINT32 getProgramID() const { return mProgramID; }
- private:
- friend class GLSLProgramFactory;
- GLSLGpuProgram(const GPU_PROGRAM_DESC& desc, GpuDeviceFlags deviceMask);
- /** @copydoc GpuProgram::initialize */
- void initialize() override;
- private:
- UINT32 mProgramID;
- GLuint mGLHandle;
- static UINT32 mVertexShaderCount;
- static UINT32 mFragmentShaderCount;
- static UINT32 mGeometryShaderCount;
- static UINT32 mHullShaderCount;
- static UINT32 mDomainShaderCount;
- static UINT32 mComputeShaderCount;
- };
- /** @} */
- }}
|