OPENGL中的GLUT源代码


OPENGL下的GLUT源代码
资源截图
代码片段和文件信息

/* Copyright (c) Mark J. Kilgard 1994. */

/* This program is freely distributable without licensing fees
   and is provided without guarantee or warrantee expressed or
   implied. This program is -not- in the public domain. */

#ifndef WRAPPERS_ONLY

#include 

extern int __Argc;
extern char **__Argv;

static GLUTmenuStateFCB fortranMenuStateFunc;

void
glutnull_(void)
{
}

void
glutinit_(void)
{
  glutInit(&__Argc __Argv);
}

static void
fortranMenuStateWrapper(int value)
{
  fortranMenuStateFunc(&value);
}

static void
fortranReshapeWrapper(int w int h)
{
  (*__glutCurrentWindow->freshape) (&w &h);
}

#if 0  /* XXX No IRIX joystick support for now. */
static void
fortranJoystickWrapper(unsigned int button int x int y int z)
{
  (*__glutCurrentWindow->fjoystick) (&button &x &y &z);
}
#endif

static void
fortranKeyboardWrapper(unsigned char ch int x int y)
{
  int chi = ch;

  (*__glutCurrentWindow->fkeyboard) (&chi &x &y);
}

static void
fortranKeyboardUpWrapper(unsigned char ch int x int y)
{
  int chi = ch;

  (*__glutCurrentWindow->fkeyboardUp) (&chi &x &y);
}

static void
fortranMouseWrapper(int btn int state int x int y)
{
  (*__glutCurrentWindow->fmouse) (&btn &state &x &y);
}

static void
fortranMotionWrapper(int x int y)
{
  (*__glutCurrentWindow->fmotion) (&x &y);
}

static void
fortranPassiveMotionWrapper(int x int y)
{
  (*__glutCurrentWindow->fpassive) (&x &y);
}

static void
fortranEntryWrapper(int state)
{
  (*__glutCurrentWindow->fentry) (&state);
}

static void
fortranVisibilityWrapper(int state)
{
  (*__glutCurrentWindow->fvisibility) (&state);
}

static void
fortranTimerWrapper(int value)
{
  /* Relies on special knowledge that __glutTimerList points to 
     the GLUTtimer* currently being processed! */
  (*__glutTimerList->ffunc) (&value);
}

static void
fortranSelectWrapper(int value)
{
  (*__glutItemSelected->menu->fselect) (&value);
}

static void
fortranSpecialWrapper(int key int x int y)
{
  (*__glutCurrentWindow->fspecial) (&key &x &y);
}

static void
fortranSpecialUpWrapper(int key int x int y)
{
  (*__glutCurrentWindow->fspecialUp) (&key &x &y);
}

static void
fortranSpaceballMotionWrapper(int x int y int z)
{
  (*__glutCurrentWindow->fspaceMotion) (&x &y &z);
}

static void
fortranSpaceballRotateWrapper(int x int y int z)
{
  (*__glutCurrentWindow->fspaceRotate) (&x &y &z);
}

static void
fortranSpaceballButtonWrapper(int button int state)
{
  (*__glutCurrentWindow->fspaceButton) (&button &state);
}

static void
fortranTabletMotionWrapper(int x int y)
{
  (*__glutCurrentWindow->ftabletMotion) (&x &y);
}

static void
fortranTabletButtonWrapper(int button int state int x int y)
{
  (*__glutCurrentWindow->ftabletButton) (&button &state &x &y);
}

static void
fortranDialsWrapper(int dial int value)
{
  (*_

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2001-11-08 09:42  glut-3.7.6
     目录           0  2001-10-19 03:26  glut-3.7.6adainclude
     目录           0  2001-10-19 03:26  glut-3.7.6adaincludeGL
     文件        4208  1999-02-08 20:11  glut-3.7.6adaincludeGLglut.adb
     文件       34502  1999-02-08 20:11  glut-3.7.6adaincludeGLglut.ads
     文件        1465  1999-02-08 20:11  glut-3.7.6adaincludeGLMakefile.sgi
     文件         243  1999-02-08 20:11  glut-3.7.6adaincludeMakefile.sgi
     文件       40020  1999-02-11 00:42  glut-3.7.6CHANGES
     文件       36988  1999-02-08 20:11  glut-3.7.6FAQ.glut
     文件        8254  2000-12-12 08:02  glut-3.7.6Glut.cf
     文件         546  2000-12-13 05:18  glut-3.7.6glut.dsw
     文件        1409  1999-02-08 20:11  glut-3.7.6glutdefs
     文件         517  1999-02-08 20:11  glut-3.7.6IAFA-PACKAGE
     文件         122  1998-08-12 19:55  glut-3.7.6Imakefile
     目录           0  2001-10-19 03:26  glut-3.7.6include
     目录           0  2001-10-19 03:26  glut-3.7.6includeGL
     文件       62175  1999-02-08 20:11  glut-3.7.6includeGLfgl.h
     文件        7483  1999-02-08 20:11  glut-3.7.6includeGLfglu.h
     文件       10473  1999-02-08 20:11  glut-3.7.6includeGLfglut.h
     文件        5287  1999-02-08 20:11  glut-3.7.6includeGLglsmap.h
     文件       27670  2000-12-13 07:22  glut-3.7.6includeGLglut.h
     文件        4190  1999-02-16 17:55  glut-3.7.6includeGLglutf90.h
     文件        9119  2000-12-13 06:07  glut-3.7.6includeGL ube.h
     目录           0  2001-10-19 03:26  glut-3.7.6includemui
     文件        2254  1999-02-08 20:11  glut-3.7.6includemuirowser.h
     文件        2677  1999-02-08 20:11  glut-3.7.6includemuidisplaylist.h
     文件        7781  1999-02-08 20:11  glut-3.7.6includemuigizmo.h
     文件        2090  1999-02-08 20:11  glut-3.7.6includemuihslider.h
     文件        6057  1999-02-08 20:11  glut-3.7.6includemuimui.h
     文件        2042  1999-02-08 20:11  glut-3.7.6includemui extlist.h
     文件        2560  1999-02-08 20:11  glut-3.7.6includemuiuicolor.h
............此处省略1514个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)