• 大小: 780KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-24
  • 语言: Html/CSS
  • 标签: glfw  opengl  

资源简介

opengl工具glfw以及完整的使用说明文档,可以应用于多种操作系统 compile.ami config.log lib readme.html compile.bat docs images license.txt support compile.sh examples include Makefile

资源截图

代码片段和文件信息

/*****************************************************************************
 * title:   GLBoing
 * Desc:    Tribute to Amiga Boing.
 * Author:  Jim Brooks  
 *          Original Amiga authors were R.J. Mical and Dale Luck.
 *          GLFW conversion by Marcus Geelnard
 * Notes:   - 360‘ = 2*PI [radian]
 *
 *          - Distances between objects are created by doing a relative
 *            Z translations.
 *
 *          - Although OpenGL enticingly supports alpha-blending
 *            the shadow of the original Boing didn‘t affect the color
 *            of the grid.
 *
 *          - [Marcus] Changed timing scheme from interval driven to frame-
 *            time based animation steps (which results in much smoother
 *            movement)
 *
 * History of Amiga Boing:
 *
 * Boing was demonstrated on the prototype Amiga (codenamed “Lorraine“) in
 * 1985. According to legend it was written ad-hoc in one night by
 * R. J. Mical and Dale Luck. Because the bouncing ball animation was so fast
 * and smooth attendees did not believe the Amiga prototype was really doing
 * the rendering. Suspecting a trick they began looking around the booth for
 * a hidden computer or VCR.
 *****************************************************************************/

/************************************************************************
 * $Id: boing.cv 1.3 2003/05/23 22:12:45 marcus256 Exp $
 ************************************************************************/

#include 
#include 
#include 


/*****************************************************************************
 * Various declarations and macros
 *****************************************************************************/

/* Prototypes */
void init( void );
void display( void );
void GLFWCALL reshape( int w int h );
void DrawBoingBall( void );
void BounceBall( double dt );
void DrawBoingBallBand( GLfloat long_lo GLfloat long_hi );
void DrawGrid( void );

#define RADIUS           70.0
#define STEP_LONGITUDE   22.5                   /* 22.5 makes 8 bands like original Boing */
#define STEP_LATITUDE    22.5

#define DIST_BALL       (RADIUS * 2.0 + RADIUS * 0.1)

#define VIEW_SCENE_DIST (DIST_BALL * 3.0+ 200.0)/* distance from viewer to middle of boing area */
#define GRID_SIZE       (RADIUS * 4.5)          /* length (width) of grid */
#define BOUNCE_HEIGHT   (RADIUS * 2.1)
#define BOUNCE_WIDTH    (RADIUS * 2.1)

#define SHADOW_OFFSET_X -20.0
#define SHADOW_OFFSET_Y  10.0
#define SHADOW_OFFSET_Z   0.0

#define WALL_L_OFFSET   0.0
#define WALL_R_OFFSET   5.0

/* Animation speed (50.0 mimics the original GLUT demo speed) */
#define ANIMATION_SPEED 50.0

/* Maximum allowed delta time per physics iteration */
#define MAX_DELTA_T 0.02

/* Draw ball or its shadow */
typedef enum { DRAW_BALL DRAW_BALL_SHADOW } DRAW_BALL_ENUM;

/* Vertex type */
typedef struct {float x; float y; float z;} vertex_t;

/* Global vars */
GLfloat deg_rot_y       = 0.0;

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件         908  2005-03-14 21:45  license.txt
     目录           0  2005-04-15 21:39  examples\
     文件        1228  2004-08-01 17:59  examples\MakeBundle.sh
     文件        1827  2004-04-12 21:53  examples\Makefile.amigaos.gcc
     文件        1807  2003-02-02 23:28  examples\Makefile.amigaos.vbcc
     文件        2009  2003-11-26 21:54  examples\Makefile.dos.djgpp
     文件        3722  2004-08-01 17:59  examples\Makefile.macosx.gcc
     文件        2232  2003-02-02 23:28  examples\Makefile.win32.bcc
     文件        2227  2003-02-02 23:28  examples\Makefile.win32.cygwin
     文件        2230  2003-02-02 23:28  examples\Makefile.win32.lcc
     文件        2222  2003-02-02 23:28  examples\Makefile.win32.mgw
     文件        2248  2003-02-02 23:28  examples\Makefile.win32.msvc
     文件        2371  2003-05-23 23:59  examples\Makefile.win32.ow
     文件        2293  2004-04-05 22:20  examples\Makefile.win32.pellesc
     文件        1116  2003-01-31 23:54  examples\Makefile.x11.in
     文件       17425  2003-05-24 00:12  examples\boing.c
     文件        9817  2003-02-02 23:34  examples\gears.c
     文件        6349  2003-02-02 23:34  examples\keytest.c
     文件        1545  2003-02-02 23:34  examples\listmodes.c
     文件        4056  2004-02-25 23:36  examples\mipmaps.c
     文件       66322  2003-01-31 23:55  examples\mipmaps.tga
     文件        9282  2003-12-09 22:38  examples\mtbench.c
     文件        1375  2003-02-02 23:34  examples\mthello.c
     文件       38714  2004-04-12 21:52  examples\particles.c
     文件       22809  2004-04-05 22:22  examples\pong3d.c
     文件       17816  2003-01-31 23:55  examples\pong3d_field.tga
     文件       21279  2003-01-31 23:55  examples\pong3d_instr.tga
     文件        1835  2003-01-31 23:55  examples\pong3d_menu.tga
     文件      106516  2003-01-31 23:56  examples\pong3d_title.tga
     文件         861  2003-01-31 23:56  examples\pong3d_winner1.tga
     文件         891  2003-01-31 23:56  examples\pong3d_winner2.tga
............此处省略159个文件信息

评论

共有 条评论