Commit 3249f812 authored by Camilla Berglund's avatar Camilla Berglund
Browse files

Initial import of 2.7 Lite.

parent efef33c7
# - Check if X11 RandR extension is available
# Check if the X11 extension RandR is available.
# This macro defines :
# - X11_RANDR_FOUND, If set to NO RandR is not available.
# - X11_RANDR_INCLUDE_DIR, includes directory containing the RandR header.
# - X11_RANDR_LIBRARIES, libraries to link in the library to use RandR.
#
# Created by Olivier Delannoy.
macro(CHECK_X11_XRANDR)
message(STATUS "Checking for X11 extension XRandR")
set(X11_XRANDR_FOUND "NO")
find_path(X11_XRANDR_INCLUDE_DIR "X11/extensions/Xrandr.h"
PATHS
/usr/local/include
/usr/local/X11/include
/usr/local/X11R6/include
/usr/include
/usr/X11/include
/usr/X11R6/include)
find_library(X11_XRANDR_LIBRARIES NAMES Xrandr
PATHS
/usr/local/lib
/usr/local/X11/lib
/usr/local/X11R6/lib
/usr/lib
/usr/X11/lib
/usr/X11R6/lib)
# Create check if file compiles with randr
if (X11_XRANDR_LIBRARIES AND X11_XRANDR_INCLUDE_DIR)
set(X11_XRANDR_FOUND "YES")
endif (X11_XRANDR_LIBRARIES AND X11_XRANDR_INCLUDE_DIR)
if (X11_XRANDR_FOUND)
message(STATUS "Checking for X11 extension XRandR -- found")
else (X11_XRANDR_FOUND)
message(STATUS "Checking for X11 extension XRandR -- not found")
endif (X11_XRANDR_FOUND)
mark_as_advanced(X11_XRANDR_LIBRARIES X11_XRANDR_INCLUDE_DIR)
endmacro(CHECK_X11_XRANDR)
# - Check if X11 VidMod extension is available
# Check if the X11 extension VidMod is available.
# This macro defines :
# - X11_VIDMOD_FOUND, If set to NO VidMod is not available.
# - X11_VIDMOD_INCLUDE_DIR, includes directory containing the headers.
# - X11_VIDMOD_LIBRARIES, libraries to link in the libraries.
#
# Created by Olivier Delannoy.
macro(CHECK_X11_XF86VIDMODE)
message(STATUS "Checking for X11 extension xf86vidmode")
set(X11_XF86VIDMODE_FOUND "NO")
find_path(X11_XF86VIDMODE_INCLUDE_DIR "X11/extensions/xf86vmode.h"
PATHS
/usr/local/include
/usr/local/X11/include
/usr/local/X11R6/include
/usr/include
/usr/X11/include
/usr/X11R6/include)
find_library(X11_XF86VIDMODE_LIBRARIES NAMES Xxf86vm PATHS
/usr/local/lib
/usr/local/X11/lib
/usr/local/X11R6/lib
/usr/lib
/usr/X11/lib
/usr/X11R6/lib)
# Add a test case here
if (X11_XF86VIDMODE_LIBRARIES AND X11_XF86VIDMODE_INCLUDE_DIR)
set(X11_XF86VIDMODE_FOUND "YES")
endif (X11_XF86VIDMODE_LIBRARIES AND X11_XF86VIDMODE_INCLUDE_DIR)
if (X11_XF86VIDMODE_FOUND)
message(STATUS "Checking for X11 extension xf86vidmode -- found")
else (X11_XF86VIDMODE_FOUND)
message(STATUS "Checking for X11 extension xf86vidmode -- not found")
endif(X11_XF86VIDMODE_FOUND)
mark_as_advanced(
X11_XF86VIDMODE_LIBRARIES
X11_XF86VIDMODE_INCLUDE_DIR
)
endmacro(CHECK_X11_XF86VIDMODE)
project(GLFW C)
set(GLFW_VERSION_MAJOR "2")
set(GLFW_VERSION_MINOR "7")
set(GLFW_VERSION_PATCH "0")
set(GLFW_VERSION_EXTRA "")
set(GLFW_VERSION "${GLFW_VERSION_MAJOR}.${GLFW_VERSION_MINOR}")
set(GLFW_VERSION_FULL
"${GLFW_VERSION}.${GLFW_VERSION_PATCH}${GLFW_VERSION_EXTRA}")
cmake_minimum_required(VERSION 2.4)
include(CheckFunctionExists)
include(CheckSymbolExists)
# Stuff common to all platform
find_package(OpenGL REQUIRED)
set(common_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/lib/enable.c
${CMAKE_CURRENT_SOURCE_DIR}/lib/fullscreen.c
${CMAKE_CURRENT_SOURCE_DIR}/lib/glext.c
${CMAKE_CURRENT_SOURCE_DIR}/lib/init.c
${CMAKE_CURRENT_SOURCE_DIR}/lib/input.c
${CMAKE_CURRENT_SOURCE_DIR}/lib/joystick.c
${CMAKE_CURRENT_SOURCE_DIR}/lib/time.c
${CMAKE_CURRENT_SOURCE_DIR}/lib/window.c
)
# Stuff specific to WGL on Win32
if (WIN32)
message(STATUS "Building GLFW for WGL on a Win32 system")
# Set up library and include paths
set(CMAKE_REQUIRED_LIBRARIES ${OPENGL_gl_LIBRARY})
list(APPEND GLFW_INCLUDE_DIR ${OPENGL_INCLUDE_DIR})
list(APPEND GLFW_LIBRARIES ${OPENGL_gl_LIBRARY})
# Select platform specific code
add_subdirectory(lib/win32)
endif (WIN32)
# Stuff specific to GLX on Unix-like platforms
if (UNIX AND NOT APPLE AND NOT CYGWIN)
message(STATUS "Building GLFW for GLX on a Unix-like system")
# Set up library and include paths
set(CMAKE_REQUIRED_LIBRARIES ${X11_X11_LIB} ${OPENGL_gl_LIBRARY})
list(APPEND GLFW_INCLUDE_DIR ${X11_X11_INCLUDE_PATH})
list(APPEND GLFW_LIBRARIES ${X11_X11_LIB})
list(APPEND GLFW_INCLUDE_DIR ${OPENGL_INCLUDE_DIR})
list(APPEND GLFW_LIBRARIES ${OPENGL_gl_LIBRARY})
# Detect X11 extension
include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckX11Extensions.cmake)
# Check for XRandR (modern resolution switching extension)
CHECK_X11_XRANDR()
if (X11_XRANDR_FOUND)
set(_GLFW_HAS_XRANDR 1)
list(APPEND GLFW_INCLUDE_DIR ${X11_XRANDR_INCLUDE_DIR})
list(APPEND GLFW_LIBRARIES ${X11_XRANDR_LIBRARIES})
endif(X11_XRANDR_FOUND)
# Check for xf86vidmode (fallback legacy resolution switching extension)
if (NOT X11_XRANDR_FOUND)
CHECK_X11_XF86VIDMODE()
if (X11_XF86VIDMODE_FOUND)
set(_GLFW_HAS_XF86VIDMODE 1)
list(APPEND GLFW_INCLUDE_DIR ${X11_XF86VIDMODE_INCLUDE_DIR})
list(APPEND GLFW_LIBRARIES ${X11_XF86VIDMODE_LIBRARIES})
endif(X11_XF86VIDMODE_FOUND)
endif (NOT X11_XRANDR_FOUND)
CHECK_FUNCTION_EXISTS(glXGetProcAddress _GLFW_HAS_GLXGETPROCADDRESS)
if (NOT _GLFW_HAS_GLXGETPROCADDRESS)
CHECK_FUNCTION_EXISTS(glXGetProcAddressARB _GLFW_HAS_GLXGETPROCADDRESSARB)
endif (NOT _GLFW_HAS_GLXGETPROCADDRESS)
if (NOT _GLFW_HAS_GLXGETPROCADDRESS AND NOT _GLFW_HAS_GLXGETPROCADDRESSARB)
CHECK_FUNCTION_EXISTS(glXGetProcAddressEXT _GLFW_HAS_GLXGETPROCADDRESSEXT)
endif (NOT _GLFW_HAS_GLXGETPROCADDRESS AND NOT _GLFW_HAS_GLXGETPROCADDRESSARB)
if (NOT _GLFW_HAS_GLXGETPROCADDRESS AND
NOT _GLFW_HAS_GLXGETPROCADDRESSARB AND
NOT _GLFW_HAS_GLXGETPROCADDRESSEXT)
message(WARNING "No glXGetProcAddressXXX variant found")
endif (NOT _GLFW_HAS_GLXGETPROCADDRESS AND
NOT _GLFW_HAS_GLXGETPROCADDRESSARB AND
NOT _GLFW_HAS_GLXGETPROCADDRESSEXT)
# Select platform specific code
add_subdirectory(lib/x11)
endif(UNIX AND NOT APPLE AND NOT CYGWIN)
# Stuff specific to AGL and CGL on Mac OS X
if (UNIX AND APPLE)
message(STATUS "Building GLFW for NSOpenGL on Mac OS X")
# Universal build, decent set of warning flags...
set(CMAKE_OSX_ARCHITECTURES ppc;i386;ppc64;x86_64)
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
set(CMAKE_C_FLAGS "-mmacosx-version-min=10.5 -Wall -Wextra -Wno-unused-parameter -Werror")
# Set up library and include paths
find_library(COCOA_FRAMEWORK Cocoa)
list(APPEND GLFW_LIBRARIES ${COCOA_FRAMEWORK})
list(APPEND GLFW_LIBRARIES ${OPENGL_gl_LIBRARY})
# Select platform specific code
add_subdirectory(lib/cocoa)
endif(UNIX AND APPLE)
add_subdirectory(examples)
add_subdirectory(tests)
#add_subdirectory(docs/doxygen)
#add_subdirectory(docs/manuals)
#--------------------------------------------------------------------
# -- Install standard files
#--------------------------------------------------------------------
# Install the GLFW header file
install(DIRECTORY include/ DESTINATION include
PATTERN ".svn" EXCLUDE
PATTERN "include/*"
)
# Install documentation
install(
FILES
COPYING.txt
readme.html
DESTINATION
share/doc/glfw-${GLFW_VERSION_FULL}/
)
#--------------------------------------------------------------------
# -- Additional stuff
#--------------------------------------------------------------------
#--------------------------------------------------------------------
# -- Documentation generation
#--------------------------------------------------------------------
#include("${CMAKE_CURRENT_SOURCE_DIR}/documentation.cmake")
#configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
# "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile"
# IMMEDIATE @ONLY)
#add_doxygen_target("${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
#add_subdirectory(docs)
#--------------------------------------------------------------------
# -- Uninstall operation
# -------------------------------------------------------------------
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
"${CMAKE_COMMAND}" -P
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
Copyright (c) 2002-2007 Camilla Berglund <elmindreda@users.sourceforge.net>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would
be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not
be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
STRING(REGEX REPLACE "\n" ";" files "${files}")
FOREACH(file ${files})
MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
IF(EXISTS "$ENV{DESTDIR}${file}")
EXEC_PROGRAM(
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
)
IF(NOT "${rm_retval}" STREQUAL 0)
MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
ENDIF(NOT "${rm_retval}" STREQUAL 0)
ELSE(EXISTS "$ENV{DESTDIR}${file}")
MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
ENDIF(EXISTS "$ENV{DESTDIR}${file}")
ENDFOREACH(file)
##########################################################################
# Makefile for the GLFW documentation.
##########################################################################
PDFDOCS = glfwrm.pdf glfwug.pdf
DVIDOCS = glfwrm.dvi glfwug.dvi
##########################################################################
# Build macros
##########################################################################
default: pdf
pdf: $(PDFDOCS)
dvi: $(DVIDOCS)
##########################################################################
# Clean macros
##########################################################################
clean:
rm -f glfwrm.dvi glfwrm.aux glfwrm.log glfwrm.out glfwrm.pdf glfwrm.toc glfwrm.lot
rm -f glfwug.dvi glfwug.aux glfwug.log glfwug.out glfwug.pdf glfwug.toc
clean-win:
@.\\cleanup.bat
##########################################################################
# Rules for building the GLFW Reference Manual
##########################################################################
glfwrm.pdf: glfwrm.tex glfwrm.toc glfwrm.lot glfwdoc.sty
pdflatex glfwrm.tex
glfwrm.dvi: glfwrm.tex glfwrm.toc glfwrm.lot glfwdoc.sty
latex glfwrm.tex
glfwrm.toc: glfwrm.tex glfwdoc.sty
latex glfwrm.tex
glfwrm.lot: glfwrm.tex glfwdoc.sty
latex glfwrm.tex
##########################################################################
# Rules for building the GLFW Users Guide
##########################################################################
glfwug.pdf: glfwug.tex glfwug.toc glfwdoc.sty
pdflatex glfwug.tex
glfwug.dvi: glfwug.tex glfwug.toc glfwdoc.sty
latex glfwug.tex
glfwug.toc: glfwug.tex glfwdoc.sty
latex glfwug.tex
@echo off
REM ----------------------------------------------------------------------
REM Windows cleanup batch file for the GLFW documentation.
REM ----------------------------------------------------------------------
REM GLFW Reference Manual
if exist glfwrm.dvi del glfwrm.dvi
if exist glfwrm.aux del glfwrm.aux
if exist glfwrm.log del glfwrm.log
if exist glfwrm.out del glfwrm.out
if exist glfwrm.pdf del glfwrm.pdf
if exist glfwrm.toc del glfwrm.toc
if exist glfwrm.lot del glfwrm.lot
REM GLFW Users Guide
if exist glfwug.dvi del glfwug.dvi
if exist glfwug.aux del glfwug.aux
if exist glfwug.log del glfwug.log
if exist glfwug.out del glfwug.out
if exist glfwug.pdf del glfwug.pdf
if exist glfwug.toc del glfwug.toc
%-------------------------------------------------------------------------
% Common document formatting and macros for GLFW manuals
%-------------------------------------------------------------------------
% Misc. document info
\date{\today}
% Packages
\usepackage{fancyhdr}
\usepackage{titling}
\usepackage{lastpage}
\usepackage{listings}
\usepackage{color}
\usepackage[overload]{textcase}
\usepackage{needspace}
\usepackage{times}
% Logo macros
\newcommand{\OpenGL}[1][0]{\textbf{OpenGL}\texttrademark}
\newcommand{\GLFW}[1][0]{\textbf{GLFW}}
% Encoding
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
% Page formatting
\usepackage[hmargin=2.5cm]{geometry}
\raggedright
\raggedbottom
\sloppy
\usepackage{parskip}
% Header and footer
\pagestyle{fancy}
%\lhead{\textit{GLFW Reference Manual}}
\lhead{\textit{GLFW \glfwdoctype}}
\chead{API version \glfwapiver}
\rhead{Page \thepage/\pageref{LastPage}}
\lfoot{}
\cfoot{}
\rfoot{}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.0pt}
% Titlepage
\newcommand{\glfwmaketitle}{\begin{titlepage}\ \\%
\begin{center}%
\vspace{7.0cm}{\Huge\textbf{GLFW}}\\%
\rule{10.0cm}{0.5pt}\\%
\vspace{0.5cm}{\LARGE\textbf{\glfwdoctype}}\\%
\vspace{0.8cm}{\large\textbf{API version \glfwapiver}}\\%
\textit{\today}\\%
\vspace{1.5cm}\textbf{\textcopyright2002-2007 Camilla Berglund}\\%
\end{center}\end{titlepage}\newpage}
% Colors
\definecolor{code}{rgb}{0.9,0.9,1.0}
\definecolor{link}{rgb}{0.6,0.0,0.0}
\definecolor{codeA}{rgb}{0.9,1.0,0.9}
\definecolor{codeB}{rgb}{1.0,0.9,0.9}
% Code listings
\lstset{frame=single,frameround=tttt,backgroundcolor=\color{code},%
language=C,basicstyle={\ttfamily},%
breaklines,breakindent=0pt,postbreak=\space\space\space\space}
% A simple hack for keeping lines together
\newenvironment{mysamepage}[1][2]{\begin{samepage}\needspace{#1\baselineskip}}{\end{samepage}}
% Macros for automating function reference entries
\newenvironment{refparameters}[1][0]{\begin{mysamepage}\textbf{Parameters}\\}{\end{mysamepage}\bigskip}
\newenvironment{refreturn}[1][0]{\begin{mysamepage}\textbf{Return values}\\}{\end{mysamepage}\bigskip}
\newenvironment{refdescription}[1][0]{\begin{mysamepage}\textbf{Description}\\}{\end{mysamepage}\bigskip}
\newenvironment{refnotes}[1][0]{\begin{mysamepage}\textbf{Notes}\\}{\end{mysamepage}\bigskip}
% hyperref (bookmarks, links etc) - use this package last
\usepackage[colorlinks=true,linkcolor=link,bookmarks=true,bookmarksopen=true,%
pdfhighlight=/N,bookmarksnumbered=true,bookmarksopenlevel=1,%
pdfview=FitH,pdfstartview=FitH]{hyperref}
This diff is collapsed.
This diff is collapsed.
Introduction
------------
The GLFW documentation is written in LaTeX. Besides being powerful, LaTeX is
also very attractive since all the necessary tools for dealing with LaTeX
documentation are both free and ported to a wide variety of platforms. Another
advantage is that the LaTeX files are written in plain text, which means that
version control systems such as CVS handle them perfectly without having to
treat the documents as binary files.
The documents
-------------
There are two main documents:
glfwrm.tex - The GLFW Reference Manual
glfwug.tex - The GLFW Users Guide
In addition, there is a common LaTeX style file that sets up things
such as page formatting and useful macros:
glfwdoc.sty - Common GLFW document styles and macros
Requirements
------------
Of course you need LaTeX installed on your system in order to compile the GLFW
documentation. If you are using a Unix-like operating system, then your
package system most likely has a version of LaTeX adapted for your system. If
not, the easiest way to get a full LaTeX system is to download/get the TeXLive
CD from http://www.tug.org/texlive/. It has all the necessary software for
Windows, Mac OS X and most popular Unix-like operating systems.
A number of LaTeX packages have to be installed in order to compile the
GLFW documentation successfully:
color
fancyhdr
hyperref
lastpage
listings
needspace
textcase
times
titling
These packages are all available on the TeXLive CD. Just make sure that
you have checked all these packages when installing TeXLive, or get them
in some other way if you do not have the TeXLive CD.
# This line is used to link with static libraries
# Note that the library list should be updated to be obtained from
# the main CMakeLists.txt
link_libraries(libglfwStatic ${GLFW_LIBRARIES} ${OPENGL_glu_LIBRARY})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../include ${OPENGL_INCLUDE_DIR})
add_executable(listmodes listmodes.c)
if(APPLE)
# Set fancy names for bundles
add_executable(Boing MACOSX_BUNDLE boing.c)
add_executable(Gears MACOSX_BUNDLE gears.c)
add_executable("Split View" MACOSX_BUNDLE splitview.c)
add_executable(Triangle MACOSX_BUNDLE triangle.c)
add_executable(Wave MACOSX_BUNDLE wave.c)
else(APPLE)
# Set boring names for executables
add_executable(boing WIN32 boing.c)
add_executable(gears WIN32 gears.c)
add_executable(splitview WIN32 splitview.c)
add_executable(triangle WIN32 triangle.c)
add_executable(wave WIN32 wave.c)
endif(APPLE)
if(MSVC)
# Tell MSVC to use main instead of WinMain for Windows subsystem executables
set_target_properties(boing gears splitview triangle wave PROPERTIES LINK_FLAGS "/ENTRY:mainCRTStartup")
endif(MSVC)
if(CYGWIN)
# Set cross-compile and subsystem compile and link flags
set_target_properties(boing gears listmodes splitview triangle wave PROPERTIES COMPILE_FLAGS "-mno-cygwin")
set_target_properties(boing gears splitview triangle wave PROPERTIES LINK_FLAGS "-mno-cygwin -mwindows")
set_target_properties(listmodes PROPERTIES LINK_FLAGS "-mno-cygwin -mconsole")
endif(CYGWIN)
/*****************************************************************************
* Title: GLBoing
* Desc: Tribute to Amiga Boing.
* Author: Jim Brooks <gfx@jimbrooks.org>
* 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.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/glfw.h>
/*****************************************************************************
* Various declarations and macros
*****************************************************************************/
/* Prototypes */
void init( void );
void display( void );
void 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.f
#define STEP_LONGITUDE 22.5f /* 22.5 makes 8 bands like original Boing */
#define STEP_LATITUDE 22.5f
#define DIST_BALL (RADIUS * 2.f + RADIUS * 0.1f)
#define VIEW_SCENE_DIST (DIST_BALL * 3.f + 200.f)/* distance from viewer to middle of boing area */
#define GRID_SIZE (RADIUS * 4.5f) /* length (width) of grid */
#define BOUNCE_HEIGHT (RADIUS * 2.1f)
#define BOUNCE_WIDTH (RADIUS * 2.1f)
#define SHADOW_OFFSET_X -20.f
#define SHADOW_OFFSET_Y 10.f
#define SHADOW_OFFSET_Z 0.f
#define WALL_L_OFFSET 0.f
#define WALL_R_OFFSET 5.f
/* Animation speed (50.0 mimics the original GLUT demo speed) */
#define ANIMATION_SPEED 50.f
/* Maximum allowed delta time per physics iteration */
#define MAX_DELTA_T 0.02f
/* 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.f;
GLfloat deg_rot_y_inc = 2.f;
GLfloat ball_x = -RADIUS;
GLfloat ball_y = -RADIUS;