glBindBuffer(GL_ARRAY_BUFFER, mesh.vertex_handle);
glBufferData(GL_ARRAY_BUFFER, sizeof T * verticies.count, verticies.data, gl_hint);
+ type_info :: package runtime.info
vertex_info := cast(^type_info.Type_Info_Struct) type_info.get_type_info(T);
vertex_attr := 0;
for attr: vertex_info.members {
}
shader_block_create :: (T: type_expr) -> Shader_Block {
+ type_info :: package runtime.info
+
// This is 2 beacuse the window and world matrix blocks are
// not allocated using this procedure.
#persist next_block_id := 2;
}
shader_block_update :: (s: ^Shader_Block, field: str, value: $T) {
+ type_info :: package runtime.info
+
glBindBuffer(GL_UNIFORM_BUFFER, s.block_buffer);
defer glBindBuffer(GL_UNIFORM_BUFFER, -1);
#local state_stack: [..] State;
push_game_state :: (state: type_expr, data: rawptr) -> ^State {
+ type_info :: package runtime.info
+
s := array.alloc_one(^state_stack);
*s = .{ data };
}
register_handles :: () {
- use type_info;
+ use package runtime.info;
for_all_types() {
if struct_inherits(type_idx, Packet_Handler) {