From c5e99b5257dd46c90805ca43881b4665a240b986 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Sat, 17 Mar 2018 20:16:40 +0100 Subject: first complete version --- sv.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'sv.c') diff --git a/sv.c b/sv.c index 11b6b0c..7cdfa20 100644 --- a/sv.c +++ b/sv.c @@ -18,8 +18,6 @@ int width = 1918; int height = 1078; -//int width = 800; -//int height = 640; GLFWwindow* window; GLuint vertex; GLuint fragment; @@ -175,10 +173,10 @@ void readImage(int i) { glBindTexture(GL_TEXTURE_2D,images[i].id); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); - //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT); + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT); //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels); @@ -260,6 +258,9 @@ int main(int argc, char **argv) { glfwInit(); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4); glfwWindowHint(GLFW_DECORATED, GL_FALSE); + const GLFWvidmode * mode = glfwGetVideoMode(glfwGetPrimaryMonitor()); + width = mode->width; + height = mode->height; if (fullscreen) { window = glfwCreateWindow(width,height, "", glfwGetPrimaryMonitor(), NULL); } else { -- cgit v1.2.3