usage.c

Go to the documentation of this file.
00001 /* surface / context tracking */
00002 
00003 
00004 /*
00005 
00006 context A:
00007   render to texture T
00008 
00009 context B:
00010   texture from T
00011 
00012 -----------------------
00013 
00014 flush surface:
00015   which contexts are bound to the surface?
00016 
00017 -----------------------
00018 
00019 glTexSubImage():
00020   which contexts need to be flushed?
00021 
00022  */
00023 
00024 
00025 /*
00026 
00027 in MakeCurrent():
00028 
00029   call sct_bind_surfaces(context, list of surfaces) to update the
00030   dependencies between context and surfaces
00031 
00032 
00033 in SurfaceFlush(), or whatever it is in D3D:
00034 
00035   call sct_get_surface_contexts(surface) to get a list of contexts
00036   which are currently bound to the surface.
00037 
00038 
00039 
00040 in BindTexture():
00041 
00042   call sct_bind_texture(context, texture) to indicate that the texture
00043   is used in the scene.
00044 
00045 
00046 in glTexSubImage() or RenderToTexture():
00047 
00048   call sct_is_texture_used(context, texture) to determine if the texture
00049   has been used in the scene, but the scene's not flushed.  If TRUE is
00050   returned it means the scene has to be rendered/flushed before the contents
00051   of the texture can be changed.
00052 
00053 
00054 in psb_scene_flush/terminate():
00055 
00056   call sct_flush_textures(context) to tell the SCT that the textures which
00057   were used in the scene can be released.
00058 
00059 
00060 
00061 */

Generated on Tue Sep 29 06:25:14 2009 for Gallium3D by  doxygen 1.5.4