This commit is contained in:
Attila Uygun 2023-11-06 12:55:22 +01:00
parent 214ae33246
commit 14958d00ff
5 changed files with 15 additions and 15 deletions

View File

@ -185,8 +185,8 @@ void RendererOpenGL::DestroyGeometry(uint64_t resource_id) {
}
void RendererOpenGL::Draw(uint64_t resource_id,
uint64_t num_indices,
uint64_t start_offset) {
size_t num_indices,
size_t start_offset) {
auto it = geometries_.find(resource_id);
if (it == geometries_.end())
return;
@ -321,7 +321,7 @@ void RendererOpenGL::DestroyTexture(uint64_t resource_id) {
}
void RendererOpenGL::ActivateTexture(uint64_t resource_id,
uint64_t texture_unit) {
size_t texture_unit) {
if (texture_unit >= kMaxTextureUnits) {
DLOG(0) << "Invalid texture unit " << texture_unit;
return;

View File

@ -50,8 +50,8 @@ class RendererOpenGL final : public Renderer {
void DestroyGeometry(uint64_t resource_id) final;
void Draw(uint64_t resource_id,
uint64_t num_indices = 0,
uint64_t start_offset = 0) final;
size_t num_indices = 0,
size_t start_offset = 0) final;
uint64_t CreateTexture() final;
void UpdateTexture(uint64_t resource_id, std::unique_ptr<Image> image) final;
@ -62,7 +62,7 @@ class RendererOpenGL final : public Renderer {
size_t data_size,
uint8_t* image_data) final;
void DestroyTexture(uint64_t resource_id) final;
void ActivateTexture(uint64_t resource_id, uint64_t texture_unit) final;
void ActivateTexture(uint64_t resource_id, size_t texture_unit) final;
uint64_t CreateShader(std::unique_ptr<ShaderSource> source,
const VertexDescription& vertex_description,

View File

@ -57,8 +57,8 @@ class Renderer {
const void* indices) = 0;
virtual void DestroyGeometry(uint64_t resource_id) = 0;
virtual void Draw(uint64_t resource_id,
uint64_t num_indices = 0,
uint64_t start_offset = 0) = 0;
size_t num_indices = 0,
size_t start_offset = 0) = 0;
virtual uint64_t CreateTexture() = 0;
virtual void UpdateTexture(uint64_t resource_id,
@ -70,7 +70,7 @@ class Renderer {
size_t data_size,
uint8_t* image_data) = 0;
virtual void DestroyTexture(uint64_t resource_id) = 0;
virtual void ActivateTexture(uint64_t resource_id, uint64_t texture_unit) = 0;
virtual void ActivateTexture(uint64_t resource_id, size_t texture_unit) = 0;
virtual uint64_t CreateShader(std::unique_ptr<ShaderSource> source,
const VertexDescription& vertex_description,

View File

@ -525,8 +525,8 @@ void RendererVulkan::DestroyGeometry(uint64_t resource_id) {
}
void RendererVulkan::Draw(uint64_t resource_id,
uint64_t num_indices,
uint64_t start_offset) {
size_t num_indices,
size_t start_offset) {
auto it = geometries_.find(resource_id);
if (it == geometries_.end())
return;
@ -629,7 +629,7 @@ void RendererVulkan::DestroyTexture(uint64_t resource_id) {
}
void RendererVulkan::ActivateTexture(uint64_t resource_id,
uint64_t texture_unit) {
size_t texture_unit) {
auto it = textures_.find(resource_id);
if (it == textures_.end())
return;

View File

@ -50,8 +50,8 @@ class RendererVulkan final : public Renderer {
const void* indices) final;
void DestroyGeometry(uint64_t resource_id) final;
void Draw(uint64_t resource_id,
uint64_t num_indices = 0,
uint64_t start_offset = 0) final;
size_t num_indices = 0,
size_t start_offset = 0) final;
uint64_t CreateTexture() final;
void UpdateTexture(uint64_t resource_id, std::unique_ptr<Image> image) final;
@ -62,7 +62,7 @@ class RendererVulkan final : public Renderer {
size_t data_size,
uint8_t* image_data) final;
void DestroyTexture(uint64_t resource_id) final;
void ActivateTexture(uint64_t resource_id, uint64_t texture_unit) final;
void ActivateTexture(uint64_t resource_id, size_t texture_unit) final;
uint64_t CreateShader(std::unique_ptr<ShaderSource> source,
const VertexDescription& vertex_description,