mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 01:40:04 +00:00 
			
		
		
		
	Namespace cleanup
This commit is contained in:
		
							parent
							
								
									c22db501b3
								
							
						
					
					
						commit
						5a97d99a34
					
				
					 20 changed files with 88 additions and 46 deletions
				
			
		
							
								
								
									
										45
									
								
								scwx-qt/source/scwx/qt/gl/shader_program.hpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								scwx-qt/source/scwx/qt/gl/shader_program.hpp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,45 @@ | |||
| #pragma once | ||||
| 
 | ||||
| #include <scwx/qt/gl/gl.hpp> | ||||
| 
 | ||||
| #ifdef _WIN32 | ||||
| #   include <Windows.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <memory> | ||||
| #include <string> | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
| namespace qt | ||||
| { | ||||
| namespace gl | ||||
| { | ||||
| 
 | ||||
| class ShaderProgramImpl; | ||||
| 
 | ||||
| class ShaderProgram | ||||
| { | ||||
| public: | ||||
|    explicit ShaderProgram(OpenGLFunctions& gl); | ||||
|    virtual ~ShaderProgram(); | ||||
| 
 | ||||
|    ShaderProgram(const ShaderProgram&) = delete; | ||||
|    ShaderProgram& operator=(const ShaderProgram&) = delete; | ||||
| 
 | ||||
|    ShaderProgram(ShaderProgram&&) noexcept; | ||||
|    ShaderProgram& operator=(ShaderProgram&&) noexcept; | ||||
| 
 | ||||
|    GLuint id() const; | ||||
| 
 | ||||
|    bool Load(const std::string& vertexPath, const std::string& fragmentPath); | ||||
| 
 | ||||
|    void Use() const; | ||||
| 
 | ||||
| private: | ||||
|    std::unique_ptr<ShaderProgramImpl> p; | ||||
| }; | ||||
| 
 | ||||
| } // namespace gl
 | ||||
| } // namespace qt
 | ||||
| } // namespace scwx
 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat