]> Some of my projects - openlase-old.git/commitdiff
simulator: scale point/linesize with window size
authorHector Martin <hector@marcansoft.com>
Tue, 18 Jan 2011 02:14:21 +0000 (03:14 +0100)
committerHector Martin <hector@marcansoft.com>
Tue, 18 Jan 2011 02:15:52 +0000 (03:15 +0100)
tools/simulator.c

index e655dbf467ab16af0b6ee784a0b1d79cd5913b7b..924887ba53b89a9b0cf63ca2a1f647b04a91aac1 100644 (file)
@@ -53,6 +53,8 @@ bufsample_t buffer[BUF_SAMPLES];
 
 int buf_widx = 0;
 
+float psize = 2;
+
 static int process (nframes_t nframes, void *arg)
 {
        sample_t *i_x = (sample_t *) jack_port_get_buffer (in_x, nframes);
@@ -118,8 +120,8 @@ void draw_gl(void)
        fno++;
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
        glLoadIdentity();
-       glLineWidth(2);
-       glPointSize(2);
+       glLineWidth(psize);
+       glPointSize(psize);
 
        // horrid workaround for recordmydesktop/libtheora brokenness
 #if 0
@@ -211,6 +213,7 @@ void resize_gl(int width, int height)
        glLoadIdentity();
        glOrtho (-1, 1, -1, 1, -1, 1);
        glMatrixMode(GL_MODELVIEW);
+       psize = min/350.0;
 }
 
 void init_gl(int width, int height)