3
#define WIN32_LEAN_AND_MEAN
12
#include <plib/pw.h> // This needs to be before <plib/pu.h>
17
fprintf ( stderr, "Exiting.\n" ) ;
23
void rsFunc ( int w, int h )
25
fprintf ( stderr, "Resized to %d x %d\n", w, h ) ;
29
void mpFunc ( int x, int y )
35
void msFunc ( int button, int updn, int x, int y )
37
puMouse ( button, updn, x, y ) ;
41
void kbFunc ( int key, int updn, int x, int y )
43
puKeyboard ( key, updn, x, y ) ;
47
void button_cb ( puObject * )
49
fprintf ( stderr, "Hello World.\n" ) ;
53
int main ( int, char ** )
55
pwInit ( 100, 100, 640, 480, false, "PLIB Window Demo", true, 0 ) ;
58
puOneShot *b = new puOneShot ( 50, 50, 200, 80 ) ;
60
b -> setLegend ( "Say Hello" ) ;
61
b -> setCallback ( button_cb ) ;
63
pwSetCallbacks ( kbFunc, msFunc, mpFunc, rsFunc, exFunc ) ;
66
glClearColor ( 0.5, 0.1, 0.1, 1.0 ) ;
67
glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) ;