Direct3D

These functions are declared in the following header file:

#include <allegro5/allegro_direct3d.h>

al_get_d3d_device

LPDIRECT3DDEVICE9 al_get_d3d_device(ALLEGRO_DISPLAY *display)

Returns the Direct3D device of the display. The return value is undefined if the display was not created with the Direct3D flag.

Returns: A pointer to the Direct3D device.

al_get_d3d_system_texture

LPDIRECT3DTEXTURE9 al_get_d3d_system_texture(ALLEGRO_BITMAP *bitmap)

Returns the system texture (stored with the D3DPOOL_SYSTEMMEM flags). This texture is used for the render-to-texture feature set.

Returns: A pointer to the Direct3D system texture.

al_get_d3d_video_texture

LPDIRECT3DTEXTURE9 al_get_d3d_video_texture(ALLEGRO_BITMAP *bitmap)

Returns the video texture (stored with the D3DPOOL_DEFAULT or D3DPOOL_MANAGED flags depending on whether render-to-texture is enabled or disabled respectively).

Returns: A pointer to the Direct3D video texture.

al_have_d3d_non_pow2_texture_support

bool al_have_d3d_non_pow2_texture_support(void)

Returns whether the Direct3D device supports textures whose dimensions are not powers of two.

Returns: True if device suports NPOT textures, false otherwise.

al_have_d3d_non_square_texture_support

bool al_have_d3d_non_square_texture_support(void)

Returns whether the Direct3D device supports textures that are not square.

Returns: True if the Direct3D device suports non-square textures, false otherwise.

al_get_d3d_texture_position

void al_get_d3d_texture_position(ALLEGRO_BITMAP *bitmap, int *u, int *v)

Returns the u/v coordinates for the top/left corner of the bitmap within the used texture, in pixels.

Parameters:

al_is_d3d_device_lost

bool al_is_d3d_device_lost(ALLEGRO_DISPLAY *display)

Returns a boolean indicating whether or not the Direct3D device belonging to the given display is in a lost state.

Parameters:

Allegro version 4.9.22 (WIP) - Last updated: 2010-09-26 11:48:23 UTC