|
|
#1 |
|
Junior Member
Join Date: Apr 2005
Posts: 2
|
Winamp Plugin and opengl
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 |
|
|
|
|
|
#2 |
|
Banned
Join Date: Jan 2001
Location: Norway
Posts: 927
|
Set the waveformData member of the winampVisModule struct to 2.
Then use these for loops instead: code: If that is C you tried to show us, then you should rethink your choice of programming language. Please don't post such code except when you label it as pseudo-code. |
|
|
|
|
|
#3 | ||
|
Banned
|
Heh, saivert, you sound harsh. Just out of interest can you answer this.
Quote:
Quote:
Cheers |
||
|
|
|
|
|
#4 |
|
Banned
|
Holy Shit saivert, you're on a mission this morning.
|
|
|
|
|
|
#5 |
|
Banned
Join Date: Jan 2001
Location: Norway
Posts: 927
|
@Cummi Bare: Thanks for noticing all my replies this day. :-)
I wrote what I wrote because the code he posted below his questions was terrible. It did not look like real C code at all. And if it is, then I have to start reading those C/C++ programming books again (and again). I mean, what the h*** is this: code: You can't declare a function like that (void render3). It should be this: code: And he did not indent his either. Very hard to read then... |
|
|
|
|
|
#6 | ||
|
Banned
|
Quote:
Quote:
|
||
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|