Skip to content

Image#setMultiSample incorrectly throws exceptions #2250

@codex128

Description

@codex128

/**
* @param multiSamples Set the number of samples to use for this image,
* setting this to a value higher than 1 turns this image/texture
* into a multisample texture (on OpenGL3.1 and higher).
*/
public void setMultiSamples(int multiSamples) {
if (multiSamples <= 0)
throw new IllegalArgumentException("multiSamples must be > 0");
if (getData(0) != null)
throw new IllegalArgumentException("Cannot upload data as multisample texture");
if (hasMipmaps())
throw new IllegalArgumentException("Multisample textures do not support mipmaps");
this.multiSamples = multiSamples;
}

If the argument is 1, that is supposed to make the image not multisampled according to the documentation, but exceptions can still be thrown as if the image was multisampled.

Metadata

Metadata

Assignees

Labels

defectSomething that is supposed to work, but doesn't. Less severe than a "bug"

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions