summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2018-03-17 20:16:40 +0100
committerChristoph Helma <helma@in-silico.ch>2018-03-17 20:16:40 +0100
commitc5e99b5257dd46c90805ca43881b4665a240b986 (patch)
treea27590d23b60dcd04f016ffddebddf13b87d4b81 /sv.c
parent1d789e63e8004eaa4755d549c316ba5df32eef58 (diff)
first complete version
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c13
1 files changed, 7 insertions, 6 deletions
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 {