pinkpitch
路人甲
路人甲
  • 注册日期2003-08-18
  • 发帖数144
  • QQ
  • 铜币474枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1160回复:0

VEGA实用编程手册2

楼主#
更多 发布于:2006-04-04 14:16
<H2 ><FONT face=Tahoma size=6>Vega Common API</FONT></H2>
<P ><FONT size=2><FONT face="Times New Roman">Vega Common Class functions (vgCommon) apply to most Vega Classes ; instances. <p></p></FONT></FONT></P>
<P ><p><FONT face="Times New Roman" size=2> </FONT></p></P>
<H3 ><FONT face=Tahoma size=3>Vega Common Functions</FONT></H3>
<P ><p><FONT face="Times New Roman" size=2> </FONT></p></P>
<P ><FONT size=2><FONT face="Times New Roman">int              vgGetType  (vgCommon *handle);<p></p></FONT></FONT></P>
<P ><p><FONT face="Times New Roman" size=2> </FONT></p></P>
<P ><FONT size=2><FONT face="Times New Roman">void          vgName  (vgCommon *handle, const char *name); <p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">Void vgGetName  (vgCommon *handle, char *str);<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">int              vgGetNameLen  (vgCommon *handle);<p></p></FONT></FONT></P>
<P ><p><FONT face="Times New Roman" size=2> </FONT></p></P>
<P ><FONT size=2><FONT face="Times New Roman">void          vgDelete  (vgCommon *handle);<p></p></FONT></FONT></P>
<P ><p><FONT face="Times New Roman" size=2> </FONT></p></P>
<P ><FONT size=2><FONT face="Times New Roman">void vgUpdate  (vgCommon *handle);<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">         updates a Vega instance<p></p></FONT></FONT></P>
<P ><p><FONT face="Times New Roman" size=2> </FONT></p></P>
<P ><FONT size=2><FONT face="Times New Roman">ERR vgProp (vgCommon *handle, int which, float prop);<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">         sets the property of an instance<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">Float vgGetProp  (vgCommon *handle, int which); <p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">         returns the current property of an instance<p></p></FONT></FONT></P>
<P ><p><FONT face="Times New Roman" size=2> </FONT></p></P>
<P ><FONT size=2><FONT face="Times New Roman">void vgCopy  (vgCommon *dest, vgCommon *src);<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">         copies the source instance to the destination instancevoid        <p></p></FONT></FONT></P>
<P ><p><FONT face="Times New Roman" size=2> </FONT></p></P>
<P ><FONT size=2><FONT face="Times New Roman">vgPrint  (vgCommon *handle);<p></p></FONT></FONT></P>
<P ><p><FONT face="Times New Roman" size=2> </FONT></p></P>
<P ><FONT size=2><FONT face="Times New Roman">void vgUserData  (vgCommon *handle, void *data); <p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">void          *vgGetUserData  (vgCommon *handle);<p></p></FONT></FONT></P>
<P ><p><FONT face="Times New Roman" size=2> </FONT></p></P>
<P ><FONT size=2><FONT face="Times New Roman">void vgWriteADF  (vgCommon *handle, int token, FILE *fp); <p></p></FONT></FONT></P>
<P ><p><FONT face="Times New Roman" size=2> </FONT></p></P>
<P ><FONT size=2><FONT face="Times New Roman">void vgAddFunc  (vgCommon *handle, int which,  vgCallback *func, void *data); <p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">         adds a callback function to a Vega instance<p></p></FONT></FONT></P>
<P ><p><FONT face="Times New Roman" size=2> </FONT></p></P>
<P ><FONT size=2><FONT face="Times New Roman">void vgDelFunc  (vgCommon *handle, int which, vgCallback *func, void *udata); <p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">         removes a callback function from a Vega instance<p></p></FONT></FONT></P>
<H3 ><FONT face=Tahoma size=3>Vega Common Function Callback Events</FONT></H3>
<P ><FONT size=2><FONT face="Times New Roman">VGCOMMON_POS    - called when item is positioned<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGCOMMON_DELETE      - before the item is deleted<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGCOMMON_COPY           - call on dest, item before copy<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGCOMMON_STATE        - call when item state is changed<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGCOMMON_PRINT         - call when class is printed<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGCOMMON_NEW            - call when class is instanced<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGCOMMON_POSTUPDATE  - call after item is updated<p></p></FONT></FONT></P>
<H2 ><FONT face=Tahoma size=6>The Vega System (vgSystems)</FONT></H2>
<P >The Vega System Functions (vgSystems) allow the user to initialize, define, configure, and control the real-time processing of Vega. The target platform is defined by setting values for the number of processors, priorities of the processes, and synchronization algorithms.<p></p></P>
<H3 ><FONT face=Tahoma size=3>Vega System Functions</FONT></H3>
<P ><FONT size=2><FONT face="Times New Roman">vgSystem *vgInitSys(void);<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">         initializes the Vega, creates a shared memory arena, initializes Performer<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">void vgDefineSys (const char * adfname); <p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">         reads the ADF specified<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">void vgCongigSys (void);<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">         makes the associations between the instances<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">void vgSyncFrame (void); <p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">         synchronization and culling<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">void vgFrame (void);<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">         rendering the scene<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">vgSystem *vgGetsys (void); <p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">         retrieves a pointer to the system<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">void vgExit (int); <p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">void vgUserExit (int (*usrexit) (int)); <p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">void vgExitKey (int key);<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">double vgGetTime              (void); <p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">double vgGetRunTime                (void); <p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">double vgGetFrameTime (void);<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">double vgGetDeltaFrameTime (void);<p></p></FONT></FONT></P>
<H3 ><FONT face=Tahoma size=3>A Vega Program</FONT></H3>
<P ><FONT size=2><FONT face="Times New Roman">vgInitSys();<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">vgDefineSys (“my_adf.adf”);<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">vgConfigSys(); <p></p></FONT></FONT></P>
<P ><p><FONT face="Times New Roman" size=2> </FONT></p></P>
<P ><FONT size=2><FONT face="Times New Roman">while (true)<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">{<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">         vgSyncFrame();<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">         vgFrame();<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">}<p></p></FONT></FONT></P>
<H3 ><FONT size=3><FONT face=Tahoma>Vega System </FONT>回调函数</FONT></H3>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_PRESYSNC --called before pfSync<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_POSTSYNC --called after pfSync<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_PROFRAME --called before pfFrame<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_POSTFRAME --called after pfFrame<p></p></FONT></FONT></P>
<H3 ><FONT face=Tahoma size=3>Vega System Properties and Property Values</FONT></H3>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_MPMODE – sets the multiprocessing mode<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_PHASE – specific the synchronize method to use<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_FRAMERATE – frame rate<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_APPCPU – sets the app on a specific CPU<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_APPPRI – set the process priority<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_ISECTPROC – enable/disable async isect process<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_ISECTCPU – sets the intersection target CPU<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_ISECTPRI – sets the intersection priority<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_DBPROC – enable/disable async database process<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_DBCPU – sets the database process target CPU<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_DBPRI – sets the database process priority<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_NUMSTAGES -number of pipeline stages<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_NUMBUFFERS -number of mulitbuffers used<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_CURBUFFEREDID -index of the current buffer<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_GRAPHICS           - enable/disable graphics<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_FPERROR             - enable/disable floating point error detection<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_CONFIGVEGA      - enable/disable configuring Vega from vgConfigSys<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_APPINPUT                    - enable/disable the input during the APP process<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_DISABLE_CLOCKS - all non-system processors have clock interrupts disabled for faster execution<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_PRELOAD_TEX  - enable or disable preloading   of textures         <p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_PRELOAD_PAGETEX- enable/disable preloading of pageable textures<p></p></FONT></FONT></P>
<P ><FONT size=2><FONT face="Times New Roman">VGSYS_TEX_PAGESIZE  - number of bytes to download per frame when loading pagable textures    <p></p></FONT></FONT></P>VGSYS_SORT_TEX           - sort textures by number of components
喜欢0 评分0
游客

返回顶部