galactic_fox
27th April 2005, 00:15
Hi guys
I'm newbie when it comes to winamp. I've downloaded the sdk off of the site. I managed to get a glut window and some opengl working. However I can't seem to get the data spectrum or wave data. When I plot them as a line I get a stationary line not a moving wave. here's my basis setup maybe you tell me what I'm doing wrong.
-create a glut window config_getinifn()
-I copy the this_mod(the pointer) to a global pointer
- I also call glutDisplayFunc(render3);,
glutIdleFunc(render3);, glutMainLoop(); there too
void render3
-int x, y;
float i;
glClear(GL_COLOR_BUFFER_BIT);
glClearColor(0.0, 0.0, 0.0, 1.0);
glColor3f(0,1,0);
glLineWidth(2.0);
glBegin(GL_LINES);
for(y=1;y<256;y=y++)
{
for(x=1;x<288;x++)
{
i=globalpointer->waveformData[y][x];
glVertex2i(x,i);
}
}
glEnd();
glutSwapBuffers(); //printf("{%d %d} {%d %d} \n", results->x,results->y,results->x1,results->y1);
return 0;
any suggestions would be great help I've been stuck on this for a long time
thanks in advance
I'm newbie when it comes to winamp. I've downloaded the sdk off of the site. I managed to get a glut window and some opengl working. However I can't seem to get the data spectrum or wave data. When I plot them as a line I get a stationary line not a moving wave. here's my basis setup maybe you tell me what I'm doing wrong.
-create a glut window config_getinifn()
-I copy the this_mod(the pointer) to a global pointer
- I also call glutDisplayFunc(render3);,
glutIdleFunc(render3);, glutMainLoop(); there too
void render3
-int x, y;
float i;
glClear(GL_COLOR_BUFFER_BIT);
glClearColor(0.0, 0.0, 0.0, 1.0);
glColor3f(0,1,0);
glLineWidth(2.0);
glBegin(GL_LINES);
for(y=1;y<256;y=y++)
{
for(x=1;x<288;x++)
{
i=globalpointer->waveformData[y][x];
glVertex2i(x,i);
}
}
glEnd();
glutSwapBuffers(); //printf("{%d %d} {%d %d} \n", results->x,results->y,results->x1,results->y1);
return 0;
any suggestions would be great help I've been stuck on this for a long time
thanks in advance