Android update and small improvements
-fixed code do cross compiling to android -fixed build with GCC (workaround) -added little benchmark -several small fixes -updated meson build (demos building, working with GCC, LDC and DMD) -added some meson options -added ImGUI bind for OpenGL3
This commit is contained in:
parent
86edfa4a57
commit
66860b9042
30 changed files with 1358 additions and 173 deletions
|
|
@ -2,8 +2,12 @@ module ecs_utils.gfx.buffer;
|
|||
|
||||
import bubel.ecs.std;
|
||||
|
||||
import glad.gl.gl;
|
||||
import glad.gl.gles2;
|
||||
//import glad.gl.gl;
|
||||
//import glad.gl.gles2;
|
||||
|
||||
version(WebAssembly)import glad.gl.gles2;
|
||||
else version(Android)import glad.gl.gles2;
|
||||
else import glad.gl.gl;
|
||||
|
||||
extern(C):
|
||||
|
||||
|
|
@ -64,13 +68,13 @@ struct Buffer
|
|||
void map(BindTarget target) nothrow
|
||||
{
|
||||
bind(target);
|
||||
data.map_ptr = glMapBuffer(target,GL_WRITE_ONLY);
|
||||
version(Android){}else data.map_ptr = glMapBuffer(target,GL_WRITE_ONLY);
|
||||
}
|
||||
|
||||
void map(uint offset, uint size, BindTarget target, uint flags = MapFlagBits.write | MapFlagBits.flush_explict | MapFlagBits.invalidate_buffer) nothrow
|
||||
{
|
||||
bind(target);
|
||||
data.map_ptr = glMapBufferRange(target,offset,size,flags);
|
||||
version(Android){}else data.map_ptr = glMapBufferRange(target,offset,size,flags);
|
||||
}
|
||||
|
||||
void flush(uint offset, uint size, BindTarget target) nothrow
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue