GLTEXENV



GLTEXENV

NAME
C SPECIFICATION
PARAMETERS
C SPECIFICATION
PARAMETERS
DESCRIPTION
NOTES
ASSOCIATED GETS
SEE ALSO

NAME

glTexEnvf, glTexEnvi, glTexEnvfv, glTexEnviv − set texture environment parameters

C SPECIFICATION

void glTexEnvf( GLenum target,

GLenum pname,

GLfloat param )

void glTexEnvi( GLenum target,

GLenum pname,

GLint param )

PARAMETERS

target

Specifies a texture environment. Must be GL_TEXTURE_ENV.

pname

Specifies the symbolic name of a single-valued texture environment parameter. Must be GL_TEXTURE_ENV_MODE.

param

Specifies a single symbolic constant, one of GL_MODULATE, GL_DECAL, GL_BLEND, or GL_REPLACE.

C SPECIFICATION

void glTexEnvfv( GLenum target,
GLenum pname,

const GLfloat *params )

void glTexEnviv( GLenum target,

GLenum pname,

const GLint *params )

PARAMETERS

target

Specifies a texture environment. Must be GL_TEXTURE_ENV.

pname

Specifies the symbolic name of a texture environment parameter. Accepted values are GL_TEXTURE_ENV_MODE and GL_TEXTURE_ENV_COLOR.

params

Specifies a pointer to a parameter array that contains either a single symbolic constant or an RGBA color.

DESCRIPTION

A texture environment specifies how texture values are interpreted when a fragment is textured. target must be GL_TEXTURE_ENV. pname can be either GL_TEXTURE_ENV_MODE or GL_TEXTURE_ENV_COLOR.

If pname is GL_TEXTURE_ENV_MODE, then params is (or points to) the symbolic name of a texture function. Four texture functions may be specified: GL_MODULATE, GL_DECAL, GL_BLEND, and GL_REPLACE.

A texture function acts on the fragment to be textured using the texture image value that applies to the fragment (see glTexParameter) and produces an RGBA color for that fragment. The following table shows how the RGBA color is produced for each of the three texture functions that can be chosen. $C$ is a triple of color values (RGB) and $A$ is the associated alpha value. RGBA values extracted from a texture image are in the range [0,1]. The subscript $f$ refers to the incoming fragment, the subscript $t$ to the texture image, the subscript $c$ to the texture environment color, and subscript $v$ indicates a value produced by the texture function.

A texture image can have up to four components per texture element (see glTexImage1D, glTexImage2D, glTexImage3D, glCopyTexImage1D, and glCopyTexImage2D). In a one-component image, $L sub t$ indicates that single component. A two-component image uses $L sub t$ and $A sub t$. A three-component image has only a color value, $C sub t$. A four-component image has both a color value $C sub t$ and an alpha value $A sub t$.

If pname is GL_TEXTURE_ENV_COLOR, params is a pointer to an array that holds an RGBA color consisting of four values. Integer color components are interpreted linearly such that the most positive integer maps to 1.0, and the most negative integer maps to -1.0. The values are clamped to the range [0,1] when they are specified. $C sub c$ takes these four values.

GL_TEXTURE_ENV_MODE defaults to GL_MODULATE and GL_TEXTURE_ENV_COLOR defaults to (0, 0, 0, 0).

NOTES

GL_REPLACE may only be used if the GL version is 1.1 or greater.

Internal formats other than 1, 2, 3, or 4 may only be used if the GL version is 1.1 or greater.

When the GL_ARB_multitexture extension is supported, glTexEnv controls the texture environment for the current active texture unit, selected by glActiveTextureARB. GL_INVALID_ENUM is generated when target or pname is not one of the accepted defined values, or when params should have a defined constant value (based on the value of pname) and does not.

GL_INVALID_OPERATION is generated if glTexEnv is executed between the execution of glBegin and the corresponding execution of glEnd.

ASSOCIATED GETS

glGetTexEnv

SEE ALSO

glActiveTextureARB(3G), glCopyPixels(3G), glCopyTexImage1D(3G), glCopyTexImage2D(3G), glCopyTexSubImage1D(3G), glCopyTexSubImage2D(3G), glCopyTexSubImage3D(3G), glTexImage1D(3G), glTexImage2D(3G), glTexImage3D(3G), glTexParameter(3G), glTexSubImage1D(3G), glTexSubImage2D(3G), glTexSubImage3D(3G)



More Linux Commands

manpages/udisks-tcp-bridge.1.html
udisks-tcp-bridge(1) - udisks TCP/IP bridge - Linux man page
This program is used by remote clients to connect to the org.freedesktop.UDisks D-Bus service on the system bus. Users or administrators never needs to start th

manpages/snmp_sess_async_send.3.html
snmp_sess_async_send(3) - session functions - Linux man page
These functions define a subset of the API that can be used to manage single SNMP sessions in a multi-threaded application. Except for snmp_sess_session(), thes

manpages/pngtopnm.1.html
pngtopnm(1) - convert a PNG image into a PNM image (ManPage)
This program is part of Netpbm(1) pngtopnm was obsoleted by pngtopam(1) , introduced with Netpbm 10.44 (September 2008). pngtopam is backward compatible with pn

manpages/Tk_GetNumMainWindows.3.html
Tk_GetNumMainWindows(3) - functions for querying main window
A main window is a special kind of toplevel window used as the outermost window in an application. If interp is associated with a Tk application then Tk_MainWin

manpages/XSelectExtensionEvent.3.html
XSelectExtensionEvent(3) - select extension events, get the
The XSelectExtensionEvent request causes the X server to report the events associated with the specified list of event classes. Initially, X will not report any

manpages/XISetFocus.3.html
XISetFocus(3) - set or get the device's focus (Man Page)....
XISetFocus changes the focus of the specified device ans its last-focus-change time. It has no effect if the specified time is earlier than the current last-foc

manpages/stap-merge.1.html
stap-merge(1) - systemtap per-cpu binary merger (Man Page)
The stap-merge executable applies when the -b option has been used while running a stap script. The -b option will generate files per-cpu, based on the timestam

manpages/ncurses6-config.1.html
ncurses6-config(1) - helper script for ncurses libraries....
ncurses6-config.1 - This is a shell script which simplifies configuring applications against a particular set of ncurses libraries. OPTIONS --prefix echos the p

manpages/assume_default_colors_sp.3ncurses.html
assume_default_colors_sp(3ncurses) - curses screen-pointer e
This implementation can be configured to provide a set of functions which improve the ability to manage multiple screens. This feature can be added to any of th

manpages/experimental.3pm.html
experimental(3pm) Experimental features made easy (ManPage)
This pragma provides an easy and convenient way to enable or disable experimental features. Every version of perl has some number of features present but consid

manpages/ldap_memfree.3.html
ldap_memfree(3) - LDAP memory allocation routines (ManPage)
These routines are used to allocate/deallocate memory used/returned by the LDAP library. ldap_memalloc(), ldap_memcalloc(), ldap_memrealloc(), and ldap_memfree(

manpages/mincore.2.html
mincore(2) - determine whether pages are resident in memory
mincore() returns a vector that indicates whether pages of the calling processs virtual memory are resident in core (RAM), and so will not cause a disk access (





We can't live, work or learn in freedom unless the software we use is free.