GLAPI/glGetMultisample: Difference between revisions
m Renaming category: 'API Reference 4' to 'Core API Reference'. |
m Bot: Adding better formatting. |
||
(2 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
== Function Definition == | == Function Definition == | ||
void '''glGetMultisamplefv'''(GLenum | void '''glGetMultisamplefv'''(GLenum {{param|pname}}, GLuint {{param|index}}, GLfloat *{{param|val}}); | ||
; pname | ; pname | ||
: Specifies the sample parameter name. | : Specifies the sample parameter name. {{param|pname}} must be {{enum|GL_SAMPLE_POSITION}}. | ||
; index | ; index | ||
: Specifies the index of the sample whose position to query. | : Specifies the index of the sample whose position to query. | ||
Line 20: | Line 20: | ||
== Description == | == Description == | ||
'''glGetMultisamplefv''' queries the location of a given sample. | '''glGetMultisamplefv''' queries the location of a given sample. {{param|pname}} specifies the sample parameter to retrieve and must be {{enum|GL_SAMPLE_POSITION}}. {{param|index}} corresponds to the sample for which the location should be returned. The sample location is returned as two floating-point values in {{param|val[0]}} and {{param|val[1]}}, each between 0 and 1, corresponding to the {{param|x}} and {{param|y}} locations respectively in the GL pixel space of that sample. (0.5, 0.5) this corresponds to the pixel center. {{param|index}} must be between zero and the value of {{enum|GL_SAMPLES}} - 1. | ||
If the multisample mode does not have fixed sample locations, the returned values may only reflect the locations of samples within some pixels. | If the multisample mode does not have fixed sample locations, the returned values may only reflect the locations of samples within some pixels. | ||
Line 26: | Line 26: | ||
== Errors == | == Errors == | ||
{{ | {{enum|GL_INVALID_ENUM}} is generated if {{param|pname}} is not one {{enum|GL_SAMPLE_POSITION}}. | ||
{{ | {{enum|GL_INVALID_VALUE}} is generated if {{param|index}} is greater than or equal to the value of {{enum|GL_SAMPLES}}. | ||
== See Also == | == See Also == | ||
{{apifunc|glBindFramebuffer}}, {{apifunc|glTexImage2DMultisample}}, {{apifunc|glTexImage3DMultisample}}, {{apifunc|glRenderbufferStorageMultisample}} | |||
== Copyright == | == Copyright == |
Latest revision as of 01:48, 27 September 2012
Core in version | 4.6 | |
---|---|---|
Core since version | 3.2 | |
Core ARB extension | ARB_texture_multisample |
glGetMultisamplefv: retrieve the location of a sample
Function Definition
void glGetMultisamplefv(GLenum pname, GLuint index, GLfloat *val);
- pname
- Specifies the sample parameter name. pname must be GL_SAMPLE_POSITION.
- index
- Specifies the index of the sample whose position to query.
- val
- Specifies the address of an array to receive the position of the sample.
Description
glGetMultisamplefv queries the location of a given sample. pname specifies the sample parameter to retrieve and must be GL_SAMPLE_POSITION. index corresponds to the sample for which the location should be returned. The sample location is returned as two floating-point values in val[0] and val[1], each between 0 and 1, corresponding to the x and y locations respectively in the GL pixel space of that sample. (0.5, 0.5) this corresponds to the pixel center. index must be between zero and the value of GL_SAMPLES - 1.
If the multisample mode does not have fixed sample locations, the returned values may only reflect the locations of samples within some pixels.
Errors
GL_INVALID_ENUM is generated if pname is not one GL_SAMPLE_POSITION.
GL_INVALID_VALUE is generated if index is greater than or equal to the value of GL_SAMPLES.
See Also
glBindFramebuffer, glTexImage2DMultisample, glTexImage3DMultisample, glRenderbufferStorageMultisample
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/.