Sort methods in OpenGlSubsystem
This commit is contained in:
parent
311de39899
commit
7962a15c12
1 changed files with 26 additions and 26 deletions
|
@ -139,6 +139,32 @@ public final class OpenGlSubsystem implements ApiMainClass {
|
||||||
logger.info("Initialized Graphics API in " + initTime + "ms");
|
logger.info("Initialized Graphics API in " + initTime + "ms");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shuts the graphics subsystem down.
|
||||||
|
*
|
||||||
|
* @since v1-alpha0
|
||||||
|
*/
|
||||||
|
public static void shutdownApi() {
|
||||||
|
LoggerInstance logger = instance.logger;
|
||||||
|
logger.verb("Shutting down");
|
||||||
|
|
||||||
|
@SuppressWarnings("resource")
|
||||||
|
long shutdownTime = Miscellaneous.measureExecutionTime(() -> {
|
||||||
|
glfwTerminate();
|
||||||
|
//noinspection DataFlowIssue
|
||||||
|
glfwSetErrorCallback(null).free();
|
||||||
|
});
|
||||||
|
|
||||||
|
logger.info("Shut down in " + shutdownTime + "ms");
|
||||||
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
|
@NotNull
|
||||||
|
@Override
|
||||||
|
public DependencyVector getDependencyVector() {
|
||||||
|
return new DependencyVector("opengl", StarOpenSourceVersioningSystem.class, EngineInformation.getVersioningString());
|
||||||
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public String getApiName() {
|
public String getApiName() {
|
||||||
|
@ -183,30 +209,4 @@ public final class OpenGlSubsystem implements ApiMainClass {
|
||||||
public static void onGraphicsApiError(String error) {
|
public static void onGraphicsApiError(String error) {
|
||||||
instance.logger.error("Graphics API returned an error: " + error);
|
instance.logger.error("Graphics API returned an error: " + error);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Shuts the graphics subsystem down.
|
|
||||||
*
|
|
||||||
* @since v1-alpha0
|
|
||||||
*/
|
|
||||||
public static void shutdownApi() {
|
|
||||||
LoggerInstance logger = instance.logger;
|
|
||||||
logger.verb("Shutting down");
|
|
||||||
|
|
||||||
@SuppressWarnings("resource")
|
|
||||||
long shutdownTime = Miscellaneous.measureExecutionTime(() -> {
|
|
||||||
glfwTerminate();
|
|
||||||
//noinspection DataFlowIssue
|
|
||||||
glfwSetErrorCallback(null).free();
|
|
||||||
});
|
|
||||||
|
|
||||||
logger.info("Shut down in " + shutdownTime + "ms");
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public DependencyVector getDependencyVector() {
|
|
||||||
return new DependencyVector("opengl", StarOpenSourceVersioningSystem.class, EngineInformation.getVersioningString());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue