Windows! Not really working!
This commit is contained in:
parent
9828409bb7
commit
62b4718ef4
1 changed files with 12 additions and 1 deletions
|
@ -22,8 +22,11 @@ package de.staropensource.sosengine.graphics.opengl.classes;
|
|||
import de.staropensource.sosengine.base.classes.Vec2i;
|
||||
import de.staropensource.sosengine.base.logging.LoggerInstance;
|
||||
import de.staropensource.sosengine.base.types.LogIssuer;
|
||||
import de.staropensource.sosengine.graphics.events.GraphicsApiErrorEvent;
|
||||
import lombok.Getter;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.lwjgl.opengl.GL;
|
||||
import org.lwjgl.system.MemoryUtil;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
@ -100,6 +103,14 @@ public class Window implements de.staropensource.sosengine.graphics.classes.Wind
|
|||
windowName = title;
|
||||
windowSize = size;
|
||||
|
||||
glfwCreateWindow(windowSize.getX(), windowSize.getY(), windowName, NULL, NULL);
|
||||
long windowId = glfwCreateWindow(windowSize.getX(), windowSize.getY(), windowName, NULL, NULL);
|
||||
if (windowId == NULL)
|
||||
new GraphicsApiErrorEvent().callEvent("Unable to create window: ID is null");
|
||||
|
||||
glfwMakeContextCurrent(windowId);
|
||||
glfwShowWindow(windowId);
|
||||
GL.createCapabilities();
|
||||
glfwSwapBuffers(windowId);
|
||||
glfwPollEvents();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue