---
name: "glGetTexEnv"
section: "3x"
platform: "linux"
package: "xlibmesa-gl-dev"
version: "4.3.0.dfsg.1-14sarge7"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/glGetTexEnv"
---

# glGetTexEnv(3x)

return texture environment parameters

## NAME

**glGetTexEnvfv, glGetTexEnviv** - return texture environment parameters

## C SPECIFICATION

void **glGetTexEnvfv**( GLenum *target*,

```
	GLenum pname,
	GLfloat *params )
```

void **glGetTexEnviv**( GLenum *target*,

```
	GLenum pname,
	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*

  Returns the requested data.

## DESCRIPTION

**glGetTexEnv** returns in *params* selected values of a texture environment that was specified with **glTexEnv**. *target* specifies a texture environment. Currently, only one texture environment is defined and supported: **GL\_TEXTURE\_ENV**.

*pname* names a specific texture environment parameter, as follows:

- **GL\_TEXTURE\_ENV\_MODE**

  *params* returns the single-valued texture environment mode, a symbolic constant. The initial value is **GL\_MODULATE**.

- **GL\_TEXTURE\_ENV\_COLOR**

  *params* returns four integer or floating-point values that are the texture environment color.   Integer values, when requested, are linearly mapped from the internal floating-point representation such that 1.0 maps to the most positive representable integer, and -1.0 maps to the most negative representable integer. The initial value is (0, 0, 0, 0).

## NOTES

If an error is generated, no change is made to the contents of *params*.

When the **GL\_ARB\_multitexture** extension is supported, **glGetTexEnv** returns the texture environment parameters for the active texture unit.

## ERRORS

**GL\_INVALID\_ENUM** is generated if *target* or *pname* is not an accepted value.

**GL\_INVALID\_OPERATION** is generated if **glGetTexEnv** is executed between the execution of **glBegin** and the corresponding execution of **glEnd**.

## SEE ALSO

**glActiveTextureARB(3G)**, **glTexEnv(3G)**
