GLAPI/glClampColor: Difference between revisions

From OpenGL Wiki
Jump to navigation Jump to search
m Renaming category: 'API Reference 4' to 'Core API Reference'.
m Bot: Adding better formatting.
Line 8: Line 8:
== Function Definition ==
== Function Definition ==


   void '''glClampColor'''(GLenum ''target'', GLenum ''clamp'');
   void '''glClampColor'''(GLenum {{param|target}}, GLenum {{param|clamp}});


; target
; target
: Target for color clamping. ''target'' must be {{code|GL_CLAMP_READ_COLOR}}.
: Target for color clamping. {{param|target}} must be {{code|GL_CLAMP_READ_COLOR}}.
; clamp
; clamp
: Specifies whether to apply color clamping. ''clamp'' must be {{code|GL_TRUE}} or {{code|GL_FALSE}}.
: Specifies whether to apply color clamping. {{param|clamp}} must be {{code|GL_TRUE}} or {{code|GL_FALSE}}.


== Description ==
== Description ==


'''glClampColor''' controls color clamping that is performed during [[GLAPI/glReadPixels|glReadPixels]]. ''target'' must be {{code|GL_CLAMP_READ_COLOR}}. If ''clamp'' is {{code|GL_TRUE}}, read color clamping is enabled; if ''clamp'' is {{code|GL_FALSE}}, read color clamping is disabled. If ''clamp'' is {{code|GL_FIXED_ONLY}}, read color clamping is enabled only if the selected read buffer has fixed point components and disabled otherwise.
'''glClampColor''' controls color clamping that is performed during {{apifunc|glReadPixels}}. {{param|target}} must be {{code|GL_CLAMP_READ_COLOR}}. If {{param|clamp}} is {{code|GL_TRUE}}, read color clamping is enabled; if {{param|clamp}} is {{code|GL_FALSE}}, read color clamping is disabled. If {{param|clamp}} is {{code|GL_FIXED_ONLY}}, read color clamping is enabled only if the selected read buffer has fixed point components and disabled otherwise.


== Errors ==
== Errors ==


{{code|GL_INVALID_ENUM}} is generated if ''target'' is not {{code|GL_CLAMP_READ_COLOR}}.
{{code|GL_INVALID_ENUM}} is generated if {{param|target}} is not {{code|GL_CLAMP_READ_COLOR}}.


{{code|GL_INVALID_ENUM}} is generated if ''clamp'' is not {{code|GL_TRUE}} or {{code|GL_FALSE}}.
{{code|GL_INVALID_ENUM}} is generated if {{param|clamp}} is not {{code|GL_TRUE}} or {{code|GL_FALSE}}.


== Associated Gets ==
== Associated Gets ==


[[GLAPI/glGet|glGet]] with argument {{code|GL_CLAMP_READ_COLOR}}.
{{apifunc|glGet}} with argument {{code|GL_CLAMP_READ_COLOR}}.


== Copyright ==
== Copyright ==

Revision as of 01:13, 29 April 2012

glClampColor
Core in version 4.6
Core since version 3.0

glClampColor: specify whether data read via glReadPixels should be clamped

Function Definition

 void glClampColor(GLenum target​, GLenum clamp​);
target
Target for color clamping. target​ must be GL_CLAMP_READ_COLOR.
clamp
Specifies whether to apply color clamping. clamp​ must be GL_TRUE or GL_FALSE.

Description

glClampColor controls color clamping that is performed during glReadPixels. target​ must be GL_CLAMP_READ_COLOR. If clamp​ is GL_TRUE, read color clamping is enabled; if clamp​ is GL_FALSE, read color clamping is disabled. If clamp​ is GL_FIXED_ONLY, read color clamping is enabled only if the selected read buffer has fixed point components and disabled otherwise.

Errors

GL_INVALID_ENUM is generated if target​ is not GL_CLAMP_READ_COLOR.

GL_INVALID_ENUM is generated if clamp​ is not GL_TRUE or GL_FALSE.

Associated Gets

glGet with argument GL_CLAMP_READ_COLOR.

Copyright

Copyright © 2010 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.