Skip to content

Commit

Permalink
Move files around
Browse files Browse the repository at this point in the history
  • Loading branch information
SWinxy committed Dec 19, 2021
1 parent 0a81946 commit baac5eb
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
11 changes: 10 additions & 1 deletion src/org/lwjgl/vulkan/awt/AWT.java → src/org/lwjgl/awt/AWT.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package org.lwjgl.vulkan.awt;
package org.lwjgl.awt;

import org.lwjgl.system.MemoryStack;
import org.lwjgl.system.MemoryUtil;
import org.lwjgl.system.Platform;
import org.lwjgl.system.jawt.JAWT;
import org.lwjgl.system.jawt.JAWTDrawingSurface;
import org.lwjgl.system.jawt.JAWTDrawingSurfaceInfo;
Expand Down Expand Up @@ -92,6 +93,14 @@ public AWT(Component component) throws AWTException {
}
}

/**
* Checks if the platform is supported using lwjgl3-awt.
* This does not check for the minimum OS version.
*/
public static boolean isPlatformSupported() {
return Platform.get() == Platform.WINDOWS || Platform.get() == Platform.MACOSX || Platform.get() == Platform.LINUX;
}

/**
* Returns a pointer to a platform-specific struct with platform-specific information.
* <p>
Expand Down
8 changes: 0 additions & 8 deletions src/org/lwjgl/vulkan/awt/AWTVK.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@
*/
public class AWTVK {

/**
* Checks if the platform is supported using lwjgl3-awt.
* This does not check for the minimum OS version.
*/
public static boolean isPlatformSupported() {
return Platform.get() == Platform.WINDOWS || Platform.get() == Platform.MACOSX || Platform.get() == Platform.LINUX;
}

/**
* Gets the required surface extension for the platform.
* Also enable {@link org.lwjgl.vulkan.KHRSurface#VK_KHR_SURFACE_EXTENSION_NAME VK_KHR_SURFACE_EXTENSION_NAME}.
Expand Down
1 change: 1 addition & 0 deletions src/org/lwjgl/vulkan/awt/PlatformMacOSXVKCanvas.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.lwjgl.vulkan.awt;

import org.lwjgl.PointerBuffer;
import org.lwjgl.awt.AWT;
import org.lwjgl.system.JNI;
import org.lwjgl.system.Library;
import org.lwjgl.system.MemoryStack;
Expand Down
1 change: 1 addition & 0 deletions src/org/lwjgl/vulkan/awt/PlatformWin32VKCanvas.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.lwjgl.vulkan.awt;

import org.lwjgl.awt.AWT;
import org.lwjgl.system.MemoryStack;
import org.lwjgl.system.MemoryUtil;
import org.lwjgl.system.jawt.JAWTWin32DrawingSurfaceInfo;
Expand Down
1 change: 1 addition & 0 deletions src/org/lwjgl/vulkan/awt/PlatformX11VKCanvas.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.lwjgl.vulkan.awt;

import org.lwjgl.awt.AWT;
import org.lwjgl.system.MemoryStack;
import org.lwjgl.system.jawt.JAWTX11DrawingSurfaceInfo;
import org.lwjgl.vulkan.VkInstance;
Expand Down
3 changes: 2 additions & 1 deletion test/org/lwjgl/vulkan/awt/SimpleDemo.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.lwjgl.vulkan.awt;

import org.lwjgl.PointerBuffer;
import org.lwjgl.awt.AWT;
import org.lwjgl.system.MemoryStack;
import org.lwjgl.vulkan.KHRSurface;
import org.lwjgl.vulkan.VkApplicationInfo;
Expand Down Expand Up @@ -59,7 +60,7 @@ private static VkInstance createInstance() {
}

public static void main(String[] args) throws AWTException {
if (!AWTVK.isPlatformSupported()) {
if (!AWT.isPlatformSupported()) {
throw new RuntimeException("Platform not supported.");
}

Expand Down

0 comments on commit baac5eb

Please sign in to comment.