libgpac
Documentation of the core library of GPAC
NamedTexture Interface Reference

import"webgl.idl";

Public Member Functions

void reconfigure ()
 
void upload (FilterPacket pck)
 
void upload (Texture tx)
 

Data Fields

attribute readonly unsigned long nb_textures
 
attribute readonly unsigned long is_gl_input
 
attribute readonly DOMString name
 
attribute unsigned long pbo
 

Detailed Description

Named texture object, see WebGL API

Member Function Documentation

◆ reconfigure()

void NamedTexture::reconfigure ( )

indicates the underlying picel format has been modified and that the texture should be reevaluated

◆ upload() [1/2]

void NamedTexture::upload ( FilterPacket  pck)

builds named texture from input filter packet

Parameters
pckthe filter packet to use as source for texture data

◆ upload() [2/2]

void NamedTexture::upload ( Texture  tx)

builds named texture from EVG texture

Parameters
txthe EVG texture to use as source for texture data
Warning
do NOT use a Texture object constructed from a FilterPacket, this will fail and throw an exception. Use upload(FilterPacket) instead

Field Documentation

◆ nb_textures

attribute readonly unsigned long NamedTexture::nb_textures

number of underlying textures. This can be useful when doing multi-texturing to get the next texture unit slot:

nextActiveTexture = gl.TEXTURE0 + named_tx.nb_textures;

◆ is_gl_input

attribute readonly unsigned long NamedTexture::is_gl_input

set to true if the input to this named texture is a set of one or more OpenGL textures rather than system memory data

◆ name

attribute readonly DOMString NamedTexture::name

name of the texture, as passed upon creation

◆ pbo

attribute unsigned long NamedTexture::pbo

indicates if PBO is used for data transfer. By default named textures are created with no PBO transfer. To enable it, set this to true before the first texture upload