remove window decorations from integration testing
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
31d8a579b4
commit
67700fdb47
@ -223,6 +223,7 @@ public class Globals {
|
|||||||
|
|
||||||
public static int WINDOW_WIDTH = 1920;
|
public static int WINDOW_WIDTH = 1920;
|
||||||
public static int WINDOW_HEIGHT = 1080;
|
public static int WINDOW_HEIGHT = 1080;
|
||||||
|
public static boolean WINDOW_DECORATED = true; //used to control whether the window is created with decorations or not (ie for testing)
|
||||||
|
|
||||||
//title bar dimensions
|
//title bar dimensions
|
||||||
public static int WINDOW_TITLE_BAR_HEIGHT = 0;
|
public static int WINDOW_TITLE_BAR_HEIGHT = 0;
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package electrosphere.renderer;
|
|||||||
import static electrosphere.renderer.RenderUtils.createScreenTextureVAO;
|
import static electrosphere.renderer.RenderUtils.createScreenTextureVAO;
|
||||||
import static org.lwjgl.glfw.GLFW.GLFW_CONTEXT_VERSION_MAJOR;
|
import static org.lwjgl.glfw.GLFW.GLFW_CONTEXT_VERSION_MAJOR;
|
||||||
import static org.lwjgl.glfw.GLFW.GLFW_CONTEXT_VERSION_MINOR;
|
import static org.lwjgl.glfw.GLFW.GLFW_CONTEXT_VERSION_MINOR;
|
||||||
|
import static org.lwjgl.glfw.GLFW.GLFW_FALSE;
|
||||||
import static org.lwjgl.glfw.GLFW.GLFW_OPENGL_CORE_PROFILE;
|
import static org.lwjgl.glfw.GLFW.GLFW_OPENGL_CORE_PROFILE;
|
||||||
import static org.lwjgl.glfw.GLFW.GLFW_OPENGL_PROFILE;
|
import static org.lwjgl.glfw.GLFW.GLFW_OPENGL_PROFILE;
|
||||||
import static org.lwjgl.glfw.GLFW.glfwCreateWindow;
|
import static org.lwjgl.glfw.GLFW.glfwCreateWindow;
|
||||||
@ -236,6 +237,9 @@ public class RenderingEngine {
|
|||||||
if(Globals.RUN_HIDDEN){
|
if(Globals.RUN_HIDDEN){
|
||||||
glfwWindowHint(GLFW.GLFW_VISIBLE, GLFW.GLFW_FALSE);
|
glfwWindowHint(GLFW.GLFW_VISIBLE, GLFW.GLFW_FALSE);
|
||||||
}
|
}
|
||||||
|
if(!Globals.WINDOW_DECORATED){
|
||||||
|
glfwWindowHint(GLFW.GLFW_DECORATED, GLFW_FALSE);
|
||||||
|
}
|
||||||
// glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE); Allows you to make the background transparent
|
// glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE); Allows you to make the background transparent
|
||||||
// glfwWindowHint(GLFW_OPACITY, 23);
|
// glfwWindowHint(GLFW_OPACITY, 23);
|
||||||
//Creates the window reference object
|
//Creates the window reference object
|
||||||
|
|||||||
@ -13,18 +13,14 @@ import testutils.TestRenderingUtils;
|
|||||||
* A test class that involves testing renders
|
* A test class that involves testing renders
|
||||||
*/
|
*/
|
||||||
public abstract class RenderingTestTemplate {
|
public abstract class RenderingTestTemplate {
|
||||||
|
|
||||||
public static final int DEFAULT_WINDOW_WIDTH = 1920;
|
|
||||||
public static final int DEFAULT_WINDOW_HEIGHT = 1080;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the engine
|
* Initializes the engine
|
||||||
*/
|
*/
|
||||||
@IntegrationSetup
|
@IntegrationSetup
|
||||||
public void initEngine(){
|
public void initEngine(){
|
||||||
|
Globals.WINDOW_DECORATED = false;
|
||||||
TestEngineUtils.initGraphicalEngine();
|
TestEngineUtils.initGraphicalEngine();
|
||||||
Globals.WINDOW_WIDTH = DEFAULT_WINDOW_WIDTH;
|
|
||||||
Globals.WINDOW_HEIGHT = DEFAULT_WINDOW_HEIGHT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 20 KiB |
Loading…
Reference in New Issue
Block a user