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

# glGetTexGen(3x)

return texture coordinate generation parameters

## NAME

**glGetTexGendv, glGetTexGenfv, glGetTexGeniv** - return texture coordinate generation parameters

## C SPECIFICATION

void **glGetTexGendv**( GLenum *coord*,

```
	GLenum pname,
	GLdouble *params )
```

void **glGetTexGenfv**( GLenum *coord*,

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

void **glGetTexGeniv**( GLenum *coord*,

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

delim $$

## PARAMETERS

- *coord*

  Specifies a texture coordinate. Must be **GL\_S**, **GL\_T**, **GL\_R**, or **GL\_Q**.

- *pname*

  Specifies the symbolic name of the value(s) to be returned. Must be either **GL\_TEXTURE\_GEN\_MODE** or the name of one of the texture generation plane equations: **GL\_OBJECT\_PLANE** or **GL\_EYE\_PLANE**.

- *params*

  Returns the requested data.

## DESCRIPTION

**glGetTexGen** returns in *params* selected parameters of a texture coordinate generation function that was specified using **glTexGen**. *coord* names one of the (*s*, *t*, *r*, *q*) texture coordinates, using the symbolic constant **GL\_S**, **GL\_T**, **GL\_R**, or **GL\_Q**.

*pname* specifies one of three symbolic names:

- **GL\_TEXTURE\_GEN\_MODE**

  *params* returns the single-valued texture generation function, a symbolic constant. The initial value is **GL\_EYE\_LINEAR**.

- **GL\_OBJECT\_PLANE**

  *params* returns the four plane equation coefficients that specify object linear-coordinate generation. Integer values, when requested, are mapped directly from the internal floating-point representation.

- **GL\_EYE\_PLANE**

  *params* returns the four plane equation coefficients that specify eye linear-coordinate generation. Integer values, when requested, are mapped directly from the internal floating-point representation. The returned values are those maintained in eye coordinates. They are not equal to the values specified using **glTexGen**, unless the modelview matrix was identity when **glTexGen** was called.

## NOTES

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

When the **GL\_ARB\_multitexture** extension is supported, **glGetTexGen** returns the texture coordinate generation parameters for the active texture unit.

## ERRORS

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

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

## SEE ALSO

**glActiveTextureARB(3G)**, **glTexGen(3G)**
