Difference between revisions of "CompareMode"
m |
m |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{newin|[[0.10.0]]|100|type=enum}} | {{newin|[[0.10.0]]|100|type=enum}} | ||
− | Different types of per-pixel [[love.graphics.setStencilTest|stencil test]] comparisons. The pixels of an object will be drawn if the comparison succeeds, for each pixel that the object touches. | + | Different types of per-pixel [[love.graphics.setStencilTest|stencil test]] and [[love.graphics.setDepthMode|depth test]] comparisons. The pixels of an object will be drawn if the comparison succeeds, for each pixel that the object touches. |
== Constants == | == Constants == | ||
− | ;equal: | + | ;equal: |
− | ;notequal: | + | * stencil tests: the stencil value of the pixel must be equal to the [[love.graphics.setStencilTest|supplied value]]. |
− | ;less: | + | * depth tests: the depth value of the drawn object at that pixel must be equal to the existing depth value of that pixel. |
− | ;lequal: | + | ;notequal: |
− | ;gequal: | + | * stencil tests: the stencil value of the pixel must '''not''' be equal to the [[love.graphics.setStencilTest|supplied value]]. |
− | ;greater: | + | * depth tests: the depth value of the drawn object at that pixel must '''not''' be equal to the existing depth value of that pixel. |
+ | ;less: | ||
+ | * stencil tests: the stencil value of the pixel must be less than the [[love.graphics.setStencilTest|supplied value]]. | ||
+ | * depth tests: the depth value of the drawn object at that pixel must be less than the existing depth value of that pixel. | ||
+ | ;lequal: | ||
+ | * stencil tests: the stencil value of the pixel must be less than or equal to the [[love.graphics.setStencilTest|supplied value]]. | ||
+ | * depth tests: the depth value of the drawn object at that pixel must be less than or equal to the existing depth value of that pixel. | ||
+ | ;gequal: | ||
+ | * stencil tests: the stencil value of the pixel must be greater than or equal to the [[love.graphics.setStencilTest|supplied value]]. | ||
+ | * depth tests: the depth value of the drawn object at that pixel must be greater than or equal to the existing depth value of that pixel. | ||
+ | ;greater: | ||
+ | * stencil tests: the stencil value of the pixel must be greater than the [[love.graphics.setStencilTest|supplied value]]. | ||
+ | * depth tests: the depth value of the drawn object at that pixel must be greater than the existing depth value of that pixel. | ||
+ | ;never: Objects will never be drawn. | ||
+ | ;always: Objects will always be drawn. Effectively disables the depth or stencil test. | ||
== See Also == | == See Also == | ||
* [[parent::love.graphics]] | * [[parent::love.graphics]] | ||
* [[love.graphics.setStencilTest]] | * [[love.graphics.setStencilTest]] | ||
* [[love.graphics.stencil]] | * [[love.graphics.stencil]] | ||
+ | * [[love.graphics.setDepthMode]] | ||
[[Category:Enums]] | [[Category:Enums]] | ||
− | {{#set:Description=Different types of [[love.graphics.setStencilTest|stencil test]] comparisons.}} | + | {{#set:Description=Different types of [[love.graphics.setStencilTest|stencil test]] and [[love.graphics.setDepthMode|depth test]] comparisons.}} |
== Other Languages == | == Other Languages == | ||
{{i18n|CompareMode}} | {{i18n|CompareMode}} |
Latest revision as of 23:43, 17 July 2019
Available since LÖVE 0.10.0 |
This enum is not supported in earlier versions. |
Different types of per-pixel stencil test and depth test comparisons. The pixels of an object will be drawn if the comparison succeeds, for each pixel that the object touches.
Constants
- equal
- stencil tests: the stencil value of the pixel must be equal to the supplied value.
- depth tests: the depth value of the drawn object at that pixel must be equal to the existing depth value of that pixel.
- notequal
- stencil tests: the stencil value of the pixel must not be equal to the supplied value.
- depth tests: the depth value of the drawn object at that pixel must not be equal to the existing depth value of that pixel.
- less
- stencil tests: the stencil value of the pixel must be less than the supplied value.
- depth tests: the depth value of the drawn object at that pixel must be less than the existing depth value of that pixel.
- lequal
- stencil tests: the stencil value of the pixel must be less than or equal to the supplied value.
- depth tests: the depth value of the drawn object at that pixel must be less than or equal to the existing depth value of that pixel.
- gequal
- stencil tests: the stencil value of the pixel must be greater than or equal to the supplied value.
- depth tests: the depth value of the drawn object at that pixel must be greater than or equal to the existing depth value of that pixel.
- greater
- stencil tests: the stencil value of the pixel must be greater than the supplied value.
- depth tests: the depth value of the drawn object at that pixel must be greater than the existing depth value of that pixel.
- never
- Objects will never be drawn.
- always
- Objects will always be drawn. Effectively disables the depth or stencil test.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info