Limitations | |
Coordinate range limitations | API interface coordinates are limited to the range -2048 to 2047. |
Object/ | Object sizes are limited to 1024x1024 pixels. |
Framebuffer size limitations | The framebuffer size is limited to 2048x2048 pixels. |
Texture size limitations | Texture sizes are limited to 1024x1024 texels in general. |
API interface coordinates are limited to the range -2048 to 2047.
This limitation is due to the usage of d2_point for coordinates on the API interface.
Furthermore, since some internal calculations also use this range inside the driver, it is important that the resulting internal axis-aligned bounding box of an object does not extends out of this range. Such a situation will leads to rendering errors. This can happen e.g. when specifing an end-point for a line which is still inside this range but a line width which lets the bounding box of the resulting line extend out of this range (see e.g. d2_renderline).
Object sizes are limited to 1024x1024 pixels.
This limitation refers to the resulting internal axis-aligned bounding box of an object which is finally rendered. Since the API allows larger coordinate ranges, it is possible in general to pass objects of this size into the driver, but rendering errors may be the result. The application must make sure to split larger objects if necessary.
The framebuffer size is limited to 2048x2048 pixels.
This limitation is due to the limitation of the API interface coordinates (see above). The framebuffer pitch however can be in the range [-32768 .. 32767]. A negative pitch means that the objects are rendered upside-down.
Texture sizes are limited to 1024x1024 texels in general.
This limitation of 1024x1024 texels is valid when arbitrary texturing (see d2_settexture) is concerned. Blitting (see d2_setblitsrc, d2_blitcopy) allows using textures of up to 2047x1024 texels.
Render a wide line.
d2_s32 d2_renderline( d2_device * handle, d2_point x1, d2_point y1, d2_point x2, d2_point y2, d2_width w, d2_u32 flags )
Specify the source for texture mapping.
d2_s32 d2_settexture( d2_device * handle, void * ptr, d2_s32 pitch, d2_s32 width, d2_s32 height, d2_u32 format )
Specify the source for blit operation.
d2_s32 d2_setblitsrc( d2_device * handle, void * ptr, d2_s32 pitch, d2_s32 width, d2_s32 height, d2_u32 format )
Copy rectangle part of the source into destination.
d2_s32 d2_blitcopy( d2_device * handle, d2_s32 srcwidth, d2_s32 srcheight, d2_blitpos srcx, d2_blitpos srcy, d2_width dstwidth, d2_width dstheight, d2_point dstx, d2_point dsty, d2_u32 flags )