KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KIGFX::GPU_NONCACHED_MANAGER Class Reference

#include <gpu_manager.h>

Inheritance diagram for KIGFX::GPU_NONCACHED_MANAGER:
KIGFX::GPU_MANAGER

Public Member Functions

 GPU_NONCACHED_MANAGER (VERTEX_CONTAINER *aContainer)
 Prepare the stored data to be drawn.
 
virtual void BeginDrawing () override
 Make the GPU draw given range of vertices.
 
virtual void DrawIndices (const VERTEX_ITEM *aItem) override
 Clear the container after drawing routines.
 
virtual void EndDrawing () override
 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_MANAGERMakeManager (VERTEX_CONTAINER *aContainer)
 

Protected Attributes

bool m_isDrawing
 Container that stores vertices data.
 
VERTEX_CONTAINERm_container
 Shader handling.
 
SHADERm_shader
 Location of shader attributes (for glVertexAttribPointer)
 
int m_shaderAttrib
 true: enable Z test when drawing
 
bool m_enableDepthTest
 

Detailed Description

Definition at line 169 of file gpu_manager.h.

Constructor & Destructor Documentation

◆ GPU_NONCACHED_MANAGER()

GPU_NONCACHED_MANAGER::GPU_NONCACHED_MANAGER ( VERTEX_CONTAINER aContainer)

Prepare the stored data to be drawn.

Definition at line 258 of file gpu_manager.cpp.

Member Function Documentation

◆ BeginDrawing()

void GPU_NONCACHED_MANAGER::BeginDrawing ( )
overridevirtual

Make the GPU draw given range of vertices.

Parameters
aOffsetis the beginning of the range.
aSizeis the number of vertices to be drawn.

Implements KIGFX::GPU_MANAGER.

Definition at line 264 of file gpu_manager.cpp.

◆ DrawIndices()

void GPU_NONCACHED_MANAGER::DrawIndices ( const VERTEX_ITEM aItem)
overridevirtual

Clear the container after drawing routines.

Implements KIGFX::GPU_MANAGER.

Definition at line 270 of file gpu_manager.cpp.

◆ EnableDepthTest()

void GPU_MANAGER::EnableDepthTest ( bool  aEnabled)
inherited

Enable/disable Z buffer depth test.

Definition at line 336 of file gpu_manager.cpp.

References KIGFX::GPU_MANAGER::m_enableDepthTest.

◆ EndDrawing()

◆ MakeManager()

GPU_MANAGER * GPU_MANAGER::MakeManager ( VERTEX_CONTAINER aContainer)
staticinherited

◆ SetShader()

void GPU_MANAGER::SetShader ( SHADER aShader)
virtualinherited

Allow using shaders with the stored data.

Parameters
aShaderis the object that allows using shaders.

Definition at line 72 of file gpu_manager.cpp.

References DisplayError(), KIGFX::SHADER::GetAttribute(), KIGFX::GPU_MANAGER::m_shader, and KIGFX::GPU_MANAGER::m_shaderAttrib.

Member Data Documentation

◆ m_container

VERTEX_CONTAINER* KIGFX::GPU_MANAGER::m_container
protectedinherited

Shader handling.

Definition at line 89 of file gpu_manager.h.

Referenced by KIGFX::GPU_CACHED_MANAGER::EndDrawing(), and EndDrawing().

◆ m_enableDepthTest

bool KIGFX::GPU_MANAGER::m_enableDepthTest
protectedinherited

◆ m_isDrawing

bool KIGFX::GPU_MANAGER::m_isDrawing
protectedinherited

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(), and KIGFX::GPU_CACHED_MANAGER::EndDrawing().

◆ m_shader

SHADER* KIGFX::GPU_MANAGER::m_shader
protectedinherited

Location of shader attributes (for glVertexAttribPointer)

Definition at line 92 of file gpu_manager.h.

Referenced by KIGFX::GPU_CACHED_MANAGER::EndDrawing(), EndDrawing(), and KIGFX::GPU_MANAGER::SetShader().

◆ m_shaderAttrib

int KIGFX::GPU_MANAGER::m_shaderAttrib
protectedinherited

true: enable Z test when drawing

Definition at line 95 of file gpu_manager.h.

Referenced by KIGFX::GPU_CACHED_MANAGER::EndDrawing(), EndDrawing(), and KIGFX::GPU_MANAGER::SetShader().


The documentation for this class was generated from the following files: