DemoGL::Reference::Functions::DEMOGL_TextureCubeMapUpdateWithFBRegion

DEMOGL_TextureCubeMapUpdateWithFBRegion

DEMOGL_TextureCubeMapUpdateWithFBRegion updates one side of an uploaded cubemap texture with with the color fragments from the backbuffer in the region specified. The region is (iX,iY) - ((iX + iWidth),(iY + iHeight)), and this region is placed in the texture at side iCubeSide on (iXDext, iYDest) as lower left corner.

int
DEMOGL_TextureCubeMapUpdateWithFBRegion(
	const GLuint iTextureID,
	const int iCubeSide,
	const int iX,
	const int iY,
	const int iWidth,
	const int iHeight,
	const int iXDest,
	const int iYDest
);
	
Parameters.
iTextureID
Specifies the TextureID of the cubemap texture which iCubeSide's texturedata should be partial overwritten with the region from the framebuffer, as specified.
iCubeSide
Specifies the side of the cubemap which should be updated. Cubemap can be one of the following values:

Cube side Value
Positive X DGL_CUBEMAPSIDE_POSX
Negative X DGL_CUBEMAPSIDE_NEGX
Positive Y DGL_CUBEMAPSIDE_POSY
Negative Y DGL_CUBEMAPSIDE_NEGY
Positive Z DGL_CUBEMAPSIDE_POSZ
Negative Z DGL_CUBEMAPSIDE_NEGZ

iX
Specifies the X-coordinate of the left lower corner of the region of the backbuffer which should be read for the texture data. This is a screencoordinate in pixels, starting from the left of the screen.
iY
Specifies the Y-coordinate of the left lower corner of the region of the backbuffer which should be read for the texture data. This is a screencoordinate in pixels, starting from the bottom of the screen.
iWidth
Specifies the width of the texture, which pixeldata is stored in the buffer pointed by pbyBuffer in pixels. Must be 2n for some integer n.
iHeight
Specifies the height of the texture, which pixeldata is stored in the buffer pointed by pbyBuffer in pixels. Must be 2n for some integer n.
iXDest
Specifies the X-coordinate of the left lower corner in the texture data where the region should be placed. This is in pixels.
iYDest
Specifies the Y-coordinate of the left lower corner in the texture data where the region should be placed. This is in pixels.

Return values.
If the function succeeds, it returns SYS_OK.
If the function fails, it returns SYS_NOK.

Remarks.
DEMOGL_TextureCubeMapUpdateWithFBRegion will overwrite a part or completely the texturedata stored in the given cubeside of the cubemap with the id iTextureID texture. The texture data stored in the texture store inside DemoGL, if applicable, is left untouched. You can't update a texture's data if that particular texture is not uploaded, DemoGL will return SYS_NOK then.

Example.
See DemoGL Example 6 for an example of dynamic created cubemaps and a usage of DEMOGL_TextureCubeMapUpdateWithFBRegion

Requirements.
DemoGL v1.3 (build 0112 or higher)

See also.
DEMOGL_TextureCubeMapCreateDynamic, DEMOGL_TextureUpload

Last changed on 31-may-2001

©1999-2001 Solutions Design