create generic buffer template
This commit is contained in:
parent
bfef6fdc1e
commit
f3037a06ce
7 changed files with 70 additions and 70 deletions
17
src/gfx/buffer.cpp
Normal file
17
src/gfx/buffer.cpp
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
//
|
||||
// Created by jedi on 11/2/18.
|
||||
//
|
||||
|
||||
#include "gfx/buffer.h"
|
||||
|
||||
template <>
|
||||
int buffer<_32bit>::get(int i){
|
||||
if (i >= size_) return 0;
|
||||
return ptr_[i];
|
||||
}
|
||||
|
||||
template <>
|
||||
void buffer<_32bit>::set(int i, int v) {
|
||||
if (i < size_)
|
||||
ptr_[i] = v;
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
//
|
||||
// Created by jedi on 11/2/18.
|
||||
//
|
||||
|
||||
#include "gfx/buffer_1.h"
|
||||
Loading…
Add table
Add a link
Reference in a new issue