ADC Home > Reference Library > Reference > Apple Applications > Final Cut Pro/Final Cut Express > FxPlug Reference

 


FxTexture

Superclass:
Declared In:

Introduction

VRAM-based image used for hardware-accelerated rendering.

Discussion

This subclass of FxImage is defined by an FxImageInfo structure.

NOTE: The designated initializers of the FxTexture class are -initWithInfo:, -initWithInfo:andData:, and -initWithInfo:andTextureId:. Sending -init to an FxTexture raises an exception.



Methods

-bind
Binds the texture object.
-createData:withType:
Copies the FxImage's pixels into a new pixel buffer. The sender owns this buffer and is responsible for deallocating it.
-disable
Disables the texture for rendering.
-draw
Draws the texture to the GL Context.
-enable
Enables the texture for rendering.
-getTextureCoords:right:bottom:top:
Gets the texture bounds.
-initWithInfo:
Initializes with the given FxImageInfo structure.
-initWithInfo:andData:
Initializes with the given FxImageInfo structure and the given pixel buffer.
-initWithInfo:andTextureId:
Initializes using the given FxImageInfo structure and texture ID.
-setAsActiveTexture
Sets the texture as the active texture.
-setData:
Sets the pixel buffer to the given data pointer.
-setTarget:
Sets the target of the FxTexture.
-setTextureCoords:right:bottom:top:
Sets the texture bounds.
-setTextureId:
Assigns the GLtexture with the given ID to the FxTexture.
-target
Returns the target of the FxTexture.
-textureId
The ID of the GLtexture wrapped by the FxTexture.

bind


Binds the texture object.

- (void)bind; 


createData:withType:


Copies the FxImage's pixels into a new pixel buffer. The sender owns this buffer and is responsible for deallocating it.

- (void *)createData:(GLenum)format withType:(GLenum)type; 
Parameters
format
The destination GL pixel format, e.g. GL_RGBA.
type
The GL pixel type, e.g. GL_UNSIGNED_INT_8_8_8_8, GL_HALF_APPLE, GL_FLOAT.
Return Value

The pointer to the new pixel buffer.


disable


Disables the texture for rendering.

- (void)disable; 


draw


Draws the texture to the GL Context.

- (void)draw; 


enable


Enables the texture for rendering.

- (void)enable; 


getTextureCoords:right:bottom:top:


Gets the texture bounds.

- (void)getTextureCoords:(double *)left right:(double *)right bottom:(double *)bottom top:(double *)top; 
Parameters
left
Pointer to the left value.
right
Pointer to the right value.
bottom
Pointer to the bottom value.
top
Pointer to the top value.
Discussion

The sender can set any of the pointers to NULL if the value of a particular coordinate is not of interest.


initWithInfo:


Initializes with the given FxImageInfo structure.

- (id)initWithInfo:(FxImageInfo)imageInfo; 
Parameters
imageInfo
The FxImageInfo that defines the image.
Return Value

The initialized FxTexture.

Discussion

This is one of the designated initializers for the FxTexture class.


initWithInfo:andData:


Initializes with the given FxImageInfo structure and the given pixel buffer.

- (id)initWithInfo:(FxImageInfo)imageInfo andData:(void *)data; 
Parameters
imageInfo
The FxImageInfo that defines the image.
Return Value

The initialized FxTexture.

Discussion

The sender owns the buffer and is responsible for deallocating it.


initWithInfo:andTextureId:


Initializes using the given FxImageInfo structure and texture ID.

- (id)initWithInfo:(FxImageInfo)imageInfo andTextureId:(GLuint)textureId; 
Parameters
imageInfo
The FxImageInfo that defines the image.
Return Value

The initialized FxTexture.

Discussion

The sender owns the GLtexture passed to this method and is responsible for deallocating it.


setAsActiveTexture


Sets the texture as the active texture.

- (void)setAsActiveTexture; 


setData:


Sets the pixel buffer to the given data pointer.

- (void)setData:(void *)data; 
Parameters
data
A pointer to a pixel buffer.


setTarget:


Sets the target of the FxTexture.

- (void)setTarget:(GLenum)target; 


setTextureCoords:right:bottom:top:


Sets the texture bounds.

- (void)setTextureCoords:(double)left right:(double)right bottom:(double)bottom top:(double)top; 
Parameters
left
The left value.
right
The right value.
bottom
The bottom value.
top
The top value.


setTextureId:


Assigns the GLtexture with the given ID to the FxTexture.

- (void)setTextureId:(GLuint)textureId; 
Parameters
textureId
The GLtexture ID.


target


Returns the target of the FxTexture.

- (GLenum)target; 
Return Value

GL texture target ID.


textureId


The ID of the GLtexture wrapped by the FxTexture.

- (GLuint)textureId; 
Return Value

The GLtexture ID.


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.
Last Updated: 2008-06-05