Quote:
Originally Posted by Plover
Contained is a readme, and a launcher script. The version in this zip is for the original, client, so replace that function I previously posted to get it working on the new one.
I do realize the drawing code (and how I'm getting time, etc) ought to be made more efficient, but it's good enough for now.
http://markhamlin.net/tempfiles/libploverfps_1.zip
Usage: Launch RO using the "plauncher" (cleverly stands for ploverlauncher - i know, who would've guessed). Press ] to increase max-fps, and [ to decrease max-fps. You should see a graphic indicating what the current max(target) fps is.
|
this is quite nice, just what I have been looking for - but it doesn't compile on my kubuntu 9.10
what gcc version are you using?
Code:
plover.c:1:2: warning: #import is a deprecated GCC extension
In file included from plover.c:1:
plover.h:7:2: warning: #import is a deprecated GCC extension
In file included from plover.h:7,
from plover.c:1:
plovergraphics.h:1:2: warning: #import is a deprecated GCC extension
plovergraphics.h:3:19: error: GL/gl.h: No such file or directory
plovergraphics.h:4:20: error: GL/glx.h: No such file or directory
plovergraphics.h:5:21: error: GL/glut.h: No such file or directory
plovergraphics.c:1:2: warning: #import is a deprecated GCC extension
In file included from plovergraphics.c:1:
plovergraphics.h:1:2: warning: #import is a deprecated GCC extension
In file included from plovergraphics.h:1,
from plovergraphics.c:1:
plover.h:7:2: warning: #import is a deprecated GCC extension
In file included from plovergraphics.c:1:
plovergraphics.h:3:19: error: GL/gl.h: No such file or directory
plovergraphics.h:4:20: error: GL/glx.h: No such file or directory
plovergraphics.h:5:21: error: GL/glut.h: No such file or directory
plovergraphics.c:3: error: expected ‘)’ before ‘base’
plovergraphics.c:4: error: expected declaration specifiers or ‘...’ before ‘GLuint’
plovergraphics.c:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘font_base’
plovergraphics.c:48: error: expected declaration specifiers or ‘...’ before ‘GLXDrawable’
plovergraphics.c: In function ‘glXSwapBuffers’:
plovergraphics.c:69: warning: implicit declaration of function ‘glMatrixMode’
plovergraphics.c:69: error: ‘GL_MODELVIEW’ undeclared (first use in this function)
plovergraphics.c:69: error: (Each undeclared identifier is reported only once
plovergraphics.c:69: error: for each function it appears in.)
plovergraphics.c:70: warning: implicit declaration of function ‘glPushMatrix’
plovergraphics.c:72: warning: implicit declaration of function ‘glDisable’
plovergraphics.c:72: error: ‘GL_LIGHTING’ undeclared (first use in this function)
plovergraphics.c:73: error: ‘GL_TEXTURE_2D’ undeclared (first use in this function)
plovergraphics.c:74: warning: implicit declaration of function ‘glShadeModel’
plovergraphics.c:74: error: ‘GL_SMOOTH’ undeclared (first use in this function)
plovergraphics.c:75: warning: implicit declaration of function ‘glEnable’
plovergraphics.c:75: error: ‘GL_LINE_SMOOTH’ undeclared (first use in this function)
plovergraphics.c:76: warning: implicit declaration of function ‘glHint’
plovergraphics.c:76: error: ‘GL_LINE_SMOOTH_HINT’ undeclared (first use in this function)
plovergraphics.c:76: error: ‘GL_NICEST’ undeclared (first use in this function)
plovergraphics.c:77: error: ‘GL_BLEND’ undeclared (first use in this function)
plovergraphics.c:78: warning: implicit declaration of function ‘glBlendFunc’
plovergraphics.c:78: error: ‘GL_SRC_ALPHA’ undeclared (first use in this function)
plovergraphics.c:78: error: ‘GL_ONE_MINUS_SRC_ALPHA’ undeclared (first use in this function)
plovergraphics.c:80: warning: implicit declaration of function ‘glLoadIdentity’
plovergraphics.c:81: warning: implicit declaration of function ‘glOrtho’
plovergraphics.c:82: warning: implicit declaration of function ‘glTranslatef’
plovergraphics.c:92: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘upArrow’
plovergraphics.c:92: error: ‘upArrow’ undeclared (first use in this function)
plovergraphics.c:92: error: expected expression before ‘]’ token
plovergraphics.c:110: warning: implicit declaration of function ‘glScalef’
plovergraphics.c:112: warning: implicit declaration of function ‘glColor4f’
plovergraphics.c:113: warning: implicit declaration of function ‘glBegin’
plovergraphics.c:113: error: ‘GL_TRIANGLES’ undeclared (first use in this function)
plovergraphics.c:115: warning: implicit declaration of function ‘glVertex2f’
plovergraphics.c:116: warning: implicit declaration of function ‘glEnd’
plovergraphics.c:118: warning: implicit declaration of function ‘glPopMatrix’
plovergraphics.c:150: warning: implicit declaration of function ‘glRasterPos2f’
plovergraphics.c:152: warning: implicit declaration of function ‘print_string’
plovergraphics.c:152: error: ‘font_base’ undeclared (first use in this function)
plovergraphics.c:166: error: ‘drawable’ undeclared (first use in this function)
plovergraphics.c: At top level:
plovergraphics.c:208: error: expected ‘)’ before ‘base’
plovergraphics.c:222: error: expected declaration specifiers or ‘...’ before ‘GLuint’
plovergraphics.c: In function ‘init_font’:
plovergraphics.c:238: warning: implicit declaration of function ‘glXUseXFont’
plovergraphics.c:238: error: ‘base’ undeclared (first use in this function)
plovergraphics.c: In function ‘font_init’:
plovergraphics.c:244: error: ‘font_base’ undeclared (first use in this function)
plovergraphics.c:244: warning: implicit declaration of function ‘glGenLists’
plovergraphics.c:245: warning: implicit declaration of function ‘glIsList’
plovergraphics.c:250: error: too many arguments to function ‘init_font’
I can do a makefile for this once I know all the requirements?