<!--
{
  "availability" : [
    "macOS: 10.5.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "Quartz",
  "identifier" : "/documentation/Quartz/QCPlugInOutputImageProvider/releaseRenderedTexture(_:forCGLContext:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Quartz"
    ],
    "preciseIdentifier" : "c:objc(pl)QCPlugInOutputImageProvider(im)releaseRenderedTexture:forCGLContext:"
  },
  "title" : "releaseRenderedTexture(_:forCGLContext:)"
}
-->

# releaseRenderedTexture(_:forCGLContext:)

Releases the previously copied texture.

```
optional func releaseRenderedTexture(_ name: GLuint, forCGLContext cgl_ctx: CGLContextObj!)
```

## Parameters

`name`

The name of the previously bound texture.

`cgl_ctx`

The CGL context.

## Discussion

Your OpenGL code should save and restore all states *except* for those that are part of `GL_CURRENT_BIT` (vertex position, color, texture, and so on). Also use CGL macros instead of changing the current context, by including this statement:

`#import <OpenGL/CGLMacro.h>`

For more details, see [Quartz Composer Custom Patch Programming Guide](https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/QuartzComposer_Patch_PlugIn_ProgGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40004787).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)