Botcraft 26.3
Loading...
Searching...
No Matches
Botcraft::Renderer::TransparentChunk Class Reference

#include <TransparentChunk.hpp>

Inheritance diagram for Botcraft::Renderer::TransparentChunk:
Botcraft::Renderer::BlockRenderable

Public Member Functions

 TransparentChunk ()
 
 ~TransparentChunk ()
 
void MarkForSort ()
 
void Sort (const glm::vec3 &cam_pos)
 
- Public Member Functions inherited from Botcraft::Renderer::BlockRenderable
 BlockRenderable ()
 
virtual ~BlockRenderable ()
 
 BlockRenderable (const BlockRenderable &)=delete
 
BlockRenderable & operator= (const BlockRenderable &)=delete
 
void SetFaces (std::vector< Face > &&faces_)
 
void Update ()
 
void ClearFaces ()
 
const unsigned int GetNumFace () const
 
void Render () const
 

Protected Member Functions

void OnUploadedLocked () override
 
- Protected Member Functions inherited from Botcraft::Renderer::BlockRenderable
void GenerateOpenGLBuffer ()
 
void DeleteOpenGLBuffer ()
 

Protected Attributes

std::vector< Face > display_faces_positions
 
std::atomic< bool > needs_sort
 
- Protected Attributes inherited from Botcraft::Renderer::BlockRenderable
unsigned int faces_VAO
 
unsigned int faces_VBO
 
unsigned int data_VBO
 
unsigned int face_number
 
std::vector< Face > faces
 
bool dirty
 
std::mutex mutex_faces
 

Detailed Description

Definition at line 14 of file TransparentChunk.hpp.

Constructor & Destructor Documentation

◆ TransparentChunk()

Botcraft::Renderer::TransparentChunk::TransparentChunk ( )

Definition at line 28 of file TransparentChunk.cpp.

References needs_sort.

◆ ~TransparentChunk()

Botcraft::Renderer::TransparentChunk::~TransparentChunk ( )

Definition at line 33 of file TransparentChunk.cpp.

Member Function Documentation

◆ MarkForSort()

void Botcraft::Renderer::TransparentChunk::MarkForSort ( )

Definition at line 38 of file TransparentChunk.cpp.

References needs_sort.

◆ OnUploadedLocked()

void Botcraft::Renderer::TransparentChunk::OnUploadedLocked ( )
overrideprotectedvirtual

◆ Sort()

void Botcraft::Renderer::TransparentChunk::Sort ( const glm::vec3 &  cam_pos)

Member Data Documentation

◆ display_faces_positions

std::vector<Face> Botcraft::Renderer::TransparentChunk::display_faces_positions
protected

Definition at line 27 of file TransparentChunk.hpp.

Referenced by OnUploadedLocked(), and Sort().

◆ needs_sort

std::atomic<bool> Botcraft::Renderer::TransparentChunk::needs_sort
protected

Definition at line 28 of file TransparentChunk.hpp.

Referenced by MarkForSort(), OnUploadedLocked(), Sort(), and TransparentChunk().


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