My Project
Static Public Member Functions | List of all members
ParaScripting::CParaEngine Class Reference

global game engine related functions, such as ParaEngineCore interface, copy right information, simple water marking More...

#include <ParaScriptingMisc.h>

Static Public Member Functions

static ParaAttributeObject GetAttributeObject ()
 get the attribute object of ParaEngine settings
 
static void GetAttributeObject_ (ParaAttributeObject &output)
 for API exportation. More...
 
static string GetVersion ()
 get ParaEngine version
 
static ParaAttributeObject GetViewportAttributeObject (int nViewportIndex)
 get attribute object
 
static bool ForceRender ()
 render the current frame and does not return until everything is presented to screen. More...
 
static bool Sleep (float fSeconds)
 cause the main thread to sleep for the specified seconds. More...
 
static bool SaveParaXMesh (const char *filename, ParaAssetObject &xmesh, bool bBinaryEncoding)
 save an existing mesh to file. More...
 
static ParaAssetObject GetRenderTarget ()
 return the current render target. More...
 
static bool SetRenderTarget (ParaAssetObject &pRenderTarget)
 set the render target of the object. More...
 
static bool SetRenderTarget2 (int nIndex, const char *render_targetname)
 
static bool StretchRect (ParaAssetObject &pSrcRenderTarget, ParaAssetObject &pDestRenderTarget)
 Copy render target content from one surface to another. More...
 
static bool DrawQuad ()
 draw a full screen quad. More...
 
static bool SetVertexDeclaration (int nIndex)
 Set declaration by id enum VERTEX_DECLARATION { S0_POS_TEX0, // all data in stream 0: position and tex0 S0_POS_NORM_TEX0, // all data in stream 0: position, normal and tex0 S0_POS_NORM_TEX0_INSTANCED, // all data in stream 0: position, normal and tex0, stream1:instanced data S0_POS_TEX0_COLOR, // all data in stream 0: position, tex0 and color S0_S1_S2_OCEAN_FFT, // for FFT ocean S0_S1_S2_S3_OCEAN_FFT, // for FFT ocean with terrain height field S0_POS_NORM_TEX0_TEX1, // all data in stream 0: position, normal tex0 and tex1 MAX_DECLARATIONS_NUM, };. More...
 

Detailed Description

global game engine related functions, such as ParaEngineCore interface, copy right information, simple water marking

Member Function Documentation

§ DrawQuad()

bool ParaScripting::CParaEngine::DrawQuad ( )
static

draw a full screen quad.

Note
: one need to set the vertex declaration to be S0_POS_TEX0 prior to calling this function

§ ForceRender()

bool ParaScripting::CParaEngine::ForceRender ( )
static

render the current frame and does not return until everything is presented to screen.

this function is usually used to draw the animated loading screen.

§ GetAttributeObject_()

void ParaScripting::CParaEngine::GetAttributeObject_ ( ParaAttributeObject output)
static

for API exportation.

§ GetRenderTarget()

ParaAssetObject ParaScripting::CParaEngine::GetRenderTarget ( )
static

return the current render target.

calling this function a second time will make the returned object from the previous call invalid.

§ SaveParaXMesh()

bool ParaScripting::CParaEngine::SaveParaXMesh ( const char *  filename,
ParaAssetObject xmesh,
bool  bBinaryEncoding 
)
static

save an existing mesh to file.

Parameters
filenamefile to be saved to. if this is "", the xmesh entity's file name will be used and appended with ".x"
xmeshParaX mesh object to export.
bBinaryEncodingtrue to use binary encoding.
Returns
: return true if succeeds.

§ SetRenderTarget()

bool ParaScripting::CParaEngine::SetRenderTarget ( ParaAssetObject pRenderTarget)
static

set the render target of the object.

§ SetVertexDeclaration()

bool ParaScripting::CParaEngine::SetVertexDeclaration ( int  nIndex)
static

Set declaration by id enum VERTEX_DECLARATION { S0_POS_TEX0, // all data in stream 0: position and tex0 S0_POS_NORM_TEX0, // all data in stream 0: position, normal and tex0 S0_POS_NORM_TEX0_INSTANCED, // all data in stream 0: position, normal and tex0, stream1:instanced data S0_POS_TEX0_COLOR, // all data in stream 0: position, tex0 and color S0_S1_S2_OCEAN_FFT, // for FFT ocean S0_S1_S2_S3_OCEAN_FFT, // for FFT ocean with terrain height field S0_POS_NORM_TEX0_TEX1, // all data in stream 0: position, normal tex0 and tex1 MAX_DECLARATIONS_NUM, };.

Parameters
nIndexvalue is in
See also
VERTEX_DECLARATION
Returns
: return true if successful.

§ Sleep()

bool ParaScripting::CParaEngine::Sleep ( float  fSeconds)
static

cause the main thread to sleep for the specified seconds.

§ StretchRect()

bool ParaScripting::CParaEngine::StretchRect ( ParaAssetObject pSrcRenderTarget,
ParaAssetObject pDestRenderTarget 
)
static

Copy render target content from one surface to another.

they may be of different resolution


The documentation for this class was generated from the following files: