Forge

Functions

FGAPI fg_err fg_create_surface (fg_surface *pSurface, const unsigned pXPoints, const unsigned pYPoints, const fg_dtype pType, const fg_plot_type pPlotType, const fg_marker_type pMarkerType)
 Create a Surface object. More...
 
FGAPI fg_err fg_destroy_surface (fg_surface pSurface)
 Destroy surface object. More...
 
FGAPI fg_err fg_set_surface_color (fg_surface pSurface, const float pRed, const float pGreen, const float pBlue, const float pAlpha)
 Set the color of surface. More...
 
FGAPI fg_err fg_set_surface_legend (fg_surface pSurface, const char *pLegend)
 Set surface legend. More...
 
FGAPI fg_err fg_get_surface_vertex_buffer (unsigned *pOut, const fg_surface pSurface)
 Get the resource identifier for vertices buffer. More...
 
FGAPI fg_err fg_get_surface_color_buffer (unsigned *pOut, const fg_surface pSurface)
 Get the resource identifier for colors buffer. More...
 
FGAPI fg_err fg_get_surface_alpha_buffer (unsigned *pOut, const fg_surface pSurface)
 Get the resource identifier for alpha values buffer. More...
 
FGAPI fg_err fg_get_surface_vertex_buffer_size (unsigned *pOut, const fg_surface pSurface)
 Get the vertices buffer size in bytes. More...
 
FGAPI fg_err fg_get_surface_color_buffer_size (unsigned *pOut, const fg_surface pSurface)
 Get the colors buffer size in bytes. More...
 
FGAPI fg_err fg_get_surface_alpha_buffer_size (unsigned *pOut, const fg_surface pSurface)
 Get the alpha values buffer size in bytes. More...
 

Detailed Description

Function Documentation

§ fg_create_surface()

FGAPI fg_err fg_create_surface ( fg_surface pSurface,
const unsigned  pXPoints,
const unsigned  pYPoints,
const fg_dtype  pType,
const fg_plot_type  pPlotType,
const fg_marker_type  pMarkerType 
)

Create a Surface object.

Parameters
[out]pSurfacewill be set to surface handle upon creating the surface object
[in]pXPointsis number of data points along X dimension
[in]pYPointsis number of data points along Y dimension
[in]pTypetakes one of the values of fg_dtype that indicates the integral data type of surface data
[in]pPlotTypedictates the type of surface/graph, it can take one of the values of fg_plot_type
[in]pMarkerTypeindicates which symbol is rendered as marker. It can take one of the values of fg_marker_type.
Returns
fg_err error code

§ fg_destroy_surface()

FGAPI fg_err fg_destroy_surface ( fg_surface  pSurface)

Destroy surface object.

Parameters
[in]pSurfaceis the surface handle
Returns
fg_err error code

§ fg_get_surface_alpha_buffer()

FGAPI fg_err fg_get_surface_alpha_buffer ( unsigned *  pOut,
const fg_surface  pSurface 
)

Get the resource identifier for alpha values buffer.

Parameters
[out]pOutwill have the buffer identifier after this function is called
[in]pSurfaceis the surface handle
Returns
fg_err error code

§ fg_get_surface_alpha_buffer_size()

FGAPI fg_err fg_get_surface_alpha_buffer_size ( unsigned *  pOut,
const fg_surface  pSurface 
)

Get the alpha values buffer size in bytes.

Parameters
[out]pOutwill have the buffer size in bytes after this function is called
[in]pSurfaceis the surface handle
Returns
fg_err error code

§ fg_get_surface_color_buffer()

FGAPI fg_err fg_get_surface_color_buffer ( unsigned *  pOut,
const fg_surface  pSurface 
)

Get the resource identifier for colors buffer.

Parameters
[out]pOutwill have the buffer identifier after this function is called
[in]pSurfaceis the surface handle
Returns
fg_err error code

§ fg_get_surface_color_buffer_size()

FGAPI fg_err fg_get_surface_color_buffer_size ( unsigned *  pOut,
const fg_surface  pSurface 
)

Get the colors buffer size in bytes.

Parameters
[out]pOutwill have the buffer size in bytes after this function is called
[in]pSurfaceis the surface handle
Returns
fg_err error code

§ fg_get_surface_vertex_buffer()

FGAPI fg_err fg_get_surface_vertex_buffer ( unsigned *  pOut,
const fg_surface  pSurface 
)

Get the resource identifier for vertices buffer.

Parameters
[out]pOutwill have the buffer identifier after this function is called
[in]pSurfaceis the surface handle
Returns
fg_err error code

§ fg_get_surface_vertex_buffer_size()

FGAPI fg_err fg_get_surface_vertex_buffer_size ( unsigned *  pOut,
const fg_surface  pSurface 
)

Get the vertices buffer size in bytes.

Parameters
[out]pOutwill have the buffer size in bytes after this function is called
[in]pSurfaceis the surface handle
Returns
fg_err error code

§ fg_set_surface_color()

FGAPI fg_err fg_set_surface_color ( fg_surface  pSurface,
const float  pRed,
const float  pGreen,
const float  pBlue,
const float  pAlpha 
)

Set the color of surface.

Parameters
[in]pSurfaceis the surface handle
[in]pRedis Red component in range [0, 1]
[in]pGreenis Green component in range [0, 1]
[in]pBlueis Blue component in range [0, 1]
[in]pAlphais Blue component in range [0, 1]
Returns
fg_err error code

§ fg_set_surface_legend()

FGAPI fg_err fg_set_surface_legend ( fg_surface  pSurface,
const char *  pLegend 
)

Set surface legend.

Parameters
[in]pSurfaceis the surface handle
[in]pLegend
Returns
fg_err error code