Reputation: 1633
When creating a multisample FBO, do all attached target textures need to be multisample-textures?
Upvotes: 3
Views: 263
Reputation: 22167
Section 9.4.2 Whole Framebuffer Completeness of the spec states:
The framebuffer object bound to target is said to be framebuffer complete if all the following conditions are true:
[...]• The value of
RENDERBUFFER_SAMPLES
is the same for all attached renderbuffers; the value ofTEXTURE_SAMPLES
is the same for all attached textures; and, if the attached images are a mix of renderbuffers and textures, the value ofRENDERBUFFER_SAMPLES
matches the value ofTEXTURE_SAMPLES
.
So yes, the number of samples has to be the same for all attached textures and renderbuffers.
Upvotes: 3
Reputation: 39370
I think so.
§ 9.2.3.1 Multisample Queries
The values of
SAMPLE_BUFFERS
andSAMPLES
control whether and how multisampling is performed (...).If a framebuffer object is not framebuffer complete (...), then the values of
SAMPLE_BUFFERS
andSAMPLES
are undefined.Otherwise, the value of
SAMPLES
is equal to the value ofRENDERBUFFER_SAMPLES
orTEXTURE_SAMPLES
(depending on the type of the attached images), which must all have the same value.
(emphasis mine)
Upvotes: 2