-
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b47d8d8
commit 38a45d0
Showing
5 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
Backends/Graphics4/G4onG5/Sources/kinc/backend/graphics4/constantbuffer.c.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#ifdef KINC_KONG | ||
|
||
#include <kinc/graphics4/constantbuffer.h> | ||
|
||
void kinc_g4_constant_buffer_init(kinc_g4_constant_buffer *buffer, size_t size) { | ||
kinc_g5_constant_buffer_init(&buffer->impl.buffer, (int)size); | ||
} | ||
|
||
void kinc_g4_constant_buffer_destroy(kinc_g4_constant_buffer *buffer) { | ||
kinc_g5_constant_buffer_destroy(&buffer->impl.buffer); | ||
} | ||
|
||
uint8_t *kinc_g4_constant_buffer_lock_all(kinc_g4_constant_buffer *buffer) { | ||
kinc_g5_constant_buffer_lock_all(&buffer->impl.buffer); | ||
return buffer->impl.buffer.data; | ||
} | ||
|
||
uint8_t *kinc_g4_constant_buffer_lock(kinc_g4_constant_buffer *buffer, size_t start, size_t size) { | ||
kinc_g5_constant_buffer_lock(&buffer->impl.buffer, (int)start, (int)size); | ||
return buffer->impl.buffer.data; | ||
} | ||
|
||
void kinc_g4_constant_buffer_unlock_all(kinc_g4_constant_buffer *buffer) { | ||
kinc_g5_constant_buffer_unlock(&buffer->impl.buffer); | ||
} | ||
|
||
void kinc_g4_constant_buffer_unlock(kinc_g4_constant_buffer *buffer, size_t count) { | ||
kinc_g5_constant_buffer_unlock(&buffer->impl.buffer); | ||
} | ||
|
||
size_t kinc_g4_constant_buffer_size(kinc_g4_constant_buffer *buffer) { | ||
return kinc_g5_constant_buffer_size(&buffer->impl.buffer); | ||
} | ||
|
||
#endif |
11 changes: 11 additions & 0 deletions
11
Backends/Graphics4/G4onG5/Sources/kinc/backend/graphics4/constantbuffer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#pragma once | ||
|
||
#ifdef KINC_KONG | ||
|
||
#include <kinc/graphics5/constantbuffer.h> | ||
|
||
typedef struct kinc_g4_constant_buffer_impl { | ||
kinc_g5_constant_buffer_t buffer; | ||
} kinc_g4_constant_buffer_impl; | ||
|
||
#endif |
1 change: 1 addition & 0 deletions
1
Backends/Graphics4/G4onG5/Sources/kinc/backend/graphics4/g4ong5unit.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters