(String location)
| 1881 | } |
| 1882 | |
| 1883 | public static int checkGLError(String location) |
| 1884 | { |
| 1885 | int i = GlStateManager.glGetError(); |
| 1886 | |
| 1887 | if (i != 0 && GlErrors.isEnabled(i)) |
| 1888 | { |
| 1889 | String s = Config.getGlErrorString(i); |
| 1890 | String s1 = getErrorInfo(i, location); |
| 1891 | String s2 = String.format("OpenGL error: %s (%s)%s, at: %s", new Object[] {Integer.valueOf(i), s, s1, location}); |
| 1892 | SMCLog.severe(s2); |
| 1893 | |
| 1894 | if (Config.isShowGlErrors() && TimedEvent.isActive("ShowGlErrorShaders", 10000L)) |
| 1895 | { |
| 1896 | String s3 = I18n.format("of.message.openglError", new Object[] {Integer.valueOf(i), s}); |
| 1897 | printChat(s3); |
| 1898 | } |
| 1899 | } |
| 1900 | |
| 1901 | return i; |
| 1902 | } |
| 1903 | |
| 1904 | private static String getErrorInfo(int errorCode, String location) |
| 1905 | { |
no test coverage detected