| 
    KiCad PCB EDA Suite
    
   | 
 
Class to handle uploading vertices and indices to GPU in drawing purposes. More...
#include <gpu_manager.h>
  
Public Member Functions | |
| virtual | ~GPU_MANAGER () | 
| virtual void | BeginDrawing ()=0 | 
| Prepare the stored data to be drawn.   | |
| virtual void | DrawIndices (const VERTEX_ITEM *aItem)=0 | 
| Make the GPU draw given range of vertices.   | |
| virtual void | EndDrawing ()=0 | 
| Clear the container after drawing routines.   | |
| virtual void | SetShader (SHADER &aShader) | 
| Allow using shaders with the stored data.   | |
| void | EnableDepthTest (bool aEnabled) | 
| Enable/disable Z buffer depth test.   | |
Static Public Member Functions | |
| static GPU_MANAGER * | MakeManager (VERTEX_CONTAINER *aContainer) | 
Protected Member Functions | |
| GPU_MANAGER (VERTEX_CONTAINER *aContainer) | |
| Drawing status flag.   | |
Protected Attributes | |
| bool | m_isDrawing | 
| Container that stores vertices data.   | |
| VERTEX_CONTAINER * | m_container | 
| Shader handling.   | |
| SHADER * | m_shader | 
| Location of shader attributes (for glVertexAttribPointer)   | |
| int | m_shaderAttrib | 
| true: enable Z test when drawing   | |
| bool | m_enableDepthTest | 
Class to handle uploading vertices and indices to GPU in drawing purposes.
Definition at line 45 of file gpu_manager.h.
      
  | 
  virtual | 
Definition at line 67 of file gpu_manager.cpp.
      
  | 
  protected | 
Drawing status flag.
Definition at line 57 of file gpu_manager.cpp.
References m_container, m_enableDepthTest, m_isDrawing, m_shader, and m_shaderAttrib.
Referenced by KIGFX::GPU_CACHED_MANAGER::GPU_CACHED_MANAGER(), KIGFX::GPU_NONCACHED_MANAGER::GPU_NONCACHED_MANAGER(), and MakeManager().
      
  | 
  pure virtual | 
Prepare the stored data to be drawn.
Implemented in KIGFX::GPU_CACHED_MANAGER, and KIGFX::GPU_NONCACHED_MANAGER.
      
  | 
  pure virtual | 
Make the GPU draw given range of vertices.
| aOffset | is the beginning of the range. | 
| aSize | is the number of vertices to be drawn. | 
Implemented in KIGFX::GPU_CACHED_MANAGER, and KIGFX::GPU_NONCACHED_MANAGER.
| void GPU_MANAGER::EnableDepthTest | ( | bool | aEnabled | ) | 
Enable/disable Z buffer depth test.
Definition at line 337 of file gpu_manager.cpp.
References m_enableDepthTest.
      
  | 
  pure virtual | 
Clear the container after drawing routines.
Implemented in KIGFX::GPU_CACHED_MANAGER, and KIGFX::GPU_NONCACHED_MANAGER.
      
  | 
  static | 
Definition at line 48 of file gpu_manager.cpp.
References GPU_MANAGER(), and KIGFX::VERTEX_CONTAINER::IsCached().
Referenced by KIGFX::VERTEX_MANAGER::VERTEX_MANAGER().
      
  | 
  virtual | 
Allow using shaders with the stored data.
| aShader | is the object that allows using shaders. | 
Definition at line 72 of file gpu_manager.cpp.
References DisplayError(), m_shader, and m_shaderAttrib.
      
  | 
  protected | 
Shader handling.
Definition at line 89 of file gpu_manager.h.
Referenced by KIGFX::GPU_CACHED_MANAGER::EndDrawing(), KIGFX::GPU_NONCACHED_MANAGER::EndDrawing(), and GPU_MANAGER().
      
  | 
  protected | 
Definition at line 98 of file gpu_manager.h.
Referenced by EnableDepthTest(), KIGFX::GPU_CACHED_MANAGER::EndDrawing(), KIGFX::GPU_NONCACHED_MANAGER::EndDrawing(), and GPU_MANAGER().
      
  | 
  protected | 
Container that stores vertices data.
Definition at line 86 of file gpu_manager.h.
Referenced by KIGFX::GPU_CACHED_MANAGER::BeginDrawing(), KIGFX::GPU_CACHED_MANAGER::DrawIndices(), KIGFX::GPU_CACHED_MANAGER::EndDrawing(), and GPU_MANAGER().
      
  | 
  protected | 
Location of shader attributes (for glVertexAttribPointer)
Definition at line 92 of file gpu_manager.h.
Referenced by KIGFX::GPU_CACHED_MANAGER::EndDrawing(), KIGFX::GPU_NONCACHED_MANAGER::EndDrawing(), GPU_MANAGER(), and SetShader().
      
  | 
  protected | 
true: enable Z test when drawing
Definition at line 95 of file gpu_manager.h.
Referenced by KIGFX::GPU_CACHED_MANAGER::EndDrawing(), KIGFX::GPU_NONCACHED_MANAGER::EndDrawing(), GPU_MANAGER(), and SetShader().