logo       


libraries/libopengl-dylan/examples/glu-test .cvsignore, NONE, 1.1 Makefile,: msg#00113

Subject: libraries/libopengl-dylan/examples/glu-test .cvsignore, NONE, 1.1 Makefile, NONE, 1.1 glu-test-exports.dylan, NONE, 1.1 glu-test.dylan, NONE, 1.1 glu-test.lid, NONE, 1.1
Update of /var/lib/cvs/libraries/libopengl-dylan/examples/glu-test
In directory cantor:/tmp/cvs-serv19147

Added Files:
        .cvsignore Makefile glu-test-exports.dylan glu-test.dylan 
        glu-test.lid 
Log Message:
bug: 6994
little test program to ensure GLU constants aren't broken.  draws a spinning 
wireframe sphere.


--- NEW FILE: .cvsignore ---
.libs
cc-glu-test-files.mak
glu-test
*.c

--- NEW FILE: Makefile ---
glu-test: glu-test.lid glu-test.dylan glu-test-exports.dylan
        d2c -L../.. glu-test.lid

clean:
        -rm -f *.o *.s *.a *.c *.mak *~ glu-test
        -rm -rf .libs

--- NEW FILE: glu-test-exports.dylan ---
module: dylan-user

define library glu-test
  use dylan;
  use streams;
  use format;
  use print;
  use standard-io;
  use garbage-collection;
  use transcendental;
  use opengl;
end library;

define module glu-test
  use dylan;
  use extensions;
  use system;
  use streams;
  use format;
  use print;
  use standard-io;
  use transcendental;
  use garbage-collection;

  use opengl;
  use opengl-glu;
  use opengl-glut;
end module;

--- NEW FILE: glu-test.dylan ---
module: glu-test
synopsis: 
author: 
copyright: 

define constant $PI = 3.141592654;

define constant $ROTATION-SPEED = 2;

define variable angle = 0.0;
define variable last-frame-time = 0.0;

define variable draw :: <function> = callback-method() => ();
  glClear($GL-COLOR-BUFFER-BIT + $GL-DEPTH-BUFFER-BIT);

  let now = glutGet($GLUT-ELAPSED-TIME);
  let dt = as(<GLdouble>, now - last-frame-time) / 1000.0;
  last-frame-time := now;

  angle := angle + ($ROTATION-SPEED * dt);
  if (angle > (2.0 * $PI))
    angle := angle - (2.0 * $PI);
  end if;

  glLoadIdentity();
  gluLookAt(5.0 * cos(angle), 0.0, 5.0 * sin(angle),
            0.0, 0.0, 0.0,
            0.0, 1.0, 0.0);

  let sphere = gluNewQuadric();
  gluQuadricDrawStyle(sphere, $GLU-LINE);
  gluSphere(sphere, 1.0, 32, 16);
  gluDeleteQuadric(sphere);
  
  glutSwapBuffers();
end;

define variable reshape :: <function> =
        callback-method(width :: <integer>, height :: <integer> ) => ();
  let aspect = as(<GLdouble>, width) / as(<GLdouble>, height);
        
  glViewport(0, 0, width, height);
  glMatrixMode($GL-PROJECTION);
  glLoadIdentity();
  gluPerspective(45.0, aspect, 1.0, 100.0);
  glMatrixMode($GL-MODELVIEW);
end;

define variable idle :: <function> =
        callback-method() => ();
  glutPostRedisplay();
end;

begin
  glut-init();
  glutInitDisplayMode($GLUT-RGB + $GLUT-DEPTH + $GLUT-DOUBLE);

  glutInitWindowPosition(0, 0);
  glutInitWindowSize(300, 300);
  glutCreateWindow("GLU Quadric Test");

  glutDisplayFunc(draw);
  glutReshapeFunc(reshape);
  glutIdleFunc(idle);

  glutMainLoop();
end;

--- NEW FILE: glu-test.lid ---
library: glu-test
executable: glu-test
files: glu-test-exports
  glu-test



!DSPAM:408baa51194243120412016!



_______________________________________________
Gd-chatter mailing list
Gd-chatter@xxxxxxxxxxxxxxxx
http://www.gwydiondylan.org/mailman/listinfo/gd-chatter



Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
Search:
Java, servers, webhosting, windows, cisco ...
more...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe