Difference between revisions of "GLAPI/glSampleMask"

From OpenGL Wiki
Jump to navigation Jump to search
(4.0 API.)
 
m (Bot: Adding better formatting.)
 
(6 intermediate revisions by 2 users not shown)
Line 9: Line 9:
 
== Function Definition ==
 
== Function Definition ==
  
   void '''glSampleMaski'''(GLuint ''maskNumber'', GLbitfield ''mask'');
+
   void '''glSampleMaski'''(GLuint {{param|maskNumber}}, GLbitfield {{param|mask}});
  
 
; maskNumber
 
; maskNumber
Line 18: Line 18:
 
== Description ==
 
== Description ==
  
'''glSampleMaski''' sets one 32-bit sub-word of the multi-word sample mask, {{code|GL_SAMPLE_MASK_VALUE}}.
+
'''glSampleMaski''' sets one 32-bit sub-word of the multi-word sample mask, {{enum|GL_SAMPLE_MASK_VALUE}}.
  
''maskIndex'' specifies which 32-bit sub-word of the sample mask to update, and ''mask'' specifies the new value to use for that sub-word. ''maskIndex'' must be less than the value of {{code|GL_MAX_SAMPLE_MASK_WORDS}}. Bit ''B'' of mask word ''M'' corresponds to sample 32 x ''M'' + ''B''.
+
{{param|maskIndex}} specifies which 32-bit sub-word of the sample mask to update, and {{param|mask}} specifies the new value to use for that sub-word. {{param|maskIndex}} must be less than the value of {{enum|GL_MAX_SAMPLE_MASK_WORDS}}. Bit ''B'' of mask word ''M'' corresponds to sample 32 x ''M'' + ''B''.
  
 
== Notes ==
 
== Notes ==
Line 28: Line 28:
 
== Errors ==
 
== Errors ==
  
{{code|GL_INVALID_VALUE}} is generated if ''maskIndex'' is greater than or equal to the value of {{code|GL_MAX_SAMPLE_MASK_WORDS}}.
+
{{enum|GL_INVALID_VALUE}} is generated if {{param|maskIndex}} is greater than or equal to the value of {{enum|GL_MAX_SAMPLE_MASK_WORDS}}.
  
 
== See Also ==
 
== See Also ==
  
[[GLAPI/glGenRenderbuffers|glGenRenderbuffers]], [[GLAPI/glBindRenderbuffer|glBindRenderbuffer]], [[GLAPI/glRenderbufferStorageMultisample|glRenderbufferStorageMultisample]], [[GLAPI/glFramebufferRenderbuffer|glFramebufferRenderbuffer]], [[GLAPI/glDeleteRenderbuffers|glDeleteRenderbuffers]]
+
{{apifunc|glSampleCoverage}}
  
 
== Copyright ==
 
== Copyright ==
Line 38: Line 38:
 
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/ http://opencontent.org/openpub/].
 
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/ http://opencontent.org/openpub/].
  
[[Category:API Reference 4|SampleMaski]]
+
[[Category:Core API Ref Post Fragment Shader Operations|SampleMask]]
 +
[[Category:Core API Reference|SampleMask]]

Latest revision as of 01:54, 27 September 2012

glSampleMaski
Core in version 4.6
Core since version 3.2
Core ARB extension ARB_texture_multisample

glSampleMaski: set the value of a sub-word of the sample mask

Function Definition

 void glSampleMaski(GLuint maskNumber​, GLbitfield mask​);
maskNumber
Specifies which 32-bit sub-word of the sample mask to update.
mask
Specifies the new value of the mask sub-word.

Description

glSampleMaski sets one 32-bit sub-word of the multi-word sample mask, GL_SAMPLE_MASK_VALUE.

maskIndex​ specifies which 32-bit sub-word of the sample mask to update, and mask​ specifies the new value to use for that sub-word. maskIndex​ must be less than the value of GL_MAX_SAMPLE_MASK_WORDS. Bit B of mask word M corresponds to sample 32 x M + B.

Notes

glSampleMaski is available only if the GL version is 3.2 or greater, or if the ARB_texture_multisample extension is supported.

Errors

GL_INVALID_VALUE is generated if maskIndex​ is greater than or equal to the value of GL_MAX_SAMPLE_MASK_WORDS.

See Also

glSampleCoverage

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/.