MCPcopy Index your code
hub / github.com/processing/processing / hint

Method hint

core/src/processing/opengl/PGraphicsOpenGL.java:1844–1904  ·  view source on GitHub ↗
(int which)

Source from the content-addressed store, hash-verified

1842
1843
1844 @Override
1845 public void hint(int which) {
1846 boolean oldValue = hints[PApplet.abs(which)];
1847 super.hint(which);
1848 boolean newValue = hints[PApplet.abs(which)];
1849
1850 if (oldValue == newValue) {
1851 return;
1852 }
1853
1854 if (which == DISABLE_DEPTH_TEST) {
1855 flush();
1856 pgl.disable(PGL.DEPTH_TEST);
1857 } else if (which == ENABLE_DEPTH_TEST) {
1858 flush();
1859 pgl.enable(PGL.DEPTH_TEST);
1860 } else if (which == DISABLE_DEPTH_MASK) {
1861 flush();
1862 pgl.depthMask(false);
1863 } else if (which == ENABLE_DEPTH_MASK) {
1864 flush();
1865 pgl.depthMask(true);
1866 } else if (which == ENABLE_OPTIMIZED_STROKE) {
1867 flush();
1868 setFlushMode(FLUSH_WHEN_FULL);
1869 } else if (which == DISABLE_OPTIMIZED_STROKE) {
1870 if (is2D()) {
1871 PGraphics.showWarning("Optimized strokes can only be disabled in 3D");
1872 } else {
1873 flush();
1874 setFlushMode(FLUSH_CONTINUOUSLY);
1875 }
1876 } else if (which == DISABLE_STROKE_PERSPECTIVE) {
1877 if (0 < tessGeo.lineVertexCount && 0 < tessGeo.lineIndexCount) {
1878 // We flush the geometry using the previous line setting.
1879 flush();
1880 }
1881 } else if (which == ENABLE_STROKE_PERSPECTIVE) {
1882 if (0 < tessGeo.lineVertexCount && 0 < tessGeo.lineIndexCount) {
1883 // We flush the geometry using the previous line setting.
1884 flush();
1885 }
1886 } else if (which == ENABLE_DEPTH_SORT) {
1887 if (is3D()) {
1888 flush();
1889 if (sorter == null) sorter = new DepthSorter(this);
1890 isDepthSortingEnabled = true;
1891 } else {
1892 PGraphics.showWarning("Depth sorting can only be enabled in 3D");
1893 }
1894 } else if (which == DISABLE_DEPTH_SORT) {
1895 if (is3D()) {
1896 flush();
1897 isDepthSortingEnabled = false;
1898 }
1899 } else if (which == ENABLE_BUFFER_READING) {
1900 restartPGL();
1901 } else if (which == DISABLE_BUFFER_READING) {

Callers

nothing calls this directly

Calls 10

absMethod · 0.95
flushMethod · 0.95
setFlushModeMethod · 0.95
showWarningMethod · 0.95
restartPGLMethod · 0.95
disableMethod · 0.45
enableMethod · 0.45
depthMaskMethod · 0.45
is2DMethod · 0.45
is3DMethod · 0.45

Tested by

no test coverage detected