Buffer::Buffer(BufferType t):
type(t),
- usage(STATIC_DRAW),
size(0)
{
require_buffer_type(type);
}
}
-void Buffer::set_usage(BufferUsage u)
+void Buffer::set_usage(BufferUsage)
{
- // TODO OpenGL ES 2.0 doesn't support read or copy usages
- usage = u;
}
void Buffer::data(const void *d)
return sub_data(0, size, d);
if(ARB_direct_state_access)
- glNamedBufferData(id, size, d, usage);
+ glNamedBufferData(id, size, d, STATIC_DRAW);
else
{
BindRestore _bind(this, type);
- glBufferData(type, size, d, usage);
+ glBufferData(type, size, d, STATIC_DRAW);
}
}