202
edits
BrettWilson (talk | contribs) (3D API skeleton) |
BrettWilson (talk | contribs) |
||
Line 274: | Line 274: | ||
==== The 3D Device ==== | ==== The 3D Device ==== | ||
There is currently only one configuration option for the 3D device, which is the size of the command buffer. Its likely additional configuration options will be added later. | |||
<pre>typedef struct _NPDeviceContext3DConfig { | |||
int32 commandBufferEntries; | |||
} NPDeviceContext3DConfig; | |||
</pre> | |||
The 3D device is specified as follows: | |||
<pre>typedef struct _NPDeviceContext3D | <pre>typedef struct _NPDeviceContext3D | ||
Line 279: | Line 288: | ||
void* reserved; | void* reserved; | ||
/ | /* Buffer in which commands are stored. */ | ||
void* commandBuffer; | void* commandBuffer; | ||
int32 commandBufferEntries; | int32 commandBufferEntries; | ||
/ | /* Offset in command buffer reader has reached. Synchronized on flush. */ | ||
int32 getOffset; | int32 getOffset; | ||
/ | /* Offset in command buffer writer has reached. Synchronized on flush. */ | ||
int32 putOffset; | int32 putOffset; | ||
} NPDeviceContext3D;</pre> | } NPDeviceContext3D;</pre> | ||
Line 295: | Line 304: | ||
/* The offset the command buffer service has read to. */ | /* The offset the command buffer service has read to. */ | ||
NPDeviceContext3DState_GetOffset, | NPDeviceContext3DState_GetOffset, | ||
/* The offset the plugin instance has written to. */ | /* The offset the plugin instance has written to. */ | ||
NPDeviceContext3DState_PutOffset, | NPDeviceContext3DState_PutOffset, | ||
/* The last token processed by the command buffer service. */ | /* The last token processed by the command buffer service. */ | ||
NPDeviceContext3DState_Token, | NPDeviceContext3DState_Token, | ||
/* The most recent parse error. Getting this value resets the parse error | /* The most recent parse error. Getting this value resets the parse error | ||
if it recoverable. */ | if it recoverable. */ | ||
NPDeviceContext3DState_ParseError, | NPDeviceContext3DState_ParseError, | ||
/* Wether the command buffer has encountered an unrecoverable error. */ | /* Wether the command buffer has encountered an unrecoverable error. */ | ||
NPDeviceContext3DState_ErrorStatus | NPDeviceContext3DState_ErrorStatus | ||
} NPDeviceContext3DState; | } NPDeviceContext3DState;</pre> | ||
</pre> | |||
=== NPP_SetWindow and Windowless Plugins === | === NPP_SetWindow and Windowless Plugins === |
edits