create generic buffer template

This commit is contained in:
j3d1 2018-11-05 21:49:40 +01:00
parent bfef6fdc1e
commit f3037a06ce
7 changed files with 70 additions and 70 deletions

17
src/gfx/buffer.cpp Normal file
View 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;
}

View file

@ -1,5 +0,0 @@
//
// Created by jedi on 11/2/18.
//
#include "gfx/buffer_1.h"