---
name: "glGetTexParameter"
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/glGetTexParameter"
---

# glGetTexParameter(3x)

return texture parameter values

## NAME

**glGetTexParameterfv, glGetTexParameteriv** - return texture parameter values

## C SPECIFICATION

void **glGetTexParameterfv**( GLenum *target*,

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

void **glGetTexParameteriv**( GLenum *target*,

```
	GLenum pname,
	GLint *params )
```

delim $$

## PARAMETERS

- *target*

  Specifies the symbolic name of the target texture. **GL\_TEXTURE\_1D**,**GL\_TEXTURE\_2D**, and **GL\_TEXTURE\_3D**  are accepted.

- *pname*

  Specifies the symbolic name of a texture parameter. **GL\_TEXTURE\_MAG\_FILTER**, **GL\_TEXTURE\_MIN\_FILTER**, **GL\_TEXTURE\_MIN\_LOD**, **GL\_TEXTURE\_MAX\_LOD**, **GL\_TEXTURE\_BASE\_LEVEL**, **GL\_TEXTURE\_MAX\_LEVEL**, **GL\_TEXTURE\_WRAP\_S**, **GL\_TEXTURE\_WRAP\_T**, **GL\_TEXTURE\_WRAP\_R**, **GL\_TEXTURE\_BORDER\_COLOR**, **GL\_TEXTURE\_PRIORITY**, and **GL\_TEXTURE\_RESIDENT** are accepted.

- *params*

  Returns the texture parameters.

## DESCRIPTION

**glGetTexParameter** returns in *params* the value or values of the texture parameter specified as *pname*. *target* defines the target texture, either **GL\_TEXTURE\_1D**, **GL\_TEXTURE\_2D**, or **GL\_TEXTURE\_3D** to specify one-, two-, or three-dimensional texturing. *pname* accepts the same symbols as **glTexParameter**, with the same interpretations:

- **GL\_TEXTURE\_MAG\_FILTER**

  Returns the single-valued texture magnification filter, a symbolic constant. The initial value is **GL\_LINEAR**.

- **GL\_TEXTURE\_MIN\_FILTER**

  Returns the single-valued texture minification filter, a symbolic constant. The initial value is **GL\_NEAREST\_MIPMAP\_LINEAR**.

- **GL\_TEXTURE\_MIN\_LOD**

  Returns the single-valued texture minimum level-of-detail value.  The initial value is $-1000$.

- **GL\_TEXTURE\_MAX\_LOD**

  Returns the single-valued texture maximum level-of-detail value. The initial value is 1000.

- **GL\_TEXTURE\_BASE\_LEVEL**

  Returns the single-valued base texture mipmap level.  The initial value is 0.

- **GL\_TEXTURE\_MAX\_LEVEL**

  Returns the single-valued maximum texture mipmap array level.  The initial value is 1000.

- **GL\_TEXTURE\_WRAP\_S**

  Returns the single-valued wrapping function for texture coordinate $s$, a symbolic constant. The initial value is **GL\_REPEAT**.

- **GL\_TEXTURE\_WRAP\_T**

  Returns the single-valued wrapping function for texture coordinate $t$, a symbolic constant. The initial value is **GL\_REPEAT**.

- **GL\_TEXTURE\_WRAP\_R**

  Returns the single-valued wrapping function for texture coordinate $r$, a symbolic constant. The initial value is **GL\_REPEAT**.

- **GL\_TEXTURE\_BORDER\_COLOR**

  Returns four integer or floating-point numbers that comprise the RGBA color of the texture border. Floating-point values are returned in the range \[0, 1\]. Integer values are returned as a linear mapping of 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).

- **GL\_TEXTURE\_PRIORITY**

  Returns the residence priority of the target texture (or the named texture bound to it). The initial value is 1.  See **glPrioritizeTextures**.

- **GL\_TEXTURE\_RESIDENT**

  Returns the residence status of the target texture. If the value returned in *params* is **GL\_TRUE**, the texture is resident in texture memory. See **glAreTexturesResident**.

## NOTES

**GL\_TEXTURE\_PRIORITY** and **GL\_TEXTURE\_RESIDENT** are available only if the GL version is 1.1 or greater.

**GL\_TEXTURE\_3D**,  **GL\_TEXTURE\_MIN\_LOD**, **GL\_TEXTURE\_MAX\_LOD**, **GL\_TEXTURE\_BASE\_LEVEL**, **GL\_TEXTURE\_MAX\_LEVEL**, and **GL\_TEXTURE\_WRAP\_R** are available only if the GL version is 1.2 or greater.

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

## ERRORS

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

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

## SEE ALSO

**glAreTexturesResident(3G)**, **glPrioritizeTextures(3G)**, **glTexParameter(3G)**
