-static GLuint world_get_texture( world_instance *world, u32 id ){
- if( id & 0x80000000 )
- return skaterift.rt_textures[id & ~0x80000000];
- else
- return world->textures[ id ];
-}
-
-static void bindpoint_diffuse_texture1( world_instance *world,
- struct world_surface *mat ){
- glActiveTexture( GL_TEXTURE1 );
- glBindTexture( GL_TEXTURE_2D,
- world_get_texture(world,mat->info.tex_diffuse) );
-}
-
-static void bindpoint_diffuse1_and_cubemap10( world_instance *world,
- struct world_surface *mat ){
- glActiveTexture( GL_TEXTURE1 );
- glBindTexture( GL_TEXTURE_2D,
- world_get_texture(world,mat->info.tex_diffuse) );
-
- u32 cubemap_id = mat->info.tex_none0,
- cubemap_index = 0;
-
- if( mdl_entity_id_type( cubemap_id ) == k_ent_cubemap ){
- cubemap_index = mdl_entity_id_id( cubemap_id );
- }
-
- ent_cubemap *cm = mdl_arritm( &world->ent_cubemap, cubemap_index );
- glActiveTexture( GL_TEXTURE10 );
- glBindTexture( GL_TEXTURE_CUBE_MAP, cm->texture_id );
-
- shader_scene_cubemapped_uColour( mat->info.colour );
-}
-