VOX
A little voxel engine
Loading...
Searching...
No Matches
RenderAPI Class Reference

#include <RenderAPI.hpp>

Collaboration diagram for RenderAPI:
Collaboration graph

Classes

struct  ChunkMeshCreateInfo
 

Public Types

typedef uint32_t InstanceId
 

Public Member Functions

 RenderAPI (GLFWwindow *window)
 
 ~RenderAPI ()
 
 RenderAPI (const RenderAPI &)=delete
 
 RenderAPI (RenderAPI &&)=delete
 
RenderAPIoperator= (const RenderAPI &)=delete
 
RenderAPIoperator= (RenderAPI &&)=delete
 
void renderFrame ()
 
void setCamera (const Camera &camera)
 
void toggleDebugText ()
 
void setTargetBlock (const std::optional< glm::vec3 > &target_block)
 
void addPlayer (const uint64_t id, const PlayerRenderData &player_data)
 
void removePlayer (const uint64_t id)
 
void updatePlayer (const uint64_t id, std::function< void(PlayerRenderData &)> fct)
 
void addEntity (const uint64_t id, const MeshRenderData &entity_data)
 
void removeEntity (const uint64_t id)
 
void updateEntity (const uint64_t id, std::function< void(MeshRenderData &)> fct)
 
void setToolbarItem (const int index, const ItemInfo::Type type)
 
void setToolbarCursor (const int index)
 
InstanceId addChunkToScene (const ChunkMeshCreateInfo &mesh_info)
 
void removeChunkFromScene (const uint64_t chunk_id)
 
uint64_t storeMesh (const void *vertices, const uint32_t vertex_count, const uint32_t vertex_size, const void *indices, const uint32_t index_count)
 
void destroyMesh (const uint64_t &mesh_id)
 
uint64_t getCubeMeshId () const
 
uint64_t createImGuiTexture (const uint32_t width, const uint32_t height)
 
void ImGuiTexturePutPixel (const uint64_t texture_id, const uint32_t x, const uint32_t y, const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t a=255)
 
void ImGuiTextureClear (const uint64_t texture_id)
 
void ImGuiTextureDraw (const uint64_t texture_id)
 

Member Typedef Documentation

◆ InstanceId

typedef uint32_t RenderAPI::InstanceId

Constructor & Destructor Documentation

◆ RenderAPI() [1/3]

RenderAPI::RenderAPI ( GLFWwindow *  window)

◆ ~RenderAPI()

RenderAPI::~RenderAPI ( )

◆ RenderAPI() [2/3]

RenderAPI::RenderAPI ( const RenderAPI )
delete

◆ RenderAPI() [3/3]

RenderAPI::RenderAPI ( RenderAPI &&  )
delete

Member Function Documentation

◆ addChunkToScene()

RenderAPI::InstanceId RenderAPI::addChunkToScene ( const ChunkMeshCreateInfo mesh_info)

◆ addEntity()

void RenderAPI::addEntity ( const uint64_t  id,
const MeshRenderData entity_data 
)

◆ addPlayer()

void RenderAPI::addPlayer ( const uint64_t  id,
const PlayerRenderData player_data 
)

◆ createImGuiTexture()

uint64_t RenderAPI::createImGuiTexture ( const uint32_t  width,
const uint32_t  height 
)

◆ destroyMesh()

void RenderAPI::destroyMesh ( const uint64_t &  mesh_id)

◆ getCubeMeshId()

uint64_t RenderAPI::getCubeMeshId ( ) const
inline

◆ ImGuiTextureClear()

void RenderAPI::ImGuiTextureClear ( const uint64_t  texture_id)

◆ ImGuiTextureDraw()

void RenderAPI::ImGuiTextureDraw ( const uint64_t  texture_id)

◆ ImGuiTexturePutPixel()

void RenderAPI::ImGuiTexturePutPixel ( const uint64_t  texture_id,
const uint32_t  x,
const uint32_t  y,
const uint8_t  r,
const uint8_t  g,
const uint8_t  b,
const uint8_t  a = 255 
)

◆ operator=() [1/2]

RenderAPI & RenderAPI::operator= ( const RenderAPI )
delete

◆ operator=() [2/2]

RenderAPI & RenderAPI::operator= ( RenderAPI &&  )
delete

◆ removeChunkFromScene()

void RenderAPI::removeChunkFromScene ( const uint64_t  chunk_id)

◆ removeEntity()

void RenderAPI::removeEntity ( const uint64_t  id)

◆ removePlayer()

void RenderAPI::removePlayer ( const uint64_t  id)

◆ renderFrame()

void RenderAPI::renderFrame ( )

◆ setCamera()

void RenderAPI::setCamera ( const Camera camera)

◆ setTargetBlock()

void RenderAPI::setTargetBlock ( const std::optional< glm::vec3 > &  target_block)

◆ setToolbarCursor()

void RenderAPI::setToolbarCursor ( const int  index)

◆ setToolbarItem()

void RenderAPI::setToolbarItem ( const int  index,
const ItemInfo::Type  type 
)

◆ storeMesh()

uint64_t RenderAPI::storeMesh ( const void *  vertices,
const uint32_t  vertex_count,
const uint32_t  vertex_size,
const void *  indices,
const uint32_t  index_count 
)

◆ toggleDebugText()

void RenderAPI::toggleDebugText ( )

◆ updateEntity()

void RenderAPI::updateEntity ( const uint64_t  id,
std::function< void(MeshRenderData &)>  fct 
)

◆ updatePlayer()

void RenderAPI::updatePlayer ( const uint64_t  id,
std::function< void(PlayerRenderData &)>  fct 
)

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