Init Commit
This commit is contained in:
commit
1d922f7322
|
@ -0,0 +1,10 @@
|
|||
# gl2gx
|
||||
OpenGL wrapper for GX on WII or Gamecube
|
||||
|
||||
![gl2gx logo](../resources/images/gl2gx.png)
|
||||
|
||||
Development is currently on hold until a new maintainer is found
|
||||
|
||||
Read the [Wiki](../../wiki) for documentation and resources.
|
||||
|
||||
License: [GNU Lesser GPL](http://www.gnu.org/licenses/lgpl.html)
|
|
@ -0,0 +1,213 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?>
|
||||
|
||||
<cproject>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="0.342302047">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.342302047" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="libgl2gx" buildProperties="" description="" id="0.342302047" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
|
||||
<folderInfo id="0.342302047." name="/" resourcePath="">
|
||||
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1394898670" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
|
||||
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.1394898670.1669059223" name=""/>
|
||||
<builder id="org.eclipse.cdt.build.core.settings.default.builder.963251417" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1280173406" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.372710093" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.206151283" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
</tool>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.106503323" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1438232585" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
</tool>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.839093497" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1360910942" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="include"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="source"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<scannerConfigBuildInfo instanceId="0.342302047">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="libgl2gx.null.790480666" name="libgl2gx"/>
|
||||
</storageModule>
|
||||
</cproject>
|
|
@ -0,0 +1,77 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>libgl2gx</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||
<value>clean</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>?name?</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||
<value>make</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.contents</key>
|
||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,96 @@
|
|||
#---------------------------------------------------------------------------------
|
||||
.SUFFIXES:
|
||||
#---------------------------------------------------------------------------------
|
||||
ifeq ($(strip $(DEVKITPRO)),)
|
||||
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro")
|
||||
endif
|
||||
|
||||
export TOPDIR := $(CURDIR)
|
||||
|
||||
export DATESTRING := $(shell date +%Y)$(shell date +%m)$(shell date +%d)
|
||||
|
||||
default: release
|
||||
|
||||
all: release dist
|
||||
|
||||
release: cube-release wii-release
|
||||
|
||||
ogc-release: cube-release wii-release
|
||||
|
||||
nds-release:
|
||||
$(MAKE) -C nds BUILD=release
|
||||
|
||||
gba-release:
|
||||
$(MAKE) -C gba BUILD=release
|
||||
|
||||
cube-release:
|
||||
$(MAKE) -C libogc PLATFORM=cube BUILD=cube_release
|
||||
|
||||
wii-release:
|
||||
$(MAKE) -C libogc PLATFORM=wii BUILD=wii_release
|
||||
|
||||
debug: nds-debug gba-debug cube-debug wii-debug
|
||||
|
||||
ogc-debug: cube-debug wii-debug
|
||||
|
||||
nds-debug:
|
||||
$(MAKE) -C nds BUILD=debug
|
||||
|
||||
gba-debug:
|
||||
$(MAKE) -C gba BUILD=debug
|
||||
|
||||
|
||||
cube-debug:
|
||||
$(MAKE) -C libogc PLATFORM=cube BUILD=wii_debug
|
||||
|
||||
wii-debug:
|
||||
$(MAKE) -C libogc PLATFORM=wii BUILD=cube_debug
|
||||
|
||||
clean: ogc-clean
|
||||
|
||||
nds-clean:
|
||||
$(MAKE) -C nds clean
|
||||
|
||||
gba-clean:
|
||||
$(MAKE) -C gba clean
|
||||
|
||||
ogc-clean:
|
||||
$(MAKE) -C libogc clean
|
||||
|
||||
dist-bin: ogc-dist-bin
|
||||
|
||||
nds-dist-bin: nds-release distribute/$(DATESTRING)
|
||||
$(MAKE) -C nds dist-bin
|
||||
|
||||
gba-dist-bin: gba-release distribute/$(DATESTRING)
|
||||
$(MAKE) -C gba dist-bin
|
||||
|
||||
ogc-dist-bin: ogc-release distribute/$(DATESTRING)
|
||||
$(MAKE) -C libogc dist-bin
|
||||
|
||||
dist-src: distribute/$(DATESTRING)
|
||||
@tar --exclude=*CVS* -cvjf distribute/$(DATESTRING)/gl2gx-src-$(DATESTRING).tar.bz2 \
|
||||
source include Makefile \
|
||||
libogc/Makefile \
|
||||
libogc/include/GL/gl.h \
|
||||
libogc/include/GL/glu.h \
|
||||
libogc/include/GL/glut.h \
|
||||
libogc/include/GL/glext.h
|
||||
|
||||
|
||||
dist: dist-bin dist-src
|
||||
|
||||
distribute/$(DATESTRING):
|
||||
@[ -d $@ ] || mkdir -p $@
|
||||
|
||||
|
||||
install: ogc-install
|
||||
|
||||
nds-install: nds-release
|
||||
make -C nds install
|
||||
|
||||
gba-install: gba-release
|
||||
make -C gba install
|
||||
|
||||
ogc-install: cube-release wii-release
|
||||
make -C libogc install
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,348 @@
|
|||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
** Software License B, Version 1.1 (the "License"), the contents of this
|
||||
** file are subject only to the provisions of the License. You may not use
|
||||
** this file except in compliance with the License. You may obtain a copy
|
||||
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
|
||||
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
|
||||
**
|
||||
** http://oss.sgi.com/projects/FreeB
|
||||
**
|
||||
** Note that, as provided in the License, the Software is distributed on an
|
||||
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
|
||||
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
|
||||
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
|
||||
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||
**
|
||||
** Original Code. The Original Code is: OpenGL Sample Implementation,
|
||||
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
|
||||
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
|
||||
** Copyright in any portions created by third parties is as indicated
|
||||
** elsewhere herein. All Rights Reserved.
|
||||
**
|
||||
** Additional Notice Provisions: This software was created using the
|
||||
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
|
||||
** not been independently verified as being compliant with the OpenGL(R)
|
||||
** version 1.2.1 Specification.
|
||||
*/
|
||||
|
||||
#ifndef __glu_h__
|
||||
#define __glu_h__
|
||||
|
||||
#if defined(USE_MGL_NAMESPACE)
|
||||
#include "glu_mangle.h"
|
||||
#endif
|
||||
|
||||
#include <GL/gl.h>
|
||||
|
||||
#ifndef GLAPIENTRY
|
||||
#define GLAPIENTRY
|
||||
#endif
|
||||
|
||||
#ifndef GLAPIENTRYP
|
||||
#define GLAPIENTRYP GLAPIENTRY *
|
||||
#endif
|
||||
|
||||
#if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
|
||||
# undef GLAPI
|
||||
# define GLAPI __declspec(dllexport)
|
||||
#elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL)
|
||||
/* tag specifying we're building for DLL runtime support */
|
||||
# undef GLAPI
|
||||
# define GLAPI __declspec(dllimport)
|
||||
#elif !defined(GLAPI)
|
||||
/* for use with static link lib build of Win32 edition only */
|
||||
# define GLAPI extern
|
||||
#endif /* _STATIC_MESA support */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
/* Extensions */
|
||||
#define GLU_EXT_object_space_tess 1
|
||||
#define GLU_EXT_nurbs_tessellator 1
|
||||
|
||||
/* Boolean */
|
||||
#define GLU_FALSE 0
|
||||
#define GLU_TRUE 1
|
||||
|
||||
/* Version */
|
||||
#define GLU_VERSION_1_1 1
|
||||
#define GLU_VERSION_1_2 1
|
||||
#define GLU_VERSION_1_3 1
|
||||
|
||||
/* StringName */
|
||||
#define GLU_VERSION 100800
|
||||
#define GLU_EXTENSIONS 100801
|
||||
|
||||
/* ErrorCode */
|
||||
#define GLU_INVALID_ENUM 100900
|
||||
#define GLU_INVALID_VALUE 100901
|
||||
#define GLU_OUT_OF_MEMORY 100902
|
||||
#define GLU_INCOMPATIBLE_GL_VERSION 100903
|
||||
#define GLU_INVALID_OPERATION 100904
|
||||
|
||||
/* NurbsDisplay */
|
||||
/* GLU_FILL */
|
||||
#define GLU_OUTLINE_POLYGON 100240
|
||||
#define GLU_OUTLINE_PATCH 100241
|
||||
|
||||
/* NurbsCallback */
|
||||
#define GLU_NURBS_ERROR 100103
|
||||
#define GLU_ERROR 100103
|
||||
#define GLU_NURBS_BEGIN 100164
|
||||
#define GLU_NURBS_BEGIN_EXT 100164
|
||||
#define GLU_NURBS_VERTEX 100165
|
||||
#define GLU_NURBS_VERTEX_EXT 100165
|
||||
#define GLU_NURBS_NORMAL 100166
|
||||
#define GLU_NURBS_NORMAL_EXT 100166
|
||||
#define GLU_NURBS_COLOR 100167
|
||||
#define GLU_NURBS_COLOR_EXT 100167
|
||||
#define GLU_NURBS_TEXTURE_COORD 100168
|
||||
#define GLU_NURBS_TEX_COORD_EXT 100168
|
||||
#define GLU_NURBS_END 100169
|
||||
#define GLU_NURBS_END_EXT 100169
|
||||
#define GLU_NURBS_BEGIN_DATA 100170
|
||||
#define GLU_NURBS_BEGIN_DATA_EXT 100170
|
||||
#define GLU_NURBS_VERTEX_DATA 100171
|
||||
#define GLU_NURBS_VERTEX_DATA_EXT 100171
|
||||
#define GLU_NURBS_NORMAL_DATA 100172
|
||||
#define GLU_NURBS_NORMAL_DATA_EXT 100172
|
||||
#define GLU_NURBS_COLOR_DATA 100173
|
||||
#define GLU_NURBS_COLOR_DATA_EXT 100173
|
||||
#define GLU_NURBS_TEXTURE_COORD_DATA 100174
|
||||
#define GLU_NURBS_TEX_COORD_DATA_EXT 100174
|
||||
#define GLU_NURBS_END_DATA 100175
|
||||
#define GLU_NURBS_END_DATA_EXT 100175
|
||||
|
||||
/* NurbsError */
|
||||
#define GLU_NURBS_ERROR1 100251
|
||||
#define GLU_NURBS_ERROR2 100252
|
||||
#define GLU_NURBS_ERROR3 100253
|
||||
#define GLU_NURBS_ERROR4 100254
|
||||
#define GLU_NURBS_ERROR5 100255
|
||||
#define GLU_NURBS_ERROR6 100256
|
||||
#define GLU_NURBS_ERROR7 100257
|
||||
#define GLU_NURBS_ERROR8 100258
|
||||
#define GLU_NURBS_ERROR9 100259
|
||||
#define GLU_NURBS_ERROR10 100260
|
||||
#define GLU_NURBS_ERROR11 100261
|
||||
#define GLU_NURBS_ERROR12 100262
|
||||
#define GLU_NURBS_ERROR13 100263
|
||||
#define GLU_NURBS_ERROR14 100264
|
||||
#define GLU_NURBS_ERROR15 100265
|
||||
#define GLU_NURBS_ERROR16 100266
|
||||
#define GLU_NURBS_ERROR17 100267
|
||||
#define GLU_NURBS_ERROR18 100268
|
||||
#define GLU_NURBS_ERROR19 100269
|
||||
#define GLU_NURBS_ERROR20 100270
|
||||
#define GLU_NURBS_ERROR21 100271
|
||||
#define GLU_NURBS_ERROR22 100272
|
||||
#define GLU_NURBS_ERROR23 100273
|
||||
#define GLU_NURBS_ERROR24 100274
|
||||
#define GLU_NURBS_ERROR25 100275
|
||||
#define GLU_NURBS_ERROR26 100276
|
||||
#define GLU_NURBS_ERROR27 100277
|
||||
#define GLU_NURBS_ERROR28 100278
|
||||
#define GLU_NURBS_ERROR29 100279
|
||||
#define GLU_NURBS_ERROR30 100280
|
||||
#define GLU_NURBS_ERROR31 100281
|
||||
#define GLU_NURBS_ERROR32 100282
|
||||
#define GLU_NURBS_ERROR33 100283
|
||||
#define GLU_NURBS_ERROR34 100284
|
||||
#define GLU_NURBS_ERROR35 100285
|
||||
#define GLU_NURBS_ERROR36 100286
|
||||
#define GLU_NURBS_ERROR37 100287
|
||||
|
||||
/* NurbsProperty */
|
||||
#define GLU_AUTO_LOAD_MATRIX 100200
|
||||
#define GLU_CULLING 100201
|
||||
#define GLU_SAMPLING_TOLERANCE 100203
|
||||
#define GLU_DISPLAY_MODE 100204
|
||||
#define GLU_PARAMETRIC_TOLERANCE 100202
|
||||
#define GLU_SAMPLING_METHOD 100205
|
||||
#define GLU_U_STEP 100206
|
||||
#define GLU_V_STEP 100207
|
||||
#define GLU_NURBS_MODE 100160
|
||||
#define GLU_NURBS_MODE_EXT 100160
|
||||
#define GLU_NURBS_TESSELLATOR 100161
|
||||
#define GLU_NURBS_TESSELLATOR_EXT 100161
|
||||
#define GLU_NURBS_RENDERER 100162
|
||||
#define GLU_NURBS_RENDERER_EXT 100162
|
||||
|
||||
/* NurbsSampling */
|
||||
#define GLU_OBJECT_PARAMETRIC_ERROR 100208
|
||||
#define GLU_OBJECT_PARAMETRIC_ERROR_EXT 100208
|
||||
#define GLU_OBJECT_PATH_LENGTH 100209
|
||||
#define GLU_OBJECT_PATH_LENGTH_EXT 100209
|
||||
#define GLU_PATH_LENGTH 100215
|
||||
#define GLU_PARAMETRIC_ERROR 100216
|
||||
#define GLU_DOMAIN_DISTANCE 100217
|
||||
|
||||
/* NurbsTrim */
|
||||
#define GLU_MAP1_TRIM_2 100210
|
||||
#define GLU_MAP1_TRIM_3 100211
|
||||
|
||||
/* QuadricDrawStyle */
|
||||
#define GLU_POINT 100010
|
||||
#define GLU_LINE 100011
|
||||
#define GLU_FILL 100012
|
||||
#define GLU_SILHOUETTE 100013
|
||||
|
||||
/* QuadricCallback */
|
||||
/* GLU_ERROR */
|
||||
|
||||
/* QuadricNormal */
|
||||
#define GLU_SMOOTH 100000
|
||||
#define GLU_FLAT 100001
|
||||
#define GLU_NONE 100002
|
||||
|
||||
/* QuadricOrientation */
|
||||
#define GLU_OUTSIDE 100020
|
||||
#define GLU_INSIDE 100021
|
||||
|
||||
/* TessCallback */
|
||||
#define GLU_TESS_BEGIN 100100
|
||||
#define GLU_BEGIN 100100
|
||||
#define GLU_TESS_VERTEX 100101
|
||||
#define GLU_VERTEX 100101
|
||||
#define GLU_TESS_END 100102
|
||||
#define GLU_END 100102
|
||||
#define GLU_TESS_ERROR 100103
|
||||
#define GLU_TESS_EDGE_FLAG 100104
|
||||
#define GLU_EDGE_FLAG 100104
|
||||
#define GLU_TESS_COMBINE 100105
|
||||
#define GLU_TESS_BEGIN_DATA 100106
|
||||
#define GLU_TESS_VERTEX_DATA 100107
|
||||
#define GLU_TESS_END_DATA 100108
|
||||
#define GLU_TESS_ERROR_DATA 100109
|
||||
#define GLU_TESS_EDGE_FLAG_DATA 100110
|
||||
#define GLU_TESS_COMBINE_DATA 100111
|
||||
|
||||
/* TessContour */
|
||||
#define GLU_CW 100120
|
||||
#define GLU_CCW 100121
|
||||
#define GLU_INTERIOR 100122
|
||||
#define GLU_EXTERIOR 100123
|
||||
#define GLU_UNKNOWN 100124
|
||||
|
||||
/* TessProperty */
|
||||
#define GLU_TESS_WINDING_RULE 100140
|
||||
#define GLU_TESS_BOUNDARY_ONLY 100141
|
||||
#define GLU_TESS_TOLERANCE 100142
|
||||
|
||||
/* TessError */
|
||||
#define GLU_TESS_ERROR1 100151
|
||||
#define GLU_TESS_ERROR2 100152
|
||||
#define GLU_TESS_ERROR3 100153
|
||||
#define GLU_TESS_ERROR4 100154
|
||||
#define GLU_TESS_ERROR5 100155
|
||||
#define GLU_TESS_ERROR6 100156
|
||||
#define GLU_TESS_ERROR7 100157
|
||||
#define GLU_TESS_ERROR8 100158
|
||||
#define GLU_TESS_MISSING_BEGIN_POLYGON 100151
|
||||
#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152
|
||||
#define GLU_TESS_MISSING_END_POLYGON 100153
|
||||
#define GLU_TESS_MISSING_END_CONTOUR 100154
|
||||
#define GLU_TESS_COORD_TOO_LARGE 100155
|
||||
#define GLU_TESS_NEED_COMBINE_CALLBACK 100156
|
||||
|
||||
/* TessWinding */
|
||||
#define GLU_TESS_WINDING_ODD 100130
|
||||
#define GLU_TESS_WINDING_NONZERO 100131
|
||||
#define GLU_TESS_WINDING_POSITIVE 100132
|
||||
#define GLU_TESS_WINDING_NEGATIVE 100133
|
||||
#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
class GLUnurbs;
|
||||
class GLUquadric;
|
||||
class GLUtesselator;
|
||||
#else
|
||||
typedef struct GLUnurbs GLUnurbs;
|
||||
typedef struct GLUquadric GLUquadric;
|
||||
typedef struct GLUtesselator GLUtesselator;
|
||||
#endif
|
||||
|
||||
typedef GLUnurbs GLUnurbsObj;
|
||||
typedef GLUquadric GLUquadricObj;
|
||||
typedef GLUtesselator GLUtesselatorObj;
|
||||
typedef GLUtesselator GLUtriangulatorObj;
|
||||
|
||||
#define GLU_TESS_MAX_COORD 1.0e150
|
||||
|
||||
/* Internal convenience typedefs */
|
||||
typedef void (GLAPIENTRYP _GLUfuncptr)();
|
||||
|
||||
GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
|
||||
GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
|
||||
GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb);
|
||||
GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb);
|
||||
GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
|
||||
GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
|
||||
GLAPI GLint GLAPIENTRY gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
|
||||
GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
|
||||
GLAPI GLint GLAPIENTRY gluBuild3DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
|
||||
GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
|
||||
GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
|
||||
GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
|
||||
GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
|
||||
GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
|
||||
GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess);
|
||||
GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
|
||||
GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb);
|
||||
GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess);
|
||||
GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb);
|
||||
GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb);
|
||||
GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
|
||||
GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
|
||||
GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name);
|
||||
GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
|
||||
GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
|
||||
GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
|
||||
GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void);
|
||||
GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void);
|
||||
GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void);
|
||||
GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
|
||||
GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
|
||||
GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
|
||||
GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
|
||||
GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
|
||||
GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
|
||||
GLAPI void GLAPIENTRY gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type);
|
||||
GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
|
||||
GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
|
||||
GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
|
||||
GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
|
||||
GLAPI GLint GLAPIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ);
|
||||
GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
|
||||
GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
|
||||
GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
|
||||
GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
|
||||
GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
|
||||
GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
|
||||
GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
|
||||
GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
|
||||
GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess);
|
||||
GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
|
||||
GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
|
||||
GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess);
|
||||
GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
|
||||
GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
|
||||
GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
|
||||
GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
|
||||
GLAPI GLint GLAPIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);
|
||||
GLAPI GLint GLAPIENTRY gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __glu_h__ */
|
|
@ -0,0 +1,716 @@
|
|||
#ifndef __glut_h__
|
||||
#define __glut_h__
|
||||
|
||||
/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */
|
||||
|
||||
/* 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. */
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
||||
/* GLUT 3.7 now tries to avoid including <windows.h>
|
||||
to avoid name space pollution, but Win32's <GL/gl.h>
|
||||
needs APIENTRY and WINGDIAPI defined properly. */
|
||||
# if 0
|
||||
/* This would put tons of macros and crap in our clean name space. */
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# include <windows.h>
|
||||
# else
|
||||
/* XXX This is from Win32's <windef.h> */
|
||||
# ifndef APIENTRY
|
||||
# define GLUT_APIENTRY_DEFINED
|
||||
# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__)
|
||||
# define APIENTRY __stdcall
|
||||
# else
|
||||
# define APIENTRY
|
||||
# endif
|
||||
# endif
|
||||
/* XXX This is from Win32's <winnt.h> */
|
||||
# ifndef CALLBACK
|
||||
# if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS) || defined(__LCC__)
|
||||
# define CALLBACK __stdcall
|
||||
# else
|
||||
# define CALLBACK
|
||||
# endif
|
||||
# endif
|
||||
/* XXX Hack for lcc compiler. It doesn't support __declspec(dllimport), just __stdcall. */
|
||||
# if defined( __LCC__ )
|
||||
# undef WINGDIAPI
|
||||
# define WINGDIAPI __stdcall
|
||||
# else
|
||||
/* XXX This is from Win32's <wingdi.h> and <winnt.h> */
|
||||
# ifndef WINGDIAPI
|
||||
# define GLUT_WINGDIAPI_DEFINED
|
||||
# define WINGDIAPI __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
/* XXX This is from Win32's <ctype.h> */
|
||||
# ifndef _WCHAR_T_DEFINED
|
||||
typedef unsigned short wchar_t;
|
||||
# define _WCHAR_T_DEFINED
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* To disable automatic library usage for GLUT, define GLUT_NO_LIB_PRAGMA
|
||||
in your compile preprocessor options. */
|
||||
# if !defined(GLUT_BUILDING_LIB) && !defined(GLUT_NO_LIB_PRAGMA)
|
||||
# pragma comment (lib, "winmm.lib") /* link with Windows MultiMedia lib */
|
||||
/* To enable automatic SGI OpenGL for Windows library usage for GLUT,
|
||||
define GLUT_USE_SGI_OPENGL in your compile preprocessor options. */
|
||||
# ifdef GLUT_USE_SGI_OPENGL
|
||||
# pragma comment (lib, "opengl.lib") /* link with SGI OpenGL for Windows lib */
|
||||
# pragma comment (lib, "glu.lib") /* link with SGI OpenGL Utility lib */
|
||||
# pragma comment (lib, "glut.lib") /* link with Win32 GLUT for SGI OpenGL lib */
|
||||
# else
|
||||
# pragma comment (lib, "opengl32.lib") /* link with Microsoft OpenGL lib */
|
||||
# pragma comment (lib, "glu32.lib") /* link with Microsoft OpenGL Utility lib */
|
||||
# pragma comment (lib, "glut32.lib") /* link with Win32 GLUT lib */
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* To disable supression of annoying warnings about floats being promoted
|
||||
to doubles, define GLUT_NO_WARNING_DISABLE in your compile preprocessor
|
||||
options. */
|
||||
# ifndef GLUT_NO_WARNING_DISABLE
|
||||
# pragma warning (disable:4244) /* Disable bogus VC++ 4.2 conversion warnings. */
|
||||
# pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */
|
||||
# endif
|
||||
|
||||
/* Win32 has an annoying issue where there are multiple C run-time
|
||||
libraries (CRTs). If the executable is linked with a different CRT
|
||||
from the GLUT DLL, the GLUT DLL will not share the same CRT static
|
||||
data seen by the executable. In particular, atexit callbacks registered
|
||||
in the executable will not be called if GLUT calls its (different)
|
||||
exit routine). GLUT is typically built with the
|
||||
"/MD" option (the CRT with multithreading DLL support), but the Visual
|
||||
C++ linker default is "/ML" (the single threaded CRT).
|
||||
|
||||
One workaround to this issue is requiring users to always link with
|
||||
the same CRT as GLUT is compiled with. That requires users supply a
|
||||
non-standard option. GLUT 3.7 has its own built-in workaround where
|
||||
the executable's "exit" function pointer is covertly passed to GLUT.
|
||||
GLUT then calls the executable's exit function pointer to ensure that
|
||||
any "atexit" calls registered by the application are called if GLUT
|
||||
needs to exit.
|
||||
|
||||
Note that the __glut*WithExit routines should NEVER be called directly.
|
||||
To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK. */
|
||||
|
||||
/* XXX This is from Win32's <process.h> */
|
||||
# if !defined(_MSC_VER) && !defined(__cdecl)
|
||||
/* Define __cdecl for non-Microsoft compilers. */
|
||||
# define __cdecl
|
||||
# define GLUT_DEFINED___CDECL
|
||||
# endif
|
||||
# ifndef _CRTIMP
|
||||
# ifdef _NTSDK
|
||||
/* Definition compatible with NT SDK */
|
||||
# define _CRTIMP
|
||||
# else
|
||||
/* Current definition */
|
||||
# ifdef _DLL
|
||||
# define _CRTIMP __declspec(dllimport)
|
||||
# else
|
||||
# define _CRTIMP
|
||||
# endif
|
||||
# endif
|
||||
# define GLUT_DEFINED__CRTIMP
|
||||
# endif
|
||||
|
||||
/* GLUT API entry point declarations for Win32. */
|
||||
# ifdef GLUT_BUILDING_LIB
|
||||
# define GLUTAPI __declspec(dllexport)
|
||||
# else
|
||||
# ifdef _DLL
|
||||
# define GLUTAPI __declspec(dllimport)
|
||||
# else
|
||||
# define GLUTAPI extern
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* GLUT callback calling convention for Win32. */
|
||||
# define GLUTCALLBACK __cdecl
|
||||
|
||||
#endif /* _WIN32 */
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
# ifndef GLUT_BUILDING_LIB
|
||||
extern _CRTIMP void __cdecl exit(int);
|
||||
# endif
|
||||
#else
|
||||
/* non-Win32 case. */
|
||||
/* Define APIENTRY and CALLBACK to nothing if we aren't on Win32. */
|
||||
# define APIENTRY
|
||||
# define GLUT_APIENTRY_DEFINED
|
||||
# define CALLBACK
|
||||
/* Define GLUTAPI and GLUTCALLBACK as below if we aren't on Win32. */
|
||||
# define GLUTAPI extern
|
||||
# define GLUTCALLBACK
|
||||
/* Prototype exit for the non-Win32 case (see above). */
|
||||
extern void exit(int);
|
||||
#endif
|
||||
|
||||
/**
|
||||
GLUT API revision history:
|
||||
|
||||
GLUT_API_VERSION is updated to reflect incompatible GLUT
|
||||
API changes (interface changes, semantic changes, deletions,
|
||||
or additions).
|
||||
|
||||
GLUT_API_VERSION=1 First public release of GLUT. 11/29/94
|
||||
|
||||
GLUT_API_VERSION=2 Added support for OpenGL/GLX multisampling,
|
||||
extension. Supports new input devices like tablet, dial and button
|
||||
box, and Spaceball. Easy to query OpenGL extensions.
|
||||
|
||||
GLUT_API_VERSION=3 glutMenuStatus added.
|
||||
|
||||
GLUT_API_VERSION=4 glutInitDisplayString, glutWarpPointer,
|
||||
glutBitmapLength, glutStrokeLength, glutWindowStatusFunc, dynamic
|
||||
video resize subAPI, glutPostWindowRedisplay, glutKeyboardUpFunc,
|
||||
glutSpecialUpFunc, glutIgnoreKeyRepeat, glutSetKeyRepeat,
|
||||
glutJoystickFunc, glutForceJoystickFunc (NOT FINALIZED!).
|
||||
**/
|
||||
#ifndef GLUT_API_VERSION /* allow this to be overriden */
|
||||
#define GLUT_API_VERSION 3
|
||||
#endif
|
||||
|
||||
/**
|
||||
GLUT implementation revision history:
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION is updated to reflect both GLUT
|
||||
API revisions and implementation revisions (ie, bug fixes).
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=1 mjk's first public release of
|
||||
GLUT Xlib-based implementation. 11/29/94
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=2 mjk's second public release of
|
||||
GLUT Xlib-based implementation providing GLUT version 2
|
||||
interfaces.
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=3 mjk's GLUT 2.2 images. 4/17/95
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=4 mjk's GLUT 2.3 images. 6/?/95
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=5 mjk's GLUT 3.0 images. 10/?/95
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=7 mjk's GLUT 3.1+ with glutWarpPoitner. 7/24/96
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=8 mjk's GLUT 3.1+ with glutWarpPoitner
|
||||
and video resize. 1/3/97
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=9 mjk's GLUT 3.4 release with early GLUT 4 routines.
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=11 Mesa 2.5's GLUT 3.6 release.
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=12 mjk's GLUT 3.6 release with early GLUT 4 routines + signal handling.
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=13 mjk's GLUT 3.7 beta with GameGLUT support.
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=14 mjk's GLUT 3.7 beta with f90gl friend interface.
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=15 mjk's GLUT 3.7 beta sync'ed with Mesa <GL/glut.h>
|
||||
**/
|
||||
#ifndef GLUT_XLIB_IMPLEMENTATION /* Allow this to be overriden. */
|
||||
#define GLUT_XLIB_IMPLEMENTATION 15
|
||||
#endif
|
||||
|
||||
/* Display mode bit masks. */
|
||||
#define GLUT_RGB 0
|
||||
#define GLUT_RGBA GLUT_RGB
|
||||
#define GLUT_INDEX 1
|
||||
#define GLUT_SINGLE 0
|
||||
#define GLUT_DOUBLE 2
|
||||
#define GLUT_ACCUM 4
|
||||
#define GLUT_ALPHA 8
|
||||
#define GLUT_DEPTH 16
|
||||
#define GLUT_STENCIL 32
|
||||
#if (GLUT_API_VERSION >= 2)
|
||||
#define GLUT_MULTISAMPLE 128
|
||||
#define GLUT_STEREO 256
|
||||
#endif
|
||||
#if (GLUT_API_VERSION >= 3)
|
||||
#define GLUT_LUMINANCE 512
|
||||
#endif
|
||||
|
||||
/* Mouse buttons. */
|
||||
#define GLUT_LEFT_BUTTON 0
|
||||
#define GLUT_MIDDLE_BUTTON 1
|
||||
#define GLUT_RIGHT_BUTTON 2
|
||||
|
||||
/* Mouse button state. */
|
||||
#define GLUT_DOWN 0
|
||||
#define GLUT_UP 1
|
||||
|
||||
#if (GLUT_API_VERSION >= 2)
|
||||
/* function keys */
|
||||
#define GLUT_KEY_F1 1
|
||||
#define GLUT_KEY_F2 2
|
||||
#define GLUT_KEY_F3 3
|
||||
#define GLUT_KEY_F4 4
|
||||
#define GLUT_KEY_F5 5
|
||||
#define GLUT_KEY_F6 6
|
||||
#define GLUT_KEY_F7 7
|
||||
#define GLUT_KEY_F8 8
|
||||
#define GLUT_KEY_F9 9
|
||||
#define GLUT_KEY_F10 10
|
||||
#define GLUT_KEY_F11 11
|
||||
#define GLUT_KEY_F12 12
|
||||
/* directional keys */
|
||||
#define GLUT_KEY_LEFT 100
|
||||
#define GLUT_KEY_UP 101
|
||||
#define GLUT_KEY_RIGHT 102
|
||||
#define GLUT_KEY_DOWN 103
|
||||
#define GLUT_KEY_PAGE_UP 104
|
||||
#define GLUT_KEY_PAGE_DOWN 105
|
||||
#define GLUT_KEY_HOME 106
|
||||
#define GLUT_KEY_END 107
|
||||
#define GLUT_KEY_INSERT 108
|
||||
#endif
|
||||
|
||||
/* Entry/exit state. */
|
||||
#define GLUT_LEFT 0
|
||||
#define GLUT_ENTERED 1
|
||||
|
||||
/* Menu usage state. */
|
||||
#define GLUT_MENU_NOT_IN_USE 0
|
||||
#define GLUT_MENU_IN_USE 1
|
||||
|
||||
/* Visibility state. */
|
||||
#define GLUT_NOT_VISIBLE 0
|
||||
#define GLUT_VISIBLE 1
|
||||
|
||||
/* Window status state. */
|
||||
#define GLUT_HIDDEN 0
|
||||
#define GLUT_FULLY_RETAINED 1
|
||||
#define GLUT_PARTIALLY_RETAINED 2
|
||||
#define GLUT_FULLY_COVERED 3
|
||||
|
||||
/* Color index component selection values. */
|
||||
#define GLUT_RED 0
|
||||
#define GLUT_GREEN 1
|
||||
#define GLUT_BLUE 2
|
||||
|
||||
#if defined(_WIN32)
|
||||
/* Stroke font constants (use these in GLUT program). */
|
||||
#define GLUT_STROKE_ROMAN ((void*)0)
|
||||
#define GLUT_STROKE_MONO_ROMAN ((void*)1)
|
||||
|
||||
/* Bitmap font constants (use these in GLUT program). */
|
||||
#define GLUT_BITMAP_9_BY_15 ((void*)2)
|
||||
#define GLUT_BITMAP_8_BY_13 ((void*)3)
|
||||
#define GLUT_BITMAP_TIMES_ROMAN_10 ((void*)4)
|
||||
#define GLUT_BITMAP_TIMES_ROMAN_24 ((void*)5)
|
||||
#if (GLUT_API_VERSION >= 3)
|
||||
#define GLUT_BITMAP_HELVETICA_10 ((void*)6)
|
||||
#define GLUT_BITMAP_HELVETICA_12 ((void*)7)
|
||||
#define GLUT_BITMAP_HELVETICA_18 ((void*)8)
|
||||
#endif
|
||||
#else
|
||||
/* Stroke font opaque addresses (use constants instead in source code). */
|
||||
GLUTAPI void *glutStrokeRoman;
|
||||
GLUTAPI void *glutStrokeMonoRoman;
|
||||
|
||||
/* Stroke font constants (use these in GLUT program). */
|
||||
#define GLUT_STROKE_ROMAN (&glutStrokeRoman)
|
||||
#define GLUT_STROKE_MONO_ROMAN (&glutStrokeMonoRoman)
|
||||
|
||||
/* Bitmap font opaque addresses (use constants instead in source code). */
|
||||
GLUTAPI void *glutBitmap9By15;
|
||||
GLUTAPI void *glutBitmap8By13;
|
||||
GLUTAPI void *glutBitmapTimesRoman10;
|
||||
GLUTAPI void *glutBitmapTimesRoman24;
|
||||
GLUTAPI void *glutBitmapHelvetica10;
|
||||
GLUTAPI void *glutBitmapHelvetica12;
|
||||
GLUTAPI void *glutBitmapHelvetica18;
|
||||
|
||||
/* Bitmap font constants (use these in GLUT program). */
|
||||
#define GLUT_BITMAP_9_BY_15 (&glutBitmap9By15)
|
||||
#define GLUT_BITMAP_8_BY_13 (&glutBitmap8By13)
|
||||
#define GLUT_BITMAP_TIMES_ROMAN_10 (&glutBitmapTimesRoman10)
|
||||
#define GLUT_BITMAP_TIMES_ROMAN_24 (&glutBitmapTimesRoman24)
|
||||
#if (GLUT_API_VERSION >= 3)
|
||||
#define GLUT_BITMAP_HELVETICA_10 (&glutBitmapHelvetica10)
|
||||
#define GLUT_BITMAP_HELVETICA_12 (&glutBitmapHelvetica12)
|
||||
#define GLUT_BITMAP_HELVETICA_18 (&glutBitmapHelvetica18)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* glutGet parameters. */
|
||||
#define GLUT_WINDOW_X ((GLenum) 100)
|
||||
#define GLUT_WINDOW_Y ((GLenum) 101)
|
||||
#define GLUT_WINDOW_WIDTH ((GLenum) 102)
|
||||
#define GLUT_WINDOW_HEIGHT ((GLenum) 103)
|
||||
#define GLUT_WINDOW_BUFFER_SIZE ((GLenum) 104)
|
||||
#define GLUT_WINDOW_STENCIL_SIZE ((GLenum) 105)
|
||||
#define GLUT_WINDOW_DEPTH_SIZE ((GLenum) 106)
|
||||
#define GLUT_WINDOW_RED_SIZE ((GLenum) 107)
|
||||
#define GLUT_WINDOW_GREEN_SIZE ((GLenum) 108)
|
||||
#define GLUT_WINDOW_BLUE_SIZE ((GLenum) 109)
|
||||
#define GLUT_WINDOW_ALPHA_SIZE ((GLenum) 110)
|
||||
#define GLUT_WINDOW_ACCUM_RED_SIZE ((GLenum) 111)
|
||||
#define GLUT_WINDOW_ACCUM_GREEN_SIZE ((GLenum) 112)
|
||||
#define GLUT_WINDOW_ACCUM_BLUE_SIZE ((GLenum) 113)
|
||||
#define GLUT_WINDOW_ACCUM_ALPHA_SIZE ((GLenum) 114)
|
||||
#define GLUT_WINDOW_DOUBLEBUFFER ((GLenum) 115)
|
||||
#define GLUT_WINDOW_RGBA ((GLenum) 116)
|
||||
#define GLUT_WINDOW_PARENT ((GLenum) 117)
|
||||
#define GLUT_WINDOW_NUM_CHILDREN ((GLenum) 118)
|
||||
#define GLUT_WINDOW_COLORMAP_SIZE ((GLenum) 119)
|
||||
#if (GLUT_API_VERSION >= 2)
|
||||
#define GLUT_WINDOW_NUM_SAMPLES ((GLenum) 120)
|
||||
#define GLUT_WINDOW_STEREO ((GLenum) 121)
|
||||
#endif
|
||||
#if (GLUT_API_VERSION >= 3)
|
||||
#define GLUT_WINDOW_CURSOR ((GLenum) 122)
|
||||
#endif
|
||||
#define GLUT_SCREEN_WIDTH ((GLenum) 200)
|
||||
#define GLUT_SCREEN_HEIGHT ((GLenum) 201)
|
||||
#define GLUT_SCREEN_WIDTH_MM ((GLenum) 202)
|
||||
#define GLUT_SCREEN_HEIGHT_MM ((GLenum) 203)
|
||||
#define GLUT_MENU_NUM_ITEMS ((GLenum) 300)
|
||||
#define GLUT_DISPLAY_MODE_POSSIBLE ((GLenum) 400)
|
||||
#define GLUT_INIT_WINDOW_X ((GLenum) 500)
|
||||
#define GLUT_INIT_WINDOW_Y ((GLenum) 501)
|
||||
#define GLUT_INIT_WINDOW_WIDTH ((GLenum) 502)
|
||||
#define GLUT_INIT_WINDOW_HEIGHT ((GLenum) 503)
|
||||
#define GLUT_INIT_DISPLAY_MODE ((GLenum) 504)
|
||||
#if (GLUT_API_VERSION >= 2)
|
||||
#define GLUT_ELAPSED_TIME ((GLenum) 700)
|
||||
#endif
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
|
||||
#define GLUT_WINDOW_FORMAT_ID ((GLenum) 123)
|
||||
#endif
|
||||
|
||||
#if (GLUT_API_VERSION >= 2)
|
||||
/* glutDeviceGet parameters. */
|
||||
#define GLUT_HAS_KEYBOARD ((GLenum) 600)
|
||||
#define GLUT_HAS_MOUSE ((GLenum) 601)
|
||||
#define GLUT_HAS_SPACEBALL ((GLenum) 602)
|
||||
#define GLUT_HAS_DIAL_AND_BUTTON_BOX ((GLenum) 603)
|
||||
#define GLUT_HAS_TABLET ((GLenum) 604)
|
||||
#define GLUT_NUM_MOUSE_BUTTONS ((GLenum) 605)
|
||||
#define GLUT_NUM_SPACEBALL_BUTTONS ((GLenum) 606)
|
||||
#define GLUT_NUM_BUTTON_BOX_BUTTONS ((GLenum) 607)
|
||||
#define GLUT_NUM_DIALS ((GLenum) 608)
|
||||
#define GLUT_NUM_TABLET_BUTTONS ((GLenum) 609)
|
||||
#endif
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
|
||||
#define GLUT_DEVICE_IGNORE_KEY_REPEAT ((GLenum) 610)
|
||||
#define GLUT_DEVICE_KEY_REPEAT ((GLenum) 611)
|
||||
#define GLUT_HAS_JOYSTICK ((GLenum) 612)
|
||||
#define GLUT_OWNS_JOYSTICK ((GLenum) 613)
|
||||
#define GLUT_JOYSTICK_BUTTONS ((GLenum) 614)
|
||||
#define GLUT_JOYSTICK_AXES ((GLenum) 615)
|
||||
#define GLUT_JOYSTICK_POLL_RATE ((GLenum) 616)
|
||||
#endif
|
||||
|
||||
#if (GLUT_API_VERSION >= 3)
|
||||
/* glutLayerGet parameters. */
|
||||
#define GLUT_OVERLAY_POSSIBLE ((GLenum) 800)
|
||||
#define GLUT_LAYER_IN_USE ((GLenum) 801)
|
||||
#define GLUT_HAS_OVERLAY ((GLenum) 802)
|
||||
#define GLUT_TRANSPARENT_INDEX ((GLenum) 803)
|
||||
#define GLUT_NORMAL_DAMAGED ((GLenum) 804)
|
||||
#define GLUT_OVERLAY_DAMAGED ((GLenum) 805)
|
||||
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
||||
/* glutVideoResizeGet parameters. */
|
||||
#define GLUT_VIDEO_RESIZE_POSSIBLE ((GLenum) 900)
|
||||
#define GLUT_VIDEO_RESIZE_IN_USE ((GLenum) 901)
|
||||
#define GLUT_VIDEO_RESIZE_X_DELTA ((GLenum) 902)
|
||||
#define GLUT_VIDEO_RESIZE_Y_DELTA ((GLenum) 903)
|
||||
#define GLUT_VIDEO_RESIZE_WIDTH_DELTA ((GLenum) 904)
|
||||
#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA ((GLenum) 905)
|
||||
#define GLUT_VIDEO_RESIZE_X ((GLenum) 906)
|
||||
#define GLUT_VIDEO_RESIZE_Y ((GLenum) 907)
|
||||
#define GLUT_VIDEO_RESIZE_WIDTH ((GLenum) 908)
|
||||
#define GLUT_VIDEO_RESIZE_HEIGHT ((GLenum) 909)
|
||||
#endif
|
||||
|
||||
/* glutUseLayer parameters. */
|
||||
#define GLUT_NORMAL ((GLenum) 0)
|
||||
#define GLUT_OVERLAY ((GLenum) 1)
|
||||
|
||||
/* glutGetModifiers return mask. */
|
||||
#define GLUT_ACTIVE_SHIFT 1
|
||||
#define GLUT_ACTIVE_CTRL 2
|
||||
#define GLUT_ACTIVE_ALT 4
|
||||
|
||||
/* glutSetCursor parameters. */
|
||||
/* Basic arrows. */
|
||||
#define GLUT_CURSOR_RIGHT_ARROW 0
|
||||
#define GLUT_CURSOR_LEFT_ARROW 1
|
||||
/* Symbolic cursor shapes. */
|
||||
#define GLUT_CURSOR_INFO 2
|
||||
#define GLUT_CURSOR_DESTROY 3
|
||||
#define GLUT_CURSOR_HELP 4
|
||||
#define GLUT_CURSOR_CYCLE 5
|
||||
#define GLUT_CURSOR_SPRAY 6
|
||||
#define GLUT_CURSOR_WAIT 7
|
||||
#define GLUT_CURSOR_TEXT 8
|
||||
#define GLUT_CURSOR_CROSSHAIR 9
|
||||
/* Directional cursors. */
|
||||
#define GLUT_CURSOR_UP_DOWN 10
|
||||
#define GLUT_CURSOR_LEFT_RIGHT 11
|
||||
/* Sizing cursors. */
|
||||
#define GLUT_CURSOR_TOP_SIDE 12
|
||||
#define GLUT_CURSOR_BOTTOM_SIDE 13
|
||||
#define GLUT_CURSOR_LEFT_SIDE 14
|
||||
#define GLUT_CURSOR_RIGHT_SIDE 15
|
||||
#define GLUT_CURSOR_TOP_LEFT_CORNER 16
|
||||
#define GLUT_CURSOR_TOP_RIGHT_CORNER 17
|
||||
#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 18
|
||||
#define GLUT_CURSOR_BOTTOM_LEFT_CORNER 19
|
||||
/* Inherit from parent window. */
|
||||
#define GLUT_CURSOR_INHERIT 100
|
||||
/* Blank cursor. */
|
||||
#define GLUT_CURSOR_NONE 101
|
||||
/* Fullscreen crosshair (if available). */
|
||||
#define GLUT_CURSOR_FULL_CROSSHAIR 102
|
||||
#endif
|
||||
|
||||
/* GLUT initialization sub-API. */
|
||||
GLUTAPI void APIENTRY glutInit(int *argcp, char **argv);
|
||||
#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
|
||||
GLUTAPI void APIENTRY __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int));
|
||||
#ifndef GLUT_BUILDING_LIB
|
||||
static void APIENTRY glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); }
|
||||
#define glutInit glutInit_ATEXIT_HACK
|
||||
#endif
|
||||
#endif
|
||||
GLUTAPI void APIENTRY glutInitDisplayMode(unsigned int mode);
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
||||
GLUTAPI void APIENTRY glutInitDisplayString(const char *string);
|
||||
#endif
|
||||
GLUTAPI void APIENTRY glutInitWindowPosition(int x, int y);
|
||||
GLUTAPI void APIENTRY glutInitWindowSize(int width, int height);
|
||||
GLUTAPI void APIENTRY glutMainLoop(void);
|
||||
|
||||
/* GLUT window sub-API. */
|
||||
GLUTAPI int APIENTRY glutCreateWindow(const char *title);
|
||||
#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
|
||||
GLUTAPI int APIENTRY __glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int));
|
||||
#ifndef GLUT_BUILDING_LIB
|
||||
static int APIENTRY glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); }
|
||||
#define glutCreateWindow glutCreateWindow_ATEXIT_HACK
|
||||
#endif
|
||||
#endif
|
||||
GLUTAPI int APIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height);
|
||||
GLUTAPI void APIENTRY glutDestroyWindow(int win);
|
||||
GLUTAPI void APIENTRY glutPostRedisplay(void);
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
|
||||
GLUTAPI void APIENTRY glutPostWindowRedisplay(int win);
|
||||
#endif
|
||||
GLUTAPI void APIENTRY glutSwapBuffers(void);
|
||||
GLUTAPI int APIENTRY glutGetWindow(void);
|
||||
GLUTAPI void APIENTRY glutSetWindow(int win);
|
||||
GLUTAPI void APIENTRY glutSetWindowTitle(const char *title);
|
||||
GLUTAPI void APIENTRY glutSetIconTitle(const char *title);
|
||||
GLUTAPI void APIENTRY glutPositionWindow(int x, int y);
|
||||
GLUTAPI void APIENTRY glutReshapeWindow(int width, int height);
|
||||
GLUTAPI void APIENTRY glutPopWindow(void);
|
||||
GLUTAPI void APIENTRY glutPushWindow(void);
|
||||
GLUTAPI void APIENTRY glutIconifyWindow(void);
|
||||
GLUTAPI void APIENTRY glutShowWindow(void);
|
||||
GLUTAPI void APIENTRY glutHideWindow(void);
|
||||
#if (GLUT_API_VERSION >= 3)
|
||||
GLUTAPI void APIENTRY glutFullScreen(void);
|
||||
GLUTAPI void APIENTRY glutSetCursor(int cursor);
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
||||
GLUTAPI void APIENTRY glutWarpPointer(int x, int y);
|
||||
#endif
|
||||
|
||||
/* GLUT overlay sub-API. */
|
||||
GLUTAPI void APIENTRY glutEstablishOverlay(void);
|
||||
GLUTAPI void APIENTRY glutRemoveOverlay(void);
|
||||
GLUTAPI void APIENTRY glutUseLayer(GLenum layer);
|
||||
GLUTAPI void APIENTRY glutPostOverlayRedisplay(void);
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
|
||||
GLUTAPI void APIENTRY glutPostWindowOverlayRedisplay(int win);
|
||||
#endif
|
||||
GLUTAPI void APIENTRY glutShowOverlay(void);
|
||||
GLUTAPI void APIENTRY glutHideOverlay(void);
|
||||
#endif
|
||||
|
||||
/* GLUT menu sub-API. */
|
||||
GLUTAPI int APIENTRY glutCreateMenu(void (GLUTCALLBACK *func)(int));
|
||||
#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
|
||||
GLUTAPI int APIENTRY __glutCreateMenuWithExit(void (GLUTCALLBACK *func)(int), void (__cdecl *exitfunc)(int));
|
||||
#ifndef GLUT_BUILDING_LIB
|
||||
static int APIENTRY glutCreateMenu_ATEXIT_HACK(void (GLUTCALLBACK *func)(int)) { return __glutCreateMenuWithExit(func, exit); }
|
||||
#define glutCreateMenu glutCreateMenu_ATEXIT_HACK
|
||||
#endif
|
||||
#endif
|
||||
GLUTAPI void APIENTRY glutDestroyMenu(int menu);
|
||||
GLUTAPI int APIENTRY glutGetMenu(void);
|
||||
GLUTAPI void APIENTRY glutSetMenu(int menu);
|
||||
GLUTAPI void APIENTRY glutAddMenuEntry(const char *label, int value);
|
||||
GLUTAPI void APIENTRY glutAddSubMenu(const char *label, int submenu);
|
||||
GLUTAPI void APIENTRY glutChangeToMenuEntry(int item, const char *label, int value);
|
||||
GLUTAPI void APIENTRY glutChangeToSubMenu(int item, const char *label, int submenu);
|
||||
GLUTAPI void APIENTRY glutRemoveMenuItem(int item);
|
||||
GLUTAPI void APIENTRY glutAttachMenu(int button);
|
||||
GLUTAPI void APIENTRY glutDetachMenu(int button);
|
||||
|
||||
/* GLUT window callback sub-API. */
|
||||
GLUTAPI void APIENTRY glutDisplayFunc(void (GLUTCALLBACK *func)(void));
|
||||
GLUTAPI void APIENTRY glutReshapeFunc(void (GLUTCALLBACK *func)(int width, int height));
|
||||
GLUTAPI void APIENTRY glutKeyboardFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y));
|
||||
GLUTAPI void APIENTRY glutMouseFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y));
|
||||
GLUTAPI void APIENTRY glutMotionFunc(void (GLUTCALLBACK *func)(int x, int y));
|
||||
GLUTAPI void APIENTRY glutPassiveMotionFunc(void (GLUTCALLBACK *func)(int x, int y));
|
||||
GLUTAPI void APIENTRY glutEntryFunc(void (GLUTCALLBACK *func)(int state));
|
||||
GLUTAPI void APIENTRY glutVisibilityFunc(void (GLUTCALLBACK *func)(int state));
|
||||
GLUTAPI void APIENTRY glutIdleFunc(void (GLUTCALLBACK *func)(void));
|
||||
GLUTAPI void APIENTRY glutTimerFunc(unsigned int millis, void (GLUTCALLBACK *func)(int value), int value);
|
||||
GLUTAPI void APIENTRY glutMenuStateFunc(void (GLUTCALLBACK *func)(int state));
|
||||
#if (GLUT_API_VERSION >= 2)
|
||||
GLUTAPI void APIENTRY glutSpecialFunc(void (GLUTCALLBACK *func)(int key, int x, int y));
|
||||
GLUTAPI void APIENTRY glutSpaceballMotionFunc(void (GLUTCALLBACK *func)(int x, int y, int z));
|
||||
GLUTAPI void APIENTRY glutSpaceballRotateFunc(void (GLUTCALLBACK *func)(int x, int y, int z));
|
||||
GLUTAPI void APIENTRY glutSpaceballButtonFunc(void (GLUTCALLBACK *func)(int button, int state));
|
||||
GLUTAPI void APIENTRY glutButtonBoxFunc(void (GLUTCALLBACK *func)(int button, int state));
|
||||
GLUTAPI void APIENTRY glutDialsFunc(void (GLUTCALLBACK *func)(int dial, int value));
|
||||
GLUTAPI void APIENTRY glutTabletMotionFunc(void (GLUTCALLBACK *func)(int x, int y));
|
||||
GLUTAPI void APIENTRY glutTabletButtonFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y));
|
||||
#if (GLUT_API_VERSION >= 3)
|
||||
GLUTAPI void APIENTRY glutMenuStatusFunc(void (GLUTCALLBACK *func)(int status, int x, int y));
|
||||
GLUTAPI void APIENTRY glutOverlayDisplayFunc(void (GLUTCALLBACK *func)(void));
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
||||
GLUTAPI void APIENTRY glutWindowStatusFunc(void (GLUTCALLBACK *func)(int state));
|
||||
#endif
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
|
||||
GLUTAPI void APIENTRY glutKeyboardUpFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y));
|
||||
GLUTAPI void APIENTRY glutSpecialUpFunc(void (GLUTCALLBACK *func)(int key, int x, int y));
|
||||
GLUTAPI void APIENTRY glutJoystickFunc(void (GLUTCALLBACK *func)(unsigned int buttonMask, int x, int y, int z), int pollInterval);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* GLUT color index sub-API. */
|
||||
GLUTAPI void APIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue);
|
||||
GLUTAPI GLfloat APIENTRY glutGetColor(int ndx, int component);
|
||||
GLUTAPI void APIENTRY glutCopyColormap(int win);
|
||||
|
||||
/* GLUT state retrieval sub-API. */
|
||||
GLUTAPI int APIENTRY glutGet(GLenum type);
|
||||
GLUTAPI int APIENTRY glutDeviceGet(GLenum type);
|
||||
#if (GLUT_API_VERSION >= 2)
|
||||
/* GLUT extension support sub-API */
|
||||
GLUTAPI int APIENTRY glutExtensionSupported(const char *name);
|
||||
#endif
|
||||
#if (GLUT_API_VERSION >= 3)
|
||||
GLUTAPI int APIENTRY glutGetModifiers(void);
|
||||
GLUTAPI int APIENTRY glutLayerGet(GLenum type);
|
||||
#endif
|
||||
|
||||
/* GLUT font sub-API */
|
||||
GLUTAPI void APIENTRY glutBitmapCharacter(void *font, int character);
|
||||
GLUTAPI int APIENTRY glutBitmapWidth(void *font, int character);
|
||||
GLUTAPI void APIENTRY glutStrokeCharacter(void *font, int character);
|
||||
GLUTAPI int APIENTRY glutStrokeWidth(void *font, int character);
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
||||
GLUTAPI int APIENTRY glutBitmapLength(void *font, const unsigned char *string);
|
||||
GLUTAPI int APIENTRY glutStrokeLength(void *font, const unsigned char *string);
|
||||
#endif
|
||||
|
||||
/* GLUT pre-built models sub-API */
|
||||
GLUTAPI void APIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks);
|
||||
GLUTAPI void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks);
|
||||
GLUTAPI void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
|
||||
GLUTAPI void APIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
|
||||
GLUTAPI void APIENTRY glutWireCube(GLdouble size);
|
||||
GLUTAPI void APIENTRY glutSolidCube(GLdouble size);
|
||||
GLUTAPI void APIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
|
||||
GLUTAPI void APIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
|
||||
GLUTAPI void APIENTRY glutWireDodecahedron(void);
|
||||
GLUTAPI void APIENTRY glutSolidDodecahedron(void);
|
||||
GLUTAPI void APIENTRY glutWireTeapot(GLdouble size);
|
||||
GLUTAPI void APIENTRY glutSolidTeapot(GLdouble size);
|
||||
GLUTAPI void APIENTRY glutWireOctahedron(void);
|
||||
GLUTAPI void APIENTRY glutSolidOctahedron(void);
|
||||
GLUTAPI void APIENTRY glutWireTetrahedron(void);
|
||||
GLUTAPI void APIENTRY glutSolidTetrahedron(void);
|
||||
GLUTAPI void APIENTRY glutWireIcosahedron(void);
|
||||
GLUTAPI void APIENTRY glutSolidIcosahedron(void);
|
||||
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
||||
/* GLUT video resize sub-API. */
|
||||
GLUTAPI int APIENTRY glutVideoResizeGet(GLenum param);
|
||||
GLUTAPI void APIENTRY glutSetupVideoResizing(void);
|
||||
GLUTAPI void APIENTRY glutStopVideoResizing(void);
|
||||
GLUTAPI void APIENTRY glutVideoResize(int x, int y, int width, int height);
|
||||
GLUTAPI void APIENTRY glutVideoPan(int x, int y, int width, int height);
|
||||
|
||||
/* GLUT debugging sub-API. */
|
||||
GLUTAPI void APIENTRY glutReportErrors(void);
|
||||
#endif
|
||||
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
|
||||
/* GLUT device control sub-API. */
|
||||
/* glutSetKeyRepeat modes. */
|
||||
#define GLUT_KEY_REPEAT_OFF 0
|
||||
#define GLUT_KEY_REPEAT_ON 1
|
||||
#define GLUT_KEY_REPEAT_DEFAULT 2
|
||||
|
||||
/* Joystick button masks. */
|
||||
#define GLUT_JOYSTICK_BUTTON_A 1
|
||||
#define GLUT_JOYSTICK_BUTTON_B 2
|
||||
#define GLUT_JOYSTICK_BUTTON_C 4
|
||||
#define GLUT_JOYSTICK_BUTTON_D 8
|
||||
|
||||
GLUTAPI void APIENTRY glutIgnoreKeyRepeat(int ignore);
|
||||
GLUTAPI void APIENTRY glutSetKeyRepeat(int repeatMode);
|
||||
GLUTAPI void APIENTRY glutForceJoystickFunc(void);
|
||||
|
||||
/* GLUT game mode sub-API. */
|
||||
/* glutGameModeGet. */
|
||||
#define GLUT_GAME_MODE_ACTIVE ((GLenum) 0)
|
||||
#define GLUT_GAME_MODE_POSSIBLE ((GLenum) 1)
|
||||
#define GLUT_GAME_MODE_WIDTH ((GLenum) 2)
|
||||
#define GLUT_GAME_MODE_HEIGHT ((GLenum) 3)
|
||||
#define GLUT_GAME_MODE_PIXEL_DEPTH ((GLenum) 4)
|
||||
#define GLUT_GAME_MODE_REFRESH_RATE ((GLenum) 5)
|
||||
#define GLUT_GAME_MODE_DISPLAY_CHANGED ((GLenum) 6)
|
||||
|
||||
GLUTAPI void APIENTRY glutGameModeString(const char *string);
|
||||
GLUTAPI int APIENTRY glutEnterGameMode(void);
|
||||
GLUTAPI void APIENTRY glutLeaveGameMode(void);
|
||||
GLUTAPI int APIENTRY glutGameModeGet(GLenum mode);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef GLUT_APIENTRY_DEFINED
|
||||
# undef GLUT_APIENTRY_DEFINED
|
||||
# undef APIENTRY
|
||||
#endif
|
||||
|
||||
#ifdef GLUT_WINGDIAPI_DEFINED
|
||||
# undef GLUT_WINGDIAPI_DEFINED
|
||||
# undef WINGDIAPI
|
||||
#endif
|
||||
|
||||
#ifdef GLUT_DEFINED___CDECL
|
||||
# undef GLUT_DEFINED___CDECL
|
||||
# undef __cdecl
|
||||
#endif
|
||||
|
||||
#ifdef GLUT_DEFINED__CRTIMP
|
||||
# undef GLUT_DEFINED__CRTIMP
|
||||
# undef _CRTIMP
|
||||
#endif
|
||||
|
||||
#endif /* __glut_h__ */
|
|
@ -0,0 +1,102 @@
|
|||
#include "GL/gl.h"
|
||||
|
||||
//TODO: rewrite to support dynamic arrays
|
||||
#define MAX_ARRAY 1000
|
||||
|
||||
#define LARGE_NUMBER 1048576
|
||||
#define BIG_NUMBER (1024*1024)
|
||||
//1048576
|
||||
//1.0e-18F
|
||||
//9.9999998e+017
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
float w;
|
||||
} VertexElement;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float s;
|
||||
float t;
|
||||
} TexCoordElement;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float r;
|
||||
float g;
|
||||
float b;
|
||||
float a;
|
||||
} GXColorf;
|
||||
|
||||
VertexElement _tempnormalelement;
|
||||
TexCoordElement _temptexcoordelement;
|
||||
GXColorf _tempcolorelement;
|
||||
|
||||
//TODO: integrate in normal, vertex, texcoord and color in struct and place that in dynamic arrray
|
||||
VertexElement _normalelements[MAX_ARRAY]; //TODO: dynamic
|
||||
VertexElement _vertexelements[MAX_ARRAY]; //TODO: dynamic
|
||||
TexCoordElement _texcoordelements[MAX_ARRAY]; //TODO: dynamic
|
||||
GXColorf _colorelements[MAX_ARRAY]; //TODO: dynamic
|
||||
|
||||
int _numelements;
|
||||
int _type;
|
||||
|
||||
/* Depth Buffer */
|
||||
|
||||
u8 depthtestenabled;
|
||||
GLenum depthfunction;
|
||||
float _cleardepth;
|
||||
|
||||
/* Matrixes */
|
||||
|
||||
Mtx _mtxelements[32]; //max stack depth is 32 in opengl
|
||||
int _mtxcurrentelement;
|
||||
//TODO: clean up unneeded and naming
|
||||
Mtx view,perspective; // view and perspective matrices
|
||||
Mtx model, modelview, inversemodel, normalmodel;
|
||||
|
||||
/* light */
|
||||
GXLightObj gxlight[8]; //max 8 lights in opengl
|
||||
VertexElement gxlightpos[8]; //light position for each light
|
||||
VertexElement gxlightdir[8]; //light direction for each light
|
||||
bool gxlightenabled[8]; //is specific light enabled
|
||||
int gxcurlight; //test for light position
|
||||
|
||||
//light specs
|
||||
GXColorf gxlightambientcolor[8];
|
||||
GXColorf gxlightdiffusecolor[8];
|
||||
GXColorf gxlightspecularcolor[8];
|
||||
|
||||
//spot light specs
|
||||
VertexElement gxspotdirection[8];
|
||||
float gxspotexponent[8];
|
||||
float gxspotcutoff[8];
|
||||
|
||||
float gxconstantattanuation[8];
|
||||
float gxlinearattanuation[8];
|
||||
float gxquadraticattanuation[8];
|
||||
|
||||
//lightmodel specs
|
||||
GXColorf gxglobalambientlightcolor;
|
||||
|
||||
//material specs
|
||||
GXColorf gxcurrentmaterialemissivecolor;
|
||||
GXColorf gxcurrentmaterialambientcolor;
|
||||
GXColorf gxcurrentmaterialdiffusecolor;
|
||||
GXColorf gxcurrentmaterialspecularcolor;
|
||||
float gxcurrentmaterialshininess;
|
||||
|
||||
/* culling */
|
||||
bool gxcullfaceanabled;
|
||||
GLenum gxwinding;
|
||||
|
||||
/* textures */
|
||||
bool tex2denabled;
|
||||
GLint curtexture;
|
||||
GLenum curtexturetarget;
|
||||
GXTexObj gxtextures[MAX_ARRAY]; //TODO: dynamic
|
||||
|
||||
/* end */
|
|
@ -0,0 +1,137 @@
|
|||
#---------------------------------------------------------------------------------
|
||||
.SUFFIXES:
|
||||
#---------------------------------------------------------------------------------
|
||||
ifeq ($(strip $(DEVKITPPC)),)
|
||||
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),wii)
|
||||
include $(DEVKITPPC)/wii_rules
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),cube)
|
||||
include $(DEVKITPPC)/gamecube_rules
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# BUILD is the directory where object files & intermediate files will be placed
|
||||
# SOURCES is a list of directories containing source code
|
||||
# INCLUDES is a list of directories containing extra header files
|
||||
# DATA is a list of directories containing binary files
|
||||
# LIBDIR is where the built library will be placed
|
||||
# all directories are relative to this makefile
|
||||
#---------------------------------------------------------------------------------
|
||||
BUILD ?= wii_release
|
||||
SOURCES := ../source ../source/ogc_io
|
||||
INCLUDES := ../include
|
||||
DATA :=
|
||||
LIBDIR := $(TOPDIR)/libogc/lib
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
#---------------------------------------------------------------------------------
|
||||
CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE)
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
|
||||
ASFLAGS := -g
|
||||
|
||||
ifneq ($(BUILD),debug)
|
||||
export CUBEBIN := $(LIBDIR)/$(PLATFORM)/libgl2gx.a
|
||||
else
|
||||
export CUBEBIN := $(LIBDIR)/$(PLATFORM)/libgl2gxd.a
|
||||
CFLAGS += -DFAT_DEBUG
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# any extra libraries we wish to link with the project
|
||||
#---------------------------------------------------------------------------------
|
||||
LIBS :=
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# list of directories containing libraries, this must be the top level containing
|
||||
# include and lib
|
||||
#---------------------------------------------------------------------------------
|
||||
LIBDIRS :=
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# no real need to edit anything past this point unless you need to add additional
|
||||
# rules for different file extensions
|
||||
#---------------------------------------------------------------------------------
|
||||
ifneq ($(BUILD),$(notdir $(CURDIR)))
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
export TOPDIR ?= $(CURDIR)/..
|
||||
|
||||
|
||||
export DEPSDIR := $(CURDIR)/$(BUILD)
|
||||
|
||||
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
|
||||
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
|
||||
|
||||
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
||||
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
||||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
||||
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
|
||||
|
||||
|
||||
export OFILES := $(addsuffix .o,$(BINFILES)) \
|
||||
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
|
||||
|
||||
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
|
||||
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
||||
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
||||
-I$(CURDIR)/$(BUILD) \
|
||||
-I$(LIBOGC_INC)
|
||||
|
||||
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
|
||||
-L$(LIBOGC_LIB)
|
||||
|
||||
.PHONY: $(BUILD) clean
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
$(BUILD):
|
||||
@[ -d $@ ] || mkdir -p $@
|
||||
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
clean:
|
||||
@echo clean ...
|
||||
@rm -fr wii_debug wii_release cube_debug cube_release $(LIBDIR)
|
||||
|
||||
all: $(CUBEBIN)
|
||||
|
||||
dist-bin:
|
||||
@tar --exclude=*CVS* -cvjf $(TOPDIR)/distribute/$(DATESTRING)/gl2gx-ogc-$(DATESTRING).tar.bz2 include lib
|
||||
|
||||
install:
|
||||
cp lib/wii/libgl2gx.a $(DEVKITPRO)/libogc/lib/wii
|
||||
cp lib/cube/libgl2gx.a $(DEVKITPRO)/libogc/lib/cube
|
||||
mkdir -p $(DEVKITPRO)/libogc/include/GL
|
||||
cp include/GL/gl.h $(DEVKITPRO)/libogc/include/GL
|
||||
cp include/GL/glu.h $(DEVKITPRO)/libogc/include/GL
|
||||
cp include/GL/glut.h $(DEVKITPRO)/libogc/include/GL
|
||||
cp include/GL/glext.h $(DEVKITPRO)/libogc/include/GL
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
else
|
||||
|
||||
DEPENDS := $(OFILES:.o=.d)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# main targets
|
||||
#---------------------------------------------------------------------------------
|
||||
$(CUBEBIN) : $(OFILES) $(LIBDIR)/$(PLATFORM)
|
||||
@rm -f "$(CUBEBIN)"
|
||||
@$(AR) rcs "$(CUBEBIN)" $(OFILES)
|
||||
@echo built ... $(notdir $@)
|
||||
|
||||
$(LIBDIR)/$(PLATFORM):
|
||||
mkdir -p $(LIBDIR)/$(PLATFORM)
|
||||
|
||||
-include $(DEPENDS)
|
||||
|
||||
#---------------------------------------------------------------------------------------
|
||||
endif
|
||||
#---------------------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
gl.o: /home/mike/Videos/gl2gx-master/gl2gx/libogc/../source/gl.c \
|
||||
/opt/devkitpro/libogc/include/ogcsys.h \
|
||||
/opt/devkitpro/libogc/include/gccore.h \
|
||||
/opt/devkitpro/libogc/include/ogc/dsp.h \
|
||||
/opt/devkitpro/libogc/include/gctypes.h \
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h \
|
||||
/opt/devkitpro/libogc/include/gcbool.h \
|
||||
/opt/devkitpro/libogc/include/ogc/arqueue.h \
|
||||
/opt/devkitpro/libogc/include/ogc/lwp_queue.h \
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h \
|
||||
/opt/devkitpro/libogc/include/ogc/arqmgr.h \
|
||||
/opt/devkitpro/libogc/include/ogc/audio.h \
|
||||
/opt/devkitpro/libogc/include/ogc/cache.h \
|
||||
/opt/devkitpro/libogc/include/ogc/card.h \
|
||||
/opt/devkitpro/libogc/include/ogc/cast.h \
|
||||
/opt/devkitpro/libogc/include/ogc/color.h \
|
||||
/opt/devkitpro/libogc/include/ogc/consol.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h \
|
||||
/opt/devkitpro/libogc/include/ogc/dvd.h \
|
||||
/opt/devkitpro/libogc/include/ogc/disc_io.h \
|
||||
/opt/devkitpro/libogc/include/ogc/exi.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h \
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h \
|
||||
/opt/devkitpro/libogc/include/ogc/si.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h \
|
||||
/opt/devkitpro/libogc/include/ogc/irq.h \
|
||||
/opt/devkitpro/libogc/include/ogc/context.h \
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h \
|
||||
/opt/devkitpro/libogc/include/ogc/mutex.h \
|
||||
/opt/devkitpro/libogc/include/ogc/message.h \
|
||||
/opt/devkitpro/libogc/include/ogc/semaphore.h \
|
||||
/opt/devkitpro/libogc/include/ogc/pad.h \
|
||||
/opt/devkitpro/libogc/include/ogc/tpl.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h \
|
||||
/opt/devkitpro/libogc/include/ogc/system.h \
|
||||
/opt/devkitpro/libogc/include/gcutil.h \
|
||||
/opt/devkitpro/libogc/include/ogc/video.h \
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h \
|
||||
/opt/devkitpro/libogc/include/ogc/usbgecko.h \
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h \
|
||||
/opt/devkitpro/libogc/include/ogc/texconv.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/glint.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glext.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h
|
||||
/opt/devkitpro/libogc/include/ogcsys.h:
|
||||
/opt/devkitpro/libogc/include/gccore.h:
|
||||
/opt/devkitpro/libogc/include/ogc/dsp.h:
|
||||
/opt/devkitpro/libogc/include/gctypes.h:
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h:
|
||||
/opt/devkitpro/libogc/include/gcbool.h:
|
||||
/opt/devkitpro/libogc/include/ogc/arqueue.h:
|
||||
/opt/devkitpro/libogc/include/ogc/lwp_queue.h:
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h:
|
||||
/opt/devkitpro/libogc/include/ogc/arqmgr.h:
|
||||
/opt/devkitpro/libogc/include/ogc/audio.h:
|
||||
/opt/devkitpro/libogc/include/ogc/cache.h:
|
||||
/opt/devkitpro/libogc/include/ogc/card.h:
|
||||
/opt/devkitpro/libogc/include/ogc/cast.h:
|
||||
/opt/devkitpro/libogc/include/ogc/color.h:
|
||||
/opt/devkitpro/libogc/include/ogc/consol.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h:
|
||||
/opt/devkitpro/libogc/include/ogc/dvd.h:
|
||||
/opt/devkitpro/libogc/include/ogc/disc_io.h:
|
||||
/opt/devkitpro/libogc/include/ogc/exi.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h:
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h:
|
||||
/opt/devkitpro/libogc/include/ogc/si.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h:
|
||||
/opt/devkitpro/libogc/include/ogc/irq.h:
|
||||
/opt/devkitpro/libogc/include/ogc/context.h:
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h:
|
||||
/opt/devkitpro/libogc/include/ogc/mutex.h:
|
||||
/opt/devkitpro/libogc/include/ogc/message.h:
|
||||
/opt/devkitpro/libogc/include/ogc/semaphore.h:
|
||||
/opt/devkitpro/libogc/include/ogc/pad.h:
|
||||
/opt/devkitpro/libogc/include/ogc/tpl.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h:
|
||||
/opt/devkitpro/libogc/include/ogc/system.h:
|
||||
/opt/devkitpro/libogc/include/gcutil.h:
|
||||
/opt/devkitpro/libogc/include/ogc/video.h:
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h:
|
||||
/opt/devkitpro/libogc/include/ogc/usbgecko.h:
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h:
|
||||
/opt/devkitpro/libogc/include/ogc/texconv.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/glint.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glext.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h:
|
Binary file not shown.
|
@ -0,0 +1,95 @@
|
|||
glu.o: /home/mike/Videos/gl2gx-master/gl2gx/libogc/../source/glu.c \
|
||||
/opt/devkitpro/libogc/include/ogcsys.h \
|
||||
/opt/devkitpro/libogc/include/gccore.h \
|
||||
/opt/devkitpro/libogc/include/ogc/dsp.h \
|
||||
/opt/devkitpro/libogc/include/gctypes.h \
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h \
|
||||
/opt/devkitpro/libogc/include/gcbool.h \
|
||||
/opt/devkitpro/libogc/include/ogc/arqueue.h \
|
||||
/opt/devkitpro/libogc/include/ogc/lwp_queue.h \
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h \
|
||||
/opt/devkitpro/libogc/include/ogc/arqmgr.h \
|
||||
/opt/devkitpro/libogc/include/ogc/audio.h \
|
||||
/opt/devkitpro/libogc/include/ogc/cache.h \
|
||||
/opt/devkitpro/libogc/include/ogc/card.h \
|
||||
/opt/devkitpro/libogc/include/ogc/cast.h \
|
||||
/opt/devkitpro/libogc/include/ogc/color.h \
|
||||
/opt/devkitpro/libogc/include/ogc/consol.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h \
|
||||
/opt/devkitpro/libogc/include/ogc/dvd.h \
|
||||
/opt/devkitpro/libogc/include/ogc/disc_io.h \
|
||||
/opt/devkitpro/libogc/include/ogc/exi.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h \
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h \
|
||||
/opt/devkitpro/libogc/include/ogc/si.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h \
|
||||
/opt/devkitpro/libogc/include/ogc/irq.h \
|
||||
/opt/devkitpro/libogc/include/ogc/context.h \
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h \
|
||||
/opt/devkitpro/libogc/include/ogc/mutex.h \
|
||||
/opt/devkitpro/libogc/include/ogc/message.h \
|
||||
/opt/devkitpro/libogc/include/ogc/semaphore.h \
|
||||
/opt/devkitpro/libogc/include/ogc/pad.h \
|
||||
/opt/devkitpro/libogc/include/ogc/tpl.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h \
|
||||
/opt/devkitpro/libogc/include/ogc/system.h \
|
||||
/opt/devkitpro/libogc/include/gcutil.h \
|
||||
/opt/devkitpro/libogc/include/ogc/video.h \
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h \
|
||||
/opt/devkitpro/libogc/include/ogc/usbgecko.h \
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h \
|
||||
/opt/devkitpro/libogc/include/ogc/texconv.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/glint.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glext.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glu.h
|
||||
/opt/devkitpro/libogc/include/ogcsys.h:
|
||||
/opt/devkitpro/libogc/include/gccore.h:
|
||||
/opt/devkitpro/libogc/include/ogc/dsp.h:
|
||||
/opt/devkitpro/libogc/include/gctypes.h:
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h:
|
||||
/opt/devkitpro/libogc/include/gcbool.h:
|
||||
/opt/devkitpro/libogc/include/ogc/arqueue.h:
|
||||
/opt/devkitpro/libogc/include/ogc/lwp_queue.h:
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h:
|
||||
/opt/devkitpro/libogc/include/ogc/arqmgr.h:
|
||||
/opt/devkitpro/libogc/include/ogc/audio.h:
|
||||
/opt/devkitpro/libogc/include/ogc/cache.h:
|
||||
/opt/devkitpro/libogc/include/ogc/card.h:
|
||||
/opt/devkitpro/libogc/include/ogc/cast.h:
|
||||
/opt/devkitpro/libogc/include/ogc/color.h:
|
||||
/opt/devkitpro/libogc/include/ogc/consol.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h:
|
||||
/opt/devkitpro/libogc/include/ogc/dvd.h:
|
||||
/opt/devkitpro/libogc/include/ogc/disc_io.h:
|
||||
/opt/devkitpro/libogc/include/ogc/exi.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h:
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h:
|
||||
/opt/devkitpro/libogc/include/ogc/si.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h:
|
||||
/opt/devkitpro/libogc/include/ogc/irq.h:
|
||||
/opt/devkitpro/libogc/include/ogc/context.h:
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h:
|
||||
/opt/devkitpro/libogc/include/ogc/mutex.h:
|
||||
/opt/devkitpro/libogc/include/ogc/message.h:
|
||||
/opt/devkitpro/libogc/include/ogc/semaphore.h:
|
||||
/opt/devkitpro/libogc/include/ogc/pad.h:
|
||||
/opt/devkitpro/libogc/include/ogc/tpl.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h:
|
||||
/opt/devkitpro/libogc/include/ogc/system.h:
|
||||
/opt/devkitpro/libogc/include/gcutil.h:
|
||||
/opt/devkitpro/libogc/include/ogc/video.h:
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h:
|
||||
/opt/devkitpro/libogc/include/ogc/usbgecko.h:
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h:
|
||||
/opt/devkitpro/libogc/include/ogc/texconv.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/glint.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glext.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glu.h:
|
Binary file not shown.
|
@ -0,0 +1,97 @@
|
|||
glut.o: /home/mike/Videos/gl2gx-master/gl2gx/libogc/../source/glut.c \
|
||||
/opt/devkitpro/libogc/include/ogcsys.h \
|
||||
/opt/devkitpro/libogc/include/gccore.h \
|
||||
/opt/devkitpro/libogc/include/ogc/dsp.h \
|
||||
/opt/devkitpro/libogc/include/gctypes.h \
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h \
|
||||
/opt/devkitpro/libogc/include/gcbool.h \
|
||||
/opt/devkitpro/libogc/include/ogc/arqueue.h \
|
||||
/opt/devkitpro/libogc/include/ogc/lwp_queue.h \
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h \
|
||||
/opt/devkitpro/libogc/include/ogc/arqmgr.h \
|
||||
/opt/devkitpro/libogc/include/ogc/audio.h \
|
||||
/opt/devkitpro/libogc/include/ogc/cache.h \
|
||||
/opt/devkitpro/libogc/include/ogc/card.h \
|
||||
/opt/devkitpro/libogc/include/ogc/cast.h \
|
||||
/opt/devkitpro/libogc/include/ogc/color.h \
|
||||
/opt/devkitpro/libogc/include/ogc/consol.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h \
|
||||
/opt/devkitpro/libogc/include/ogc/dvd.h \
|
||||
/opt/devkitpro/libogc/include/ogc/disc_io.h \
|
||||
/opt/devkitpro/libogc/include/ogc/exi.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h \
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h \
|
||||
/opt/devkitpro/libogc/include/ogc/si.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h \
|
||||
/opt/devkitpro/libogc/include/ogc/irq.h \
|
||||
/opt/devkitpro/libogc/include/ogc/context.h \
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h \
|
||||
/opt/devkitpro/libogc/include/ogc/mutex.h \
|
||||
/opt/devkitpro/libogc/include/ogc/message.h \
|
||||
/opt/devkitpro/libogc/include/ogc/semaphore.h \
|
||||
/opt/devkitpro/libogc/include/ogc/pad.h \
|
||||
/opt/devkitpro/libogc/include/ogc/tpl.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h \
|
||||
/opt/devkitpro/libogc/include/ogc/system.h \
|
||||
/opt/devkitpro/libogc/include/gcutil.h \
|
||||
/opt/devkitpro/libogc/include/ogc/video.h \
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h \
|
||||
/opt/devkitpro/libogc/include/ogc/usbgecko.h \
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h \
|
||||
/opt/devkitpro/libogc/include/ogc/texconv.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/glint.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glext.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glut.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glu.h
|
||||
/opt/devkitpro/libogc/include/ogcsys.h:
|
||||
/opt/devkitpro/libogc/include/gccore.h:
|
||||
/opt/devkitpro/libogc/include/ogc/dsp.h:
|
||||
/opt/devkitpro/libogc/include/gctypes.h:
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h:
|
||||
/opt/devkitpro/libogc/include/gcbool.h:
|
||||
/opt/devkitpro/libogc/include/ogc/arqueue.h:
|
||||
/opt/devkitpro/libogc/include/ogc/lwp_queue.h:
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h:
|
||||
/opt/devkitpro/libogc/include/ogc/arqmgr.h:
|
||||
/opt/devkitpro/libogc/include/ogc/audio.h:
|
||||
/opt/devkitpro/libogc/include/ogc/cache.h:
|
||||
/opt/devkitpro/libogc/include/ogc/card.h:
|
||||
/opt/devkitpro/libogc/include/ogc/cast.h:
|
||||
/opt/devkitpro/libogc/include/ogc/color.h:
|
||||
/opt/devkitpro/libogc/include/ogc/consol.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h:
|
||||
/opt/devkitpro/libogc/include/ogc/dvd.h:
|
||||
/opt/devkitpro/libogc/include/ogc/disc_io.h:
|
||||
/opt/devkitpro/libogc/include/ogc/exi.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h:
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h:
|
||||
/opt/devkitpro/libogc/include/ogc/si.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h:
|
||||
/opt/devkitpro/libogc/include/ogc/irq.h:
|
||||
/opt/devkitpro/libogc/include/ogc/context.h:
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h:
|
||||
/opt/devkitpro/libogc/include/ogc/mutex.h:
|
||||
/opt/devkitpro/libogc/include/ogc/message.h:
|
||||
/opt/devkitpro/libogc/include/ogc/semaphore.h:
|
||||
/opt/devkitpro/libogc/include/ogc/pad.h:
|
||||
/opt/devkitpro/libogc/include/ogc/tpl.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h:
|
||||
/opt/devkitpro/libogc/include/ogc/system.h:
|
||||
/opt/devkitpro/libogc/include/gcutil.h:
|
||||
/opt/devkitpro/libogc/include/ogc/video.h:
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h:
|
||||
/opt/devkitpro/libogc/include/ogc/usbgecko.h:
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h:
|
||||
/opt/devkitpro/libogc/include/ogc/texconv.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/glint.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glext.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glut.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glu.h:
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,348 @@
|
|||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
** Software License B, Version 1.1 (the "License"), the contents of this
|
||||
** file are subject only to the provisions of the License. You may not use
|
||||
** this file except in compliance with the License. You may obtain a copy
|
||||
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
|
||||
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
|
||||
**
|
||||
** http://oss.sgi.com/projects/FreeB
|
||||
**
|
||||
** Note that, as provided in the License, the Software is distributed on an
|
||||
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
|
||||
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
|
||||
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
|
||||
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||
**
|
||||
** Original Code. The Original Code is: OpenGL Sample Implementation,
|
||||
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
|
||||
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
|
||||
** Copyright in any portions created by third parties is as indicated
|
||||
** elsewhere herein. All Rights Reserved.
|
||||
**
|
||||
** Additional Notice Provisions: This software was created using the
|
||||
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
|
||||
** not been independently verified as being compliant with the OpenGL(R)
|
||||
** version 1.2.1 Specification.
|
||||
*/
|
||||
|
||||
#ifndef __glu_h__
|
||||
#define __glu_h__
|
||||
|
||||
#if defined(USE_MGL_NAMESPACE)
|
||||
#include "glu_mangle.h"
|
||||
#endif
|
||||
|
||||
#include <GL/gl.h>
|
||||
|
||||
#ifndef GLAPIENTRY
|
||||
#define GLAPIENTRY
|
||||
#endif
|
||||
|
||||
#ifndef GLAPIENTRYP
|
||||
#define GLAPIENTRYP GLAPIENTRY *
|
||||
#endif
|
||||
|
||||
#if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
|
||||
# undef GLAPI
|
||||
# define GLAPI __declspec(dllexport)
|
||||
#elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL)
|
||||
/* tag specifying we're building for DLL runtime support */
|
||||
# undef GLAPI
|
||||
# define GLAPI __declspec(dllimport)
|
||||
#elif !defined(GLAPI)
|
||||
/* for use with static link lib build of Win32 edition only */
|
||||
# define GLAPI extern
|
||||
#endif /* _STATIC_MESA support */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
/* Extensions */
|
||||
#define GLU_EXT_object_space_tess 1
|
||||
#define GLU_EXT_nurbs_tessellator 1
|
||||
|
||||
/* Boolean */
|
||||
#define GLU_FALSE 0
|
||||
#define GLU_TRUE 1
|
||||
|
||||
/* Version */
|
||||
#define GLU_VERSION_1_1 1
|
||||
#define GLU_VERSION_1_2 1
|
||||
#define GLU_VERSION_1_3 1
|
||||
|
||||
/* StringName */
|
||||
#define GLU_VERSION 100800
|
||||
#define GLU_EXTENSIONS 100801
|
||||
|
||||
/* ErrorCode */
|
||||
#define GLU_INVALID_ENUM 100900
|
||||
#define GLU_INVALID_VALUE 100901
|
||||
#define GLU_OUT_OF_MEMORY 100902
|
||||
#define GLU_INCOMPATIBLE_GL_VERSION 100903
|
||||
#define GLU_INVALID_OPERATION 100904
|
||||
|
||||
/* NurbsDisplay */
|
||||
/* GLU_FILL */
|
||||
#define GLU_OUTLINE_POLYGON 100240
|
||||
#define GLU_OUTLINE_PATCH 100241
|
||||
|
||||
/* NurbsCallback */
|
||||
#define GLU_NURBS_ERROR 100103
|
||||
#define GLU_ERROR 100103
|
||||
#define GLU_NURBS_BEGIN 100164
|
||||
#define GLU_NURBS_BEGIN_EXT 100164
|
||||
#define GLU_NURBS_VERTEX 100165
|
||||
#define GLU_NURBS_VERTEX_EXT 100165
|
||||
#define GLU_NURBS_NORMAL 100166
|
||||
#define GLU_NURBS_NORMAL_EXT 100166
|
||||
#define GLU_NURBS_COLOR 100167
|
||||
#define GLU_NURBS_COLOR_EXT 100167
|
||||
#define GLU_NURBS_TEXTURE_COORD 100168
|
||||
#define GLU_NURBS_TEX_COORD_EXT 100168
|
||||
#define GLU_NURBS_END 100169
|
||||
#define GLU_NURBS_END_EXT 100169
|
||||
#define GLU_NURBS_BEGIN_DATA 100170
|
||||
#define GLU_NURBS_BEGIN_DATA_EXT 100170
|
||||
#define GLU_NURBS_VERTEX_DATA 100171
|
||||
#define GLU_NURBS_VERTEX_DATA_EXT 100171
|
||||
#define GLU_NURBS_NORMAL_DATA 100172
|
||||
#define GLU_NURBS_NORMAL_DATA_EXT 100172
|
||||
#define GLU_NURBS_COLOR_DATA 100173
|
||||
#define GLU_NURBS_COLOR_DATA_EXT 100173
|
||||
#define GLU_NURBS_TEXTURE_COORD_DATA 100174
|
||||
#define GLU_NURBS_TEX_COORD_DATA_EXT 100174
|
||||
#define GLU_NURBS_END_DATA 100175
|
||||
#define GLU_NURBS_END_DATA_EXT 100175
|
||||
|
||||
/* NurbsError */
|
||||
#define GLU_NURBS_ERROR1 100251
|
||||
#define GLU_NURBS_ERROR2 100252
|
||||
#define GLU_NURBS_ERROR3 100253
|
||||
#define GLU_NURBS_ERROR4 100254
|
||||
#define GLU_NURBS_ERROR5 100255
|
||||
#define GLU_NURBS_ERROR6 100256
|
||||
#define GLU_NURBS_ERROR7 100257
|
||||
#define GLU_NURBS_ERROR8 100258
|
||||
#define GLU_NURBS_ERROR9 100259
|
||||
#define GLU_NURBS_ERROR10 100260
|
||||
#define GLU_NURBS_ERROR11 100261
|
||||
#define GLU_NURBS_ERROR12 100262
|
||||
#define GLU_NURBS_ERROR13 100263
|
||||
#define GLU_NURBS_ERROR14 100264
|
||||
#define GLU_NURBS_ERROR15 100265
|
||||
#define GLU_NURBS_ERROR16 100266
|
||||
#define GLU_NURBS_ERROR17 100267
|
||||
#define GLU_NURBS_ERROR18 100268
|
||||
#define GLU_NURBS_ERROR19 100269
|
||||
#define GLU_NURBS_ERROR20 100270
|
||||
#define GLU_NURBS_ERROR21 100271
|
||||
#define GLU_NURBS_ERROR22 100272
|
||||
#define GLU_NURBS_ERROR23 100273
|
||||
#define GLU_NURBS_ERROR24 100274
|
||||
#define GLU_NURBS_ERROR25 100275
|
||||
#define GLU_NURBS_ERROR26 100276
|
||||
#define GLU_NURBS_ERROR27 100277
|
||||
#define GLU_NURBS_ERROR28 100278
|
||||
#define GLU_NURBS_ERROR29 100279
|
||||
#define GLU_NURBS_ERROR30 100280
|
||||
#define GLU_NURBS_ERROR31 100281
|
||||
#define GLU_NURBS_ERROR32 100282
|
||||
#define GLU_NURBS_ERROR33 100283
|
||||
#define GLU_NURBS_ERROR34 100284
|
||||
#define GLU_NURBS_ERROR35 100285
|
||||
#define GLU_NURBS_ERROR36 100286
|
||||
#define GLU_NURBS_ERROR37 100287
|
||||
|
||||
/* NurbsProperty */
|
||||
#define GLU_AUTO_LOAD_MATRIX 100200
|
||||
#define GLU_CULLING 100201
|
||||
#define GLU_SAMPLING_TOLERANCE 100203
|
||||
#define GLU_DISPLAY_MODE 100204
|
||||
#define GLU_PARAMETRIC_TOLERANCE 100202
|
||||
#define GLU_SAMPLING_METHOD 100205
|
||||
#define GLU_U_STEP 100206
|
||||
#define GLU_V_STEP 100207
|
||||
#define GLU_NURBS_MODE 100160
|
||||
#define GLU_NURBS_MODE_EXT 100160
|
||||
#define GLU_NURBS_TESSELLATOR 100161
|
||||
#define GLU_NURBS_TESSELLATOR_EXT 100161
|
||||
#define GLU_NURBS_RENDERER 100162
|
||||
#define GLU_NURBS_RENDERER_EXT 100162
|
||||
|
||||
/* NurbsSampling */
|
||||
#define GLU_OBJECT_PARAMETRIC_ERROR 100208
|
||||
#define GLU_OBJECT_PARAMETRIC_ERROR_EXT 100208
|
||||
#define GLU_OBJECT_PATH_LENGTH 100209
|
||||
#define GLU_OBJECT_PATH_LENGTH_EXT 100209
|
||||
#define GLU_PATH_LENGTH 100215
|
||||
#define GLU_PARAMETRIC_ERROR 100216
|
||||
#define GLU_DOMAIN_DISTANCE 100217
|
||||
|
||||
/* NurbsTrim */
|
||||
#define GLU_MAP1_TRIM_2 100210
|
||||
#define GLU_MAP1_TRIM_3 100211
|
||||
|
||||
/* QuadricDrawStyle */
|
||||
#define GLU_POINT 100010
|
||||
#define GLU_LINE 100011
|
||||
#define GLU_FILL 100012
|
||||
#define GLU_SILHOUETTE 100013
|
||||
|
||||
/* QuadricCallback */
|
||||
/* GLU_ERROR */
|
||||
|
||||
/* QuadricNormal */
|
||||
#define GLU_SMOOTH 100000
|
||||
#define GLU_FLAT 100001
|
||||
#define GLU_NONE 100002
|
||||
|
||||
/* QuadricOrientation */
|
||||
#define GLU_OUTSIDE 100020
|
||||
#define GLU_INSIDE 100021
|
||||
|
||||
/* TessCallback */
|
||||
#define GLU_TESS_BEGIN 100100
|
||||
#define GLU_BEGIN 100100
|
||||
#define GLU_TESS_VERTEX 100101
|
||||
#define GLU_VERTEX 100101
|
||||
#define GLU_TESS_END 100102
|
||||
#define GLU_END 100102
|
||||
#define GLU_TESS_ERROR 100103
|
||||
#define GLU_TESS_EDGE_FLAG 100104
|
||||
#define GLU_EDGE_FLAG 100104
|
||||
#define GLU_TESS_COMBINE 100105
|
||||
#define GLU_TESS_BEGIN_DATA 100106
|
||||
#define GLU_TESS_VERTEX_DATA 100107
|
||||
#define GLU_TESS_END_DATA 100108
|
||||
#define GLU_TESS_ERROR_DATA 100109
|
||||
#define GLU_TESS_EDGE_FLAG_DATA 100110
|
||||
#define GLU_TESS_COMBINE_DATA 100111
|
||||
|
||||
/* TessContour */
|
||||
#define GLU_CW 100120
|
||||
#define GLU_CCW 100121
|
||||
#define GLU_INTERIOR 100122
|
||||
#define GLU_EXTERIOR 100123
|
||||
#define GLU_UNKNOWN 100124
|
||||
|
||||
/* TessProperty */
|
||||
#define GLU_TESS_WINDING_RULE 100140
|
||||
#define GLU_TESS_BOUNDARY_ONLY 100141
|
||||
#define GLU_TESS_TOLERANCE 100142
|
||||
|
||||
/* TessError */
|
||||
#define GLU_TESS_ERROR1 100151
|
||||
#define GLU_TESS_ERROR2 100152
|
||||
#define GLU_TESS_ERROR3 100153
|
||||
#define GLU_TESS_ERROR4 100154
|
||||
#define GLU_TESS_ERROR5 100155
|
||||
#define GLU_TESS_ERROR6 100156
|
||||
#define GLU_TESS_ERROR7 100157
|
||||
#define GLU_TESS_ERROR8 100158
|
||||
#define GLU_TESS_MISSING_BEGIN_POLYGON 100151
|
||||
#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152
|
||||
#define GLU_TESS_MISSING_END_POLYGON 100153
|
||||
#define GLU_TESS_MISSING_END_CONTOUR 100154
|
||||
#define GLU_TESS_COORD_TOO_LARGE 100155
|
||||
#define GLU_TESS_NEED_COMBINE_CALLBACK 100156
|
||||
|
||||
/* TessWinding */
|
||||
#define GLU_TESS_WINDING_ODD 100130
|
||||
#define GLU_TESS_WINDING_NONZERO 100131
|
||||
#define GLU_TESS_WINDING_POSITIVE 100132
|
||||
#define GLU_TESS_WINDING_NEGATIVE 100133
|
||||
#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
class GLUnurbs;
|
||||
class GLUquadric;
|
||||
class GLUtesselator;
|
||||
#else
|
||||
typedef struct GLUnurbs GLUnurbs;
|
||||
typedef struct GLUquadric GLUquadric;
|
||||
typedef struct GLUtesselator GLUtesselator;
|
||||
#endif
|
||||
|
||||
typedef GLUnurbs GLUnurbsObj;
|
||||
typedef GLUquadric GLUquadricObj;
|
||||
typedef GLUtesselator GLUtesselatorObj;
|
||||
typedef GLUtesselator GLUtriangulatorObj;
|
||||
|
||||
#define GLU_TESS_MAX_COORD 1.0e150
|
||||
|
||||
/* Internal convenience typedefs */
|
||||
typedef void (GLAPIENTRYP _GLUfuncptr)();
|
||||
|
||||
GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
|
||||
GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
|
||||
GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb);
|
||||
GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb);
|
||||
GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
|
||||
GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
|
||||
GLAPI GLint GLAPIENTRY gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
|
||||
GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
|
||||
GLAPI GLint GLAPIENTRY gluBuild3DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
|
||||
GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
|
||||
GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
|
||||
GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
|
||||
GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
|
||||
GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
|
||||
GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess);
|
||||
GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
|
||||
GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb);
|
||||
GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess);
|
||||
GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb);
|
||||
GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb);
|
||||
GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
|
||||
GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
|
||||
GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name);
|
||||
GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
|
||||
GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
|
||||
GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
|
||||
GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void);
|
||||
GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void);
|
||||
GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void);
|
||||
GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
|
||||
GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
|
||||
GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
|
||||
GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
|
||||
GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
|
||||
GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
|
||||
GLAPI void GLAPIENTRY gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type);
|
||||
GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
|
||||
GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
|
||||
GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
|
||||
GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
|
||||
GLAPI GLint GLAPIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ);
|
||||
GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
|
||||
GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
|
||||
GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
|
||||
GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
|
||||
GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
|
||||
GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
|
||||
GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
|
||||
GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
|
||||
GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess);
|
||||
GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
|
||||
GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
|
||||
GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess);
|
||||
GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
|
||||
GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
|
||||
GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
|
||||
GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
|
||||
GLAPI GLint GLAPIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);
|
||||
GLAPI GLint GLAPIENTRY gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __glu_h__ */
|
|
@ -0,0 +1,716 @@
|
|||
#ifndef __glut_h__
|
||||
#define __glut_h__
|
||||
|
||||
/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */
|
||||
|
||||
/* 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. */
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
||||
/* GLUT 3.7 now tries to avoid including <windows.h>
|
||||
to avoid name space pollution, but Win32's <GL/gl.h>
|
||||
needs APIENTRY and WINGDIAPI defined properly. */
|
||||
# if 0
|
||||
/* This would put tons of macros and crap in our clean name space. */
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# include <windows.h>
|
||||
# else
|
||||
/* XXX This is from Win32's <windef.h> */
|
||||
# ifndef APIENTRY
|
||||
# define GLUT_APIENTRY_DEFINED
|
||||
# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__)
|
||||
# define APIENTRY __stdcall
|
||||
# else
|
||||
# define APIENTRY
|
||||
# endif
|
||||
# endif
|
||||
/* XXX This is from Win32's <winnt.h> */
|
||||
# ifndef CALLBACK
|
||||
# if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS) || defined(__LCC__)
|
||||
# define CALLBACK __stdcall
|
||||
# else
|
||||
# define CALLBACK
|
||||
# endif
|
||||
# endif
|
||||
/* XXX Hack for lcc compiler. It doesn't support __declspec(dllimport), just __stdcall. */
|
||||
# if defined( __LCC__ )
|
||||
# undef WINGDIAPI
|
||||
# define WINGDIAPI __stdcall
|
||||
# else
|
||||
/* XXX This is from Win32's <wingdi.h> and <winnt.h> */
|
||||
# ifndef WINGDIAPI
|
||||
# define GLUT_WINGDIAPI_DEFINED
|
||||
# define WINGDIAPI __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
/* XXX This is from Win32's <ctype.h> */
|
||||
# ifndef _WCHAR_T_DEFINED
|
||||
typedef unsigned short wchar_t;
|
||||
# define _WCHAR_T_DEFINED
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* To disable automatic library usage for GLUT, define GLUT_NO_LIB_PRAGMA
|
||||
in your compile preprocessor options. */
|
||||
# if !defined(GLUT_BUILDING_LIB) && !defined(GLUT_NO_LIB_PRAGMA)
|
||||
# pragma comment (lib, "winmm.lib") /* link with Windows MultiMedia lib */
|
||||
/* To enable automatic SGI OpenGL for Windows library usage for GLUT,
|
||||
define GLUT_USE_SGI_OPENGL in your compile preprocessor options. */
|
||||
# ifdef GLUT_USE_SGI_OPENGL
|
||||
# pragma comment (lib, "opengl.lib") /* link with SGI OpenGL for Windows lib */
|
||||
# pragma comment (lib, "glu.lib") /* link with SGI OpenGL Utility lib */
|
||||
# pragma comment (lib, "glut.lib") /* link with Win32 GLUT for SGI OpenGL lib */
|
||||
# else
|
||||
# pragma comment (lib, "opengl32.lib") /* link with Microsoft OpenGL lib */
|
||||
# pragma comment (lib, "glu32.lib") /* link with Microsoft OpenGL Utility lib */
|
||||
# pragma comment (lib, "glut32.lib") /* link with Win32 GLUT lib */
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* To disable supression of annoying warnings about floats being promoted
|
||||
to doubles, define GLUT_NO_WARNING_DISABLE in your compile preprocessor
|
||||
options. */
|
||||
# ifndef GLUT_NO_WARNING_DISABLE
|
||||
# pragma warning (disable:4244) /* Disable bogus VC++ 4.2 conversion warnings. */
|
||||
# pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */
|
||||
# endif
|
||||
|
||||
/* Win32 has an annoying issue where there are multiple C run-time
|
||||
libraries (CRTs). If the executable is linked with a different CRT
|
||||
from the GLUT DLL, the GLUT DLL will not share the same CRT static
|
||||
data seen by the executable. In particular, atexit callbacks registered
|
||||
in the executable will not be called if GLUT calls its (different)
|
||||
exit routine). GLUT is typically built with the
|
||||
"/MD" option (the CRT with multithreading DLL support), but the Visual
|
||||
C++ linker default is "/ML" (the single threaded CRT).
|
||||
|
||||
One workaround to this issue is requiring users to always link with
|
||||
the same CRT as GLUT is compiled with. That requires users supply a
|
||||
non-standard option. GLUT 3.7 has its own built-in workaround where
|
||||
the executable's "exit" function pointer is covertly passed to GLUT.
|
||||
GLUT then calls the executable's exit function pointer to ensure that
|
||||
any "atexit" calls registered by the application are called if GLUT
|
||||
needs to exit.
|
||||
|
||||
Note that the __glut*WithExit routines should NEVER be called directly.
|
||||
To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK. */
|
||||
|
||||
/* XXX This is from Win32's <process.h> */
|
||||
# if !defined(_MSC_VER) && !defined(__cdecl)
|
||||
/* Define __cdecl for non-Microsoft compilers. */
|
||||
# define __cdecl
|
||||
# define GLUT_DEFINED___CDECL
|
||||
# endif
|
||||
# ifndef _CRTIMP
|
||||
# ifdef _NTSDK
|
||||
/* Definition compatible with NT SDK */
|
||||
# define _CRTIMP
|
||||
# else
|
||||
/* Current definition */
|
||||
# ifdef _DLL
|
||||
# define _CRTIMP __declspec(dllimport)
|
||||
# else
|
||||
# define _CRTIMP
|
||||
# endif
|
||||
# endif
|
||||
# define GLUT_DEFINED__CRTIMP
|
||||
# endif
|
||||
|
||||
/* GLUT API entry point declarations for Win32. */
|
||||
# ifdef GLUT_BUILDING_LIB
|
||||
# define GLUTAPI __declspec(dllexport)
|
||||
# else
|
||||
# ifdef _DLL
|
||||
# define GLUTAPI __declspec(dllimport)
|
||||
# else
|
||||
# define GLUTAPI extern
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* GLUT callback calling convention for Win32. */
|
||||
# define GLUTCALLBACK __cdecl
|
||||
|
||||
#endif /* _WIN32 */
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
# ifndef GLUT_BUILDING_LIB
|
||||
extern _CRTIMP void __cdecl exit(int);
|
||||
# endif
|
||||
#else
|
||||
/* non-Win32 case. */
|
||||
/* Define APIENTRY and CALLBACK to nothing if we aren't on Win32. */
|
||||
# define APIENTRY
|
||||
# define GLUT_APIENTRY_DEFINED
|
||||
# define CALLBACK
|
||||
/* Define GLUTAPI and GLUTCALLBACK as below if we aren't on Win32. */
|
||||
# define GLUTAPI extern
|
||||
# define GLUTCALLBACK
|
||||
/* Prototype exit for the non-Win32 case (see above). */
|
||||
extern void exit(int);
|
||||
#endif
|
||||
|
||||
/**
|
||||
GLUT API revision history:
|
||||
|
||||
GLUT_API_VERSION is updated to reflect incompatible GLUT
|
||||
API changes (interface changes, semantic changes, deletions,
|
||||
or additions).
|
||||
|
||||
GLUT_API_VERSION=1 First public release of GLUT. 11/29/94
|
||||
|
||||
GLUT_API_VERSION=2 Added support for OpenGL/GLX multisampling,
|
||||
extension. Supports new input devices like tablet, dial and button
|
||||
box, and Spaceball. Easy to query OpenGL extensions.
|
||||
|
||||
GLUT_API_VERSION=3 glutMenuStatus added.
|
||||
|
||||
GLUT_API_VERSION=4 glutInitDisplayString, glutWarpPointer,
|
||||
glutBitmapLength, glutStrokeLength, glutWindowStatusFunc, dynamic
|
||||
video resize subAPI, glutPostWindowRedisplay, glutKeyboardUpFunc,
|
||||
glutSpecialUpFunc, glutIgnoreKeyRepeat, glutSetKeyRepeat,
|
||||
glutJoystickFunc, glutForceJoystickFunc (NOT FINALIZED!).
|
||||
**/
|
||||
#ifndef GLUT_API_VERSION /* allow this to be overriden */
|
||||
#define GLUT_API_VERSION 3
|
||||
#endif
|
||||
|
||||
/**
|
||||
GLUT implementation revision history:
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION is updated to reflect both GLUT
|
||||
API revisions and implementation revisions (ie, bug fixes).
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=1 mjk's first public release of
|
||||
GLUT Xlib-based implementation. 11/29/94
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=2 mjk's second public release of
|
||||
GLUT Xlib-based implementation providing GLUT version 2
|
||||
interfaces.
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=3 mjk's GLUT 2.2 images. 4/17/95
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=4 mjk's GLUT 2.3 images. 6/?/95
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=5 mjk's GLUT 3.0 images. 10/?/95
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=7 mjk's GLUT 3.1+ with glutWarpPoitner. 7/24/96
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=8 mjk's GLUT 3.1+ with glutWarpPoitner
|
||||
and video resize. 1/3/97
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=9 mjk's GLUT 3.4 release with early GLUT 4 routines.
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=11 Mesa 2.5's GLUT 3.6 release.
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=12 mjk's GLUT 3.6 release with early GLUT 4 routines + signal handling.
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=13 mjk's GLUT 3.7 beta with GameGLUT support.
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=14 mjk's GLUT 3.7 beta with f90gl friend interface.
|
||||
|
||||
GLUT_XLIB_IMPLEMENTATION=15 mjk's GLUT 3.7 beta sync'ed with Mesa <GL/glut.h>
|
||||
**/
|
||||
#ifndef GLUT_XLIB_IMPLEMENTATION /* Allow this to be overriden. */
|
||||
#define GLUT_XLIB_IMPLEMENTATION 15
|
||||
#endif
|
||||
|
||||
/* Display mode bit masks. */
|
||||
#define GLUT_RGB 0
|
||||
#define GLUT_RGBA GLUT_RGB
|
||||
#define GLUT_INDEX 1
|
||||
#define GLUT_SINGLE 0
|
||||
#define GLUT_DOUBLE 2
|
||||
#define GLUT_ACCUM 4
|
||||
#define GLUT_ALPHA 8
|
||||
#define GLUT_DEPTH 16
|
||||
#define GLUT_STENCIL 32
|
||||
#if (GLUT_API_VERSION >= 2)
|
||||
#define GLUT_MULTISAMPLE 128
|
||||
#define GLUT_STEREO 256
|
||||
#endif
|
||||
#if (GLUT_API_VERSION >= 3)
|
||||
#define GLUT_LUMINANCE 512
|
||||
#endif
|
||||
|
||||
/* Mouse buttons. */
|
||||
#define GLUT_LEFT_BUTTON 0
|
||||
#define GLUT_MIDDLE_BUTTON 1
|
||||
#define GLUT_RIGHT_BUTTON 2
|
||||
|
||||
/* Mouse button state. */
|
||||
#define GLUT_DOWN 0
|
||||
#define GLUT_UP 1
|
||||
|
||||
#if (GLUT_API_VERSION >= 2)
|
||||
/* function keys */
|
||||
#define GLUT_KEY_F1 1
|
||||
#define GLUT_KEY_F2 2
|
||||
#define GLUT_KEY_F3 3
|
||||
#define GLUT_KEY_F4 4
|
||||
#define GLUT_KEY_F5 5
|
||||
#define GLUT_KEY_F6 6
|
||||
#define GLUT_KEY_F7 7
|
||||
#define GLUT_KEY_F8 8
|
||||
#define GLUT_KEY_F9 9
|
||||
#define GLUT_KEY_F10 10
|
||||
#define GLUT_KEY_F11 11
|
||||
#define GLUT_KEY_F12 12
|
||||
/* directional keys */
|
||||
#define GLUT_KEY_LEFT 100
|
||||
#define GLUT_KEY_UP 101
|
||||
#define GLUT_KEY_RIGHT 102
|
||||
#define GLUT_KEY_DOWN 103
|
||||
#define GLUT_KEY_PAGE_UP 104
|
||||
#define GLUT_KEY_PAGE_DOWN 105
|
||||
#define GLUT_KEY_HOME 106
|
||||
#define GLUT_KEY_END 107
|
||||
#define GLUT_KEY_INSERT 108
|
||||
#endif
|
||||
|
||||
/* Entry/exit state. */
|
||||
#define GLUT_LEFT 0
|
||||
#define GLUT_ENTERED 1
|
||||
|
||||
/* Menu usage state. */
|
||||
#define GLUT_MENU_NOT_IN_USE 0
|
||||
#define GLUT_MENU_IN_USE 1
|
||||
|
||||
/* Visibility state. */
|
||||
#define GLUT_NOT_VISIBLE 0
|
||||
#define GLUT_VISIBLE 1
|
||||
|
||||
/* Window status state. */
|
||||
#define GLUT_HIDDEN 0
|
||||
#define GLUT_FULLY_RETAINED 1
|
||||
#define GLUT_PARTIALLY_RETAINED 2
|
||||
#define GLUT_FULLY_COVERED 3
|
||||
|
||||
/* Color index component selection values. */
|
||||
#define GLUT_RED 0
|
||||
#define GLUT_GREEN 1
|
||||
#define GLUT_BLUE 2
|
||||
|
||||
#if defined(_WIN32)
|
||||
/* Stroke font constants (use these in GLUT program). */
|
||||
#define GLUT_STROKE_ROMAN ((void*)0)
|
||||
#define GLUT_STROKE_MONO_ROMAN ((void*)1)
|
||||
|
||||
/* Bitmap font constants (use these in GLUT program). */
|
||||
#define GLUT_BITMAP_9_BY_15 ((void*)2)
|
||||
#define GLUT_BITMAP_8_BY_13 ((void*)3)
|
||||
#define GLUT_BITMAP_TIMES_ROMAN_10 ((void*)4)
|
||||
#define GLUT_BITMAP_TIMES_ROMAN_24 ((void*)5)
|
||||
#if (GLUT_API_VERSION >= 3)
|
||||
#define GLUT_BITMAP_HELVETICA_10 ((void*)6)
|
||||
#define GLUT_BITMAP_HELVETICA_12 ((void*)7)
|
||||
#define GLUT_BITMAP_HELVETICA_18 ((void*)8)
|
||||
#endif
|
||||
#else
|
||||
/* Stroke font opaque addresses (use constants instead in source code). */
|
||||
GLUTAPI void *glutStrokeRoman;
|
||||
GLUTAPI void *glutStrokeMonoRoman;
|
||||
|
||||
/* Stroke font constants (use these in GLUT program). */
|
||||
#define GLUT_STROKE_ROMAN (&glutStrokeRoman)
|
||||
#define GLUT_STROKE_MONO_ROMAN (&glutStrokeMonoRoman)
|
||||
|
||||
/* Bitmap font opaque addresses (use constants instead in source code). */
|
||||
GLUTAPI void *glutBitmap9By15;
|
||||
GLUTAPI void *glutBitmap8By13;
|
||||
GLUTAPI void *glutBitmapTimesRoman10;
|
||||
GLUTAPI void *glutBitmapTimesRoman24;
|
||||
GLUTAPI void *glutBitmapHelvetica10;
|
||||
GLUTAPI void *glutBitmapHelvetica12;
|
||||
GLUTAPI void *glutBitmapHelvetica18;
|
||||
|
||||
/* Bitmap font constants (use these in GLUT program). */
|
||||
#define GLUT_BITMAP_9_BY_15 (&glutBitmap9By15)
|
||||
#define GLUT_BITMAP_8_BY_13 (&glutBitmap8By13)
|
||||
#define GLUT_BITMAP_TIMES_ROMAN_10 (&glutBitmapTimesRoman10)
|
||||
#define GLUT_BITMAP_TIMES_ROMAN_24 (&glutBitmapTimesRoman24)
|
||||
#if (GLUT_API_VERSION >= 3)
|
||||
#define GLUT_BITMAP_HELVETICA_10 (&glutBitmapHelvetica10)
|
||||
#define GLUT_BITMAP_HELVETICA_12 (&glutBitmapHelvetica12)
|
||||
#define GLUT_BITMAP_HELVETICA_18 (&glutBitmapHelvetica18)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* glutGet parameters. */
|
||||
#define GLUT_WINDOW_X ((GLenum) 100)
|
||||
#define GLUT_WINDOW_Y ((GLenum) 101)
|
||||
#define GLUT_WINDOW_WIDTH ((GLenum) 102)
|
||||
#define GLUT_WINDOW_HEIGHT ((GLenum) 103)
|
||||
#define GLUT_WINDOW_BUFFER_SIZE ((GLenum) 104)
|
||||
#define GLUT_WINDOW_STENCIL_SIZE ((GLenum) 105)
|
||||
#define GLUT_WINDOW_DEPTH_SIZE ((GLenum) 106)
|
||||
#define GLUT_WINDOW_RED_SIZE ((GLenum) 107)
|
||||
#define GLUT_WINDOW_GREEN_SIZE ((GLenum) 108)
|
||||
#define GLUT_WINDOW_BLUE_SIZE ((GLenum) 109)
|
||||
#define GLUT_WINDOW_ALPHA_SIZE ((GLenum) 110)
|
||||
#define GLUT_WINDOW_ACCUM_RED_SIZE ((GLenum) 111)
|
||||
#define GLUT_WINDOW_ACCUM_GREEN_SIZE ((GLenum) 112)
|
||||
#define GLUT_WINDOW_ACCUM_BLUE_SIZE ((GLenum) 113)
|
||||
#define GLUT_WINDOW_ACCUM_ALPHA_SIZE ((GLenum) 114)
|
||||
#define GLUT_WINDOW_DOUBLEBUFFER ((GLenum) 115)
|
||||
#define GLUT_WINDOW_RGBA ((GLenum) 116)
|
||||
#define GLUT_WINDOW_PARENT ((GLenum) 117)
|
||||
#define GLUT_WINDOW_NUM_CHILDREN ((GLenum) 118)
|
||||
#define GLUT_WINDOW_COLORMAP_SIZE ((GLenum) 119)
|
||||
#if (GLUT_API_VERSION >= 2)
|
||||
#define GLUT_WINDOW_NUM_SAMPLES ((GLenum) 120)
|
||||
#define GLUT_WINDOW_STEREO ((GLenum) 121)
|
||||
#endif
|
||||
#if (GLUT_API_VERSION >= 3)
|
||||
#define GLUT_WINDOW_CURSOR ((GLenum) 122)
|
||||
#endif
|
||||
#define GLUT_SCREEN_WIDTH ((GLenum) 200)
|
||||
#define GLUT_SCREEN_HEIGHT ((GLenum) 201)
|
||||
#define GLUT_SCREEN_WIDTH_MM ((GLenum) 202)
|
||||
#define GLUT_SCREEN_HEIGHT_MM ((GLenum) 203)
|
||||
#define GLUT_MENU_NUM_ITEMS ((GLenum) 300)
|
||||
#define GLUT_DISPLAY_MODE_POSSIBLE ((GLenum) 400)
|
||||
#define GLUT_INIT_WINDOW_X ((GLenum) 500)
|
||||
#define GLUT_INIT_WINDOW_Y ((GLenum) 501)
|
||||
#define GLUT_INIT_WINDOW_WIDTH ((GLenum) 502)
|
||||
#define GLUT_INIT_WINDOW_HEIGHT ((GLenum) 503)
|
||||
#define GLUT_INIT_DISPLAY_MODE ((GLenum) 504)
|
||||
#if (GLUT_API_VERSION >= 2)
|
||||
#define GLUT_ELAPSED_TIME ((GLenum) 700)
|
||||
#endif
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
|
||||
#define GLUT_WINDOW_FORMAT_ID ((GLenum) 123)
|
||||
#endif
|
||||
|
||||
#if (GLUT_API_VERSION >= 2)
|
||||
/* glutDeviceGet parameters. */
|
||||
#define GLUT_HAS_KEYBOARD ((GLenum) 600)
|
||||
#define GLUT_HAS_MOUSE ((GLenum) 601)
|
||||
#define GLUT_HAS_SPACEBALL ((GLenum) 602)
|
||||
#define GLUT_HAS_DIAL_AND_BUTTON_BOX ((GLenum) 603)
|
||||
#define GLUT_HAS_TABLET ((GLenum) 604)
|
||||
#define GLUT_NUM_MOUSE_BUTTONS ((GLenum) 605)
|
||||
#define GLUT_NUM_SPACEBALL_BUTTONS ((GLenum) 606)
|
||||
#define GLUT_NUM_BUTTON_BOX_BUTTONS ((GLenum) 607)
|
||||
#define GLUT_NUM_DIALS ((GLenum) 608)
|
||||
#define GLUT_NUM_TABLET_BUTTONS ((GLenum) 609)
|
||||
#endif
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
|
||||
#define GLUT_DEVICE_IGNORE_KEY_REPEAT ((GLenum) 610)
|
||||
#define GLUT_DEVICE_KEY_REPEAT ((GLenum) 611)
|
||||
#define GLUT_HAS_JOYSTICK ((GLenum) 612)
|
||||
#define GLUT_OWNS_JOYSTICK ((GLenum) 613)
|
||||
#define GLUT_JOYSTICK_BUTTONS ((GLenum) 614)
|
||||
#define GLUT_JOYSTICK_AXES ((GLenum) 615)
|
||||
#define GLUT_JOYSTICK_POLL_RATE ((GLenum) 616)
|
||||
#endif
|
||||
|
||||
#if (GLUT_API_VERSION >= 3)
|
||||
/* glutLayerGet parameters. */
|
||||
#define GLUT_OVERLAY_POSSIBLE ((GLenum) 800)
|
||||
#define GLUT_LAYER_IN_USE ((GLenum) 801)
|
||||
#define GLUT_HAS_OVERLAY ((GLenum) 802)
|
||||
#define GLUT_TRANSPARENT_INDEX ((GLenum) 803)
|
||||
#define GLUT_NORMAL_DAMAGED ((GLenum) 804)
|
||||
#define GLUT_OVERLAY_DAMAGED ((GLenum) 805)
|
||||
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
||||
/* glutVideoResizeGet parameters. */
|
||||
#define GLUT_VIDEO_RESIZE_POSSIBLE ((GLenum) 900)
|
||||
#define GLUT_VIDEO_RESIZE_IN_USE ((GLenum) 901)
|
||||
#define GLUT_VIDEO_RESIZE_X_DELTA ((GLenum) 902)
|
||||
#define GLUT_VIDEO_RESIZE_Y_DELTA ((GLenum) 903)
|
||||
#define GLUT_VIDEO_RESIZE_WIDTH_DELTA ((GLenum) 904)
|
||||
#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA ((GLenum) 905)
|
||||
#define GLUT_VIDEO_RESIZE_X ((GLenum) 906)
|
||||
#define GLUT_VIDEO_RESIZE_Y ((GLenum) 907)
|
||||
#define GLUT_VIDEO_RESIZE_WIDTH ((GLenum) 908)
|
||||
#define GLUT_VIDEO_RESIZE_HEIGHT ((GLenum) 909)
|
||||
#endif
|
||||
|
||||
/* glutUseLayer parameters. */
|
||||
#define GLUT_NORMAL ((GLenum) 0)
|
||||
#define GLUT_OVERLAY ((GLenum) 1)
|
||||
|
||||
/* glutGetModifiers return mask. */
|
||||
#define GLUT_ACTIVE_SHIFT 1
|
||||
#define GLUT_ACTIVE_CTRL 2
|
||||
#define GLUT_ACTIVE_ALT 4
|
||||
|
||||
/* glutSetCursor parameters. */
|
||||
/* Basic arrows. */
|
||||
#define GLUT_CURSOR_RIGHT_ARROW 0
|
||||
#define GLUT_CURSOR_LEFT_ARROW 1
|
||||
/* Symbolic cursor shapes. */
|
||||
#define GLUT_CURSOR_INFO 2
|
||||
#define GLUT_CURSOR_DESTROY 3
|
||||
#define GLUT_CURSOR_HELP 4
|
||||
#define GLUT_CURSOR_CYCLE 5
|
||||
#define GLUT_CURSOR_SPRAY 6
|
||||
#define GLUT_CURSOR_WAIT 7
|
||||
#define GLUT_CURSOR_TEXT 8
|
||||
#define GLUT_CURSOR_CROSSHAIR 9
|
||||
/* Directional cursors. */
|
||||
#define GLUT_CURSOR_UP_DOWN 10
|
||||
#define GLUT_CURSOR_LEFT_RIGHT 11
|
||||
/* Sizing cursors. */
|
||||
#define GLUT_CURSOR_TOP_SIDE 12
|
||||
#define GLUT_CURSOR_BOTTOM_SIDE 13
|
||||
#define GLUT_CURSOR_LEFT_SIDE 14
|
||||
#define GLUT_CURSOR_RIGHT_SIDE 15
|
||||
#define GLUT_CURSOR_TOP_LEFT_CORNER 16
|
||||
#define GLUT_CURSOR_TOP_RIGHT_CORNER 17
|
||||
#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 18
|
||||
#define GLUT_CURSOR_BOTTOM_LEFT_CORNER 19
|
||||
/* Inherit from parent window. */
|
||||
#define GLUT_CURSOR_INHERIT 100
|
||||
/* Blank cursor. */
|
||||
#define GLUT_CURSOR_NONE 101
|
||||
/* Fullscreen crosshair (if available). */
|
||||
#define GLUT_CURSOR_FULL_CROSSHAIR 102
|
||||
#endif
|
||||
|
||||
/* GLUT initialization sub-API. */
|
||||
GLUTAPI void APIENTRY glutInit(int *argcp, char **argv);
|
||||
#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
|
||||
GLUTAPI void APIENTRY __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int));
|
||||
#ifndef GLUT_BUILDING_LIB
|
||||
static void APIENTRY glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); }
|
||||
#define glutInit glutInit_ATEXIT_HACK
|
||||
#endif
|
||||
#endif
|
||||
GLUTAPI void APIENTRY glutInitDisplayMode(unsigned int mode);
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
||||
GLUTAPI void APIENTRY glutInitDisplayString(const char *string);
|
||||
#endif
|
||||
GLUTAPI void APIENTRY glutInitWindowPosition(int x, int y);
|
||||
GLUTAPI void APIENTRY glutInitWindowSize(int width, int height);
|
||||
GLUTAPI void APIENTRY glutMainLoop(void);
|
||||
|
||||
/* GLUT window sub-API. */
|
||||
GLUTAPI int APIENTRY glutCreateWindow(const char *title);
|
||||
#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
|
||||
GLUTAPI int APIENTRY __glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int));
|
||||
#ifndef GLUT_BUILDING_LIB
|
||||
static int APIENTRY glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); }
|
||||
#define glutCreateWindow glutCreateWindow_ATEXIT_HACK
|
||||
#endif
|
||||
#endif
|
||||
GLUTAPI int APIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height);
|
||||
GLUTAPI void APIENTRY glutDestroyWindow(int win);
|
||||
GLUTAPI void APIENTRY glutPostRedisplay(void);
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
|
||||
GLUTAPI void APIENTRY glutPostWindowRedisplay(int win);
|
||||
#endif
|
||||
GLUTAPI void APIENTRY glutSwapBuffers(void);
|
||||
GLUTAPI int APIENTRY glutGetWindow(void);
|
||||
GLUTAPI void APIENTRY glutSetWindow(int win);
|
||||
GLUTAPI void APIENTRY glutSetWindowTitle(const char *title);
|
||||
GLUTAPI void APIENTRY glutSetIconTitle(const char *title);
|
||||
GLUTAPI void APIENTRY glutPositionWindow(int x, int y);
|
||||
GLUTAPI void APIENTRY glutReshapeWindow(int width, int height);
|
||||
GLUTAPI void APIENTRY glutPopWindow(void);
|
||||
GLUTAPI void APIENTRY glutPushWindow(void);
|
||||
GLUTAPI void APIENTRY glutIconifyWindow(void);
|
||||
GLUTAPI void APIENTRY glutShowWindow(void);
|
||||
GLUTAPI void APIENTRY glutHideWindow(void);
|
||||
#if (GLUT_API_VERSION >= 3)
|
||||
GLUTAPI void APIENTRY glutFullScreen(void);
|
||||
GLUTAPI void APIENTRY glutSetCursor(int cursor);
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
||||
GLUTAPI void APIENTRY glutWarpPointer(int x, int y);
|
||||
#endif
|
||||
|
||||
/* GLUT overlay sub-API. */
|
||||
GLUTAPI void APIENTRY glutEstablishOverlay(void);
|
||||
GLUTAPI void APIENTRY glutRemoveOverlay(void);
|
||||
GLUTAPI void APIENTRY glutUseLayer(GLenum layer);
|
||||
GLUTAPI void APIENTRY glutPostOverlayRedisplay(void);
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
|
||||
GLUTAPI void APIENTRY glutPostWindowOverlayRedisplay(int win);
|
||||
#endif
|
||||
GLUTAPI void APIENTRY glutShowOverlay(void);
|
||||
GLUTAPI void APIENTRY glutHideOverlay(void);
|
||||
#endif
|
||||
|
||||
/* GLUT menu sub-API. */
|
||||
GLUTAPI int APIENTRY glutCreateMenu(void (GLUTCALLBACK *func)(int));
|
||||
#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
|
||||
GLUTAPI int APIENTRY __glutCreateMenuWithExit(void (GLUTCALLBACK *func)(int), void (__cdecl *exitfunc)(int));
|
||||
#ifndef GLUT_BUILDING_LIB
|
||||
static int APIENTRY glutCreateMenu_ATEXIT_HACK(void (GLUTCALLBACK *func)(int)) { return __glutCreateMenuWithExit(func, exit); }
|
||||
#define glutCreateMenu glutCreateMenu_ATEXIT_HACK
|
||||
#endif
|
||||
#endif
|
||||
GLUTAPI void APIENTRY glutDestroyMenu(int menu);
|
||||
GLUTAPI int APIENTRY glutGetMenu(void);
|
||||
GLUTAPI void APIENTRY glutSetMenu(int menu);
|
||||
GLUTAPI void APIENTRY glutAddMenuEntry(const char *label, int value);
|
||||
GLUTAPI void APIENTRY glutAddSubMenu(const char *label, int submenu);
|
||||
GLUTAPI void APIENTRY glutChangeToMenuEntry(int item, const char *label, int value);
|
||||
GLUTAPI void APIENTRY glutChangeToSubMenu(int item, const char *label, int submenu);
|
||||
GLUTAPI void APIENTRY glutRemoveMenuItem(int item);
|
||||
GLUTAPI void APIENTRY glutAttachMenu(int button);
|
||||
GLUTAPI void APIENTRY glutDetachMenu(int button);
|
||||
|
||||
/* GLUT window callback sub-API. */
|
||||
GLUTAPI void APIENTRY glutDisplayFunc(void (GLUTCALLBACK *func)(void));
|
||||
GLUTAPI void APIENTRY glutReshapeFunc(void (GLUTCALLBACK *func)(int width, int height));
|
||||
GLUTAPI void APIENTRY glutKeyboardFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y));
|
||||
GLUTAPI void APIENTRY glutMouseFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y));
|
||||
GLUTAPI void APIENTRY glutMotionFunc(void (GLUTCALLBACK *func)(int x, int y));
|
||||
GLUTAPI void APIENTRY glutPassiveMotionFunc(void (GLUTCALLBACK *func)(int x, int y));
|
||||
GLUTAPI void APIENTRY glutEntryFunc(void (GLUTCALLBACK *func)(int state));
|
||||
GLUTAPI void APIENTRY glutVisibilityFunc(void (GLUTCALLBACK *func)(int state));
|
||||
GLUTAPI void APIENTRY glutIdleFunc(void (GLUTCALLBACK *func)(void));
|
||||
GLUTAPI void APIENTRY glutTimerFunc(unsigned int millis, void (GLUTCALLBACK *func)(int value), int value);
|
||||
GLUTAPI void APIENTRY glutMenuStateFunc(void (GLUTCALLBACK *func)(int state));
|
||||
#if (GLUT_API_VERSION >= 2)
|
||||
GLUTAPI void APIENTRY glutSpecialFunc(void (GLUTCALLBACK *func)(int key, int x, int y));
|
||||
GLUTAPI void APIENTRY glutSpaceballMotionFunc(void (GLUTCALLBACK *func)(int x, int y, int z));
|
||||
GLUTAPI void APIENTRY glutSpaceballRotateFunc(void (GLUTCALLBACK *func)(int x, int y, int z));
|
||||
GLUTAPI void APIENTRY glutSpaceballButtonFunc(void (GLUTCALLBACK *func)(int button, int state));
|
||||
GLUTAPI void APIENTRY glutButtonBoxFunc(void (GLUTCALLBACK *func)(int button, int state));
|
||||
GLUTAPI void APIENTRY glutDialsFunc(void (GLUTCALLBACK *func)(int dial, int value));
|
||||
GLUTAPI void APIENTRY glutTabletMotionFunc(void (GLUTCALLBACK *func)(int x, int y));
|
||||
GLUTAPI void APIENTRY glutTabletButtonFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y));
|
||||
#if (GLUT_API_VERSION >= 3)
|
||||
GLUTAPI void APIENTRY glutMenuStatusFunc(void (GLUTCALLBACK *func)(int status, int x, int y));
|
||||
GLUTAPI void APIENTRY glutOverlayDisplayFunc(void (GLUTCALLBACK *func)(void));
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
||||
GLUTAPI void APIENTRY glutWindowStatusFunc(void (GLUTCALLBACK *func)(int state));
|
||||
#endif
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
|
||||
GLUTAPI void APIENTRY glutKeyboardUpFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y));
|
||||
GLUTAPI void APIENTRY glutSpecialUpFunc(void (GLUTCALLBACK *func)(int key, int x, int y));
|
||||
GLUTAPI void APIENTRY glutJoystickFunc(void (GLUTCALLBACK *func)(unsigned int buttonMask, int x, int y, int z), int pollInterval);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* GLUT color index sub-API. */
|
||||
GLUTAPI void APIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue);
|
||||
GLUTAPI GLfloat APIENTRY glutGetColor(int ndx, int component);
|
||||
GLUTAPI void APIENTRY glutCopyColormap(int win);
|
||||
|
||||
/* GLUT state retrieval sub-API. */
|
||||
GLUTAPI int APIENTRY glutGet(GLenum type);
|
||||
GLUTAPI int APIENTRY glutDeviceGet(GLenum type);
|
||||
#if (GLUT_API_VERSION >= 2)
|
||||
/* GLUT extension support sub-API */
|
||||
GLUTAPI int APIENTRY glutExtensionSupported(const char *name);
|
||||
#endif
|
||||
#if (GLUT_API_VERSION >= 3)
|
||||
GLUTAPI int APIENTRY glutGetModifiers(void);
|
||||
GLUTAPI int APIENTRY glutLayerGet(GLenum type);
|
||||
#endif
|
||||
|
||||
/* GLUT font sub-API */
|
||||
GLUTAPI void APIENTRY glutBitmapCharacter(void *font, int character);
|
||||
GLUTAPI int APIENTRY glutBitmapWidth(void *font, int character);
|
||||
GLUTAPI void APIENTRY glutStrokeCharacter(void *font, int character);
|
||||
GLUTAPI int APIENTRY glutStrokeWidth(void *font, int character);
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
||||
GLUTAPI int APIENTRY glutBitmapLength(void *font, const unsigned char *string);
|
||||
GLUTAPI int APIENTRY glutStrokeLength(void *font, const unsigned char *string);
|
||||
#endif
|
||||
|
||||
/* GLUT pre-built models sub-API */
|
||||
GLUTAPI void APIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks);
|
||||
GLUTAPI void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks);
|
||||
GLUTAPI void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
|
||||
GLUTAPI void APIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
|
||||
GLUTAPI void APIENTRY glutWireCube(GLdouble size);
|
||||
GLUTAPI void APIENTRY glutSolidCube(GLdouble size);
|
||||
GLUTAPI void APIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
|
||||
GLUTAPI void APIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
|
||||
GLUTAPI void APIENTRY glutWireDodecahedron(void);
|
||||
GLUTAPI void APIENTRY glutSolidDodecahedron(void);
|
||||
GLUTAPI void APIENTRY glutWireTeapot(GLdouble size);
|
||||
GLUTAPI void APIENTRY glutSolidTeapot(GLdouble size);
|
||||
GLUTAPI void APIENTRY glutWireOctahedron(void);
|
||||
GLUTAPI void APIENTRY glutSolidOctahedron(void);
|
||||
GLUTAPI void APIENTRY glutWireTetrahedron(void);
|
||||
GLUTAPI void APIENTRY glutSolidTetrahedron(void);
|
||||
GLUTAPI void APIENTRY glutWireIcosahedron(void);
|
||||
GLUTAPI void APIENTRY glutSolidIcosahedron(void);
|
||||
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
||||
/* GLUT video resize sub-API. */
|
||||
GLUTAPI int APIENTRY glutVideoResizeGet(GLenum param);
|
||||
GLUTAPI void APIENTRY glutSetupVideoResizing(void);
|
||||
GLUTAPI void APIENTRY glutStopVideoResizing(void);
|
||||
GLUTAPI void APIENTRY glutVideoResize(int x, int y, int width, int height);
|
||||
GLUTAPI void APIENTRY glutVideoPan(int x, int y, int width, int height);
|
||||
|
||||
/* GLUT debugging sub-API. */
|
||||
GLUTAPI void APIENTRY glutReportErrors(void);
|
||||
#endif
|
||||
|
||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
|
||||
/* GLUT device control sub-API. */
|
||||
/* glutSetKeyRepeat modes. */
|
||||
#define GLUT_KEY_REPEAT_OFF 0
|
||||
#define GLUT_KEY_REPEAT_ON 1
|
||||
#define GLUT_KEY_REPEAT_DEFAULT 2
|
||||
|
||||
/* Joystick button masks. */
|
||||
#define GLUT_JOYSTICK_BUTTON_A 1
|
||||
#define GLUT_JOYSTICK_BUTTON_B 2
|
||||
#define GLUT_JOYSTICK_BUTTON_C 4
|
||||
#define GLUT_JOYSTICK_BUTTON_D 8
|
||||
|
||||
GLUTAPI void APIENTRY glutIgnoreKeyRepeat(int ignore);
|
||||
GLUTAPI void APIENTRY glutSetKeyRepeat(int repeatMode);
|
||||
GLUTAPI void APIENTRY glutForceJoystickFunc(void);
|
||||
|
||||
/* GLUT game mode sub-API. */
|
||||
/* glutGameModeGet. */
|
||||
#define GLUT_GAME_MODE_ACTIVE ((GLenum) 0)
|
||||
#define GLUT_GAME_MODE_POSSIBLE ((GLenum) 1)
|
||||
#define GLUT_GAME_MODE_WIDTH ((GLenum) 2)
|
||||
#define GLUT_GAME_MODE_HEIGHT ((GLenum) 3)
|
||||
#define GLUT_GAME_MODE_PIXEL_DEPTH ((GLenum) 4)
|
||||
#define GLUT_GAME_MODE_REFRESH_RATE ((GLenum) 5)
|
||||
#define GLUT_GAME_MODE_DISPLAY_CHANGED ((GLenum) 6)
|
||||
|
||||
GLUTAPI void APIENTRY glutGameModeString(const char *string);
|
||||
GLUTAPI int APIENTRY glutEnterGameMode(void);
|
||||
GLUTAPI void APIENTRY glutLeaveGameMode(void);
|
||||
GLUTAPI int APIENTRY glutGameModeGet(GLenum mode);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef GLUT_APIENTRY_DEFINED
|
||||
# undef GLUT_APIENTRY_DEFINED
|
||||
# undef APIENTRY
|
||||
#endif
|
||||
|
||||
#ifdef GLUT_WINGDIAPI_DEFINED
|
||||
# undef GLUT_WINGDIAPI_DEFINED
|
||||
# undef WINGDIAPI
|
||||
#endif
|
||||
|
||||
#ifdef GLUT_DEFINED___CDECL
|
||||
# undef GLUT_DEFINED___CDECL
|
||||
# undef __cdecl
|
||||
#endif
|
||||
|
||||
#ifdef GLUT_DEFINED__CRTIMP
|
||||
# undef GLUT_DEFINED__CRTIMP
|
||||
# undef _CRTIMP
|
||||
#endif
|
||||
|
||||
#endif /* __glut_h__ */
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,119 @@
|
|||
gl.o: /home/mike/Videos/gl2gx-master/gl2gx/libogc/../source/gl.c \
|
||||
/opt/devkitpro/libogc/include/ogcsys.h \
|
||||
/opt/devkitpro/libogc/include/gccore.h \
|
||||
/opt/devkitpro/libogc/include/ogc/dsp.h \
|
||||
/opt/devkitpro/libogc/include/gctypes.h \
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h \
|
||||
/opt/devkitpro/libogc/include/gcbool.h \
|
||||
/opt/devkitpro/libogc/include/ogc/arqueue.h \
|
||||
/opt/devkitpro/libogc/include/ogc/lwp_queue.h \
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h \
|
||||
/opt/devkitpro/libogc/include/ogc/arqmgr.h \
|
||||
/opt/devkitpro/libogc/include/ogc/audio.h \
|
||||
/opt/devkitpro/libogc/include/ogc/cache.h \
|
||||
/opt/devkitpro/libogc/include/ogc/card.h \
|
||||
/opt/devkitpro/libogc/include/ogc/cast.h \
|
||||
/opt/devkitpro/libogc/include/ogc/color.h \
|
||||
/opt/devkitpro/libogc/include/ogc/consol.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h \
|
||||
/opt/devkitpro/libogc/include/ogc/dvd.h \
|
||||
/opt/devkitpro/libogc/include/ogc/disc_io.h \
|
||||
/opt/devkitpro/libogc/include/ogc/exi.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h \
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h \
|
||||
/opt/devkitpro/libogc/include/ogc/si.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h \
|
||||
/opt/devkitpro/libogc/include/ogc/irq.h \
|
||||
/opt/devkitpro/libogc/include/ogc/context.h \
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h \
|
||||
/opt/devkitpro/libogc/include/ogc/mutex.h \
|
||||
/opt/devkitpro/libogc/include/ogc/message.h \
|
||||
/opt/devkitpro/libogc/include/ogc/semaphore.h \
|
||||
/opt/devkitpro/libogc/include/ogc/pad.h \
|
||||
/opt/devkitpro/libogc/include/ogc/tpl.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h \
|
||||
/opt/devkitpro/libogc/include/ogc/system.h \
|
||||
/opt/devkitpro/libogc/include/gcutil.h \
|
||||
/opt/devkitpro/libogc/include/ogc/video.h \
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h \
|
||||
/opt/devkitpro/libogc/include/ogc/usbgecko.h \
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h \
|
||||
/opt/devkitpro/libogc/include/ogc/texconv.h \
|
||||
/opt/devkitpro/libogc/include/ogc/ipc.h \
|
||||
/opt/devkitpro/libogc/include/ogc/sha.h \
|
||||
/opt/devkitpro/libogc/include/ogc/aes.h \
|
||||
/opt/devkitpro/libogc/include/ogc/es.h \
|
||||
/opt/devkitpro/libogc/include/ogc/stm.h \
|
||||
/opt/devkitpro/libogc/include/ogc/ios.h \
|
||||
/opt/devkitpro/libogc/include/ogc/usb.h \
|
||||
/opt/devkitpro/libogc/include/ogc/isfs.h \
|
||||
/opt/devkitpro/libogc/include/ogc/conf.h \
|
||||
/opt/devkitpro/libogc/include/ogc/usbstorage.h \
|
||||
/opt/devkitpro/libogc/include/ogc/mutex.h \
|
||||
/opt/devkitpro/libogc/include/ogc/system.h \
|
||||
/opt/devkitpro/libogc/include/ogc/wiilaunch.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/glint.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glext.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h
|
||||
/opt/devkitpro/libogc/include/ogcsys.h:
|
||||
/opt/devkitpro/libogc/include/gccore.h:
|
||||
/opt/devkitpro/libogc/include/ogc/dsp.h:
|
||||
/opt/devkitpro/libogc/include/gctypes.h:
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h:
|
||||
/opt/devkitpro/libogc/include/gcbool.h:
|
||||
/opt/devkitpro/libogc/include/ogc/arqueue.h:
|
||||
/opt/devkitpro/libogc/include/ogc/lwp_queue.h:
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h:
|
||||
/opt/devkitpro/libogc/include/ogc/arqmgr.h:
|
||||
/opt/devkitpro/libogc/include/ogc/audio.h:
|
||||
/opt/devkitpro/libogc/include/ogc/cache.h:
|
||||
/opt/devkitpro/libogc/include/ogc/card.h:
|
||||
/opt/devkitpro/libogc/include/ogc/cast.h:
|
||||
/opt/devkitpro/libogc/include/ogc/color.h:
|
||||
/opt/devkitpro/libogc/include/ogc/consol.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h:
|
||||
/opt/devkitpro/libogc/include/ogc/dvd.h:
|
||||
/opt/devkitpro/libogc/include/ogc/disc_io.h:
|
||||
/opt/devkitpro/libogc/include/ogc/exi.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h:
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h:
|
||||
/opt/devkitpro/libogc/include/ogc/si.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h:
|
||||
/opt/devkitpro/libogc/include/ogc/irq.h:
|
||||
/opt/devkitpro/libogc/include/ogc/context.h:
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h:
|
||||
/opt/devkitpro/libogc/include/ogc/mutex.h:
|
||||
/opt/devkitpro/libogc/include/ogc/message.h:
|
||||
/opt/devkitpro/libogc/include/ogc/semaphore.h:
|
||||
/opt/devkitpro/libogc/include/ogc/pad.h:
|
||||
/opt/devkitpro/libogc/include/ogc/tpl.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h:
|
||||
/opt/devkitpro/libogc/include/ogc/system.h:
|
||||
/opt/devkitpro/libogc/include/gcutil.h:
|
||||
/opt/devkitpro/libogc/include/ogc/video.h:
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h:
|
||||
/opt/devkitpro/libogc/include/ogc/usbgecko.h:
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h:
|
||||
/opt/devkitpro/libogc/include/ogc/texconv.h:
|
||||
/opt/devkitpro/libogc/include/ogc/ipc.h:
|
||||
/opt/devkitpro/libogc/include/ogc/sha.h:
|
||||
/opt/devkitpro/libogc/include/ogc/aes.h:
|
||||
/opt/devkitpro/libogc/include/ogc/es.h:
|
||||
/opt/devkitpro/libogc/include/ogc/stm.h:
|
||||
/opt/devkitpro/libogc/include/ogc/ios.h:
|
||||
/opt/devkitpro/libogc/include/ogc/usb.h:
|
||||
/opt/devkitpro/libogc/include/ogc/isfs.h:
|
||||
/opt/devkitpro/libogc/include/ogc/conf.h:
|
||||
/opt/devkitpro/libogc/include/ogc/usbstorage.h:
|
||||
/opt/devkitpro/libogc/include/ogc/mutex.h:
|
||||
/opt/devkitpro/libogc/include/ogc/system.h:
|
||||
/opt/devkitpro/libogc/include/ogc/wiilaunch.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/glint.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glext.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h:
|
Binary file not shown.
|
@ -0,0 +1,121 @@
|
|||
glu.o: /home/mike/Videos/gl2gx-master/gl2gx/libogc/../source/glu.c \
|
||||
/opt/devkitpro/libogc/include/ogcsys.h \
|
||||
/opt/devkitpro/libogc/include/gccore.h \
|
||||
/opt/devkitpro/libogc/include/ogc/dsp.h \
|
||||
/opt/devkitpro/libogc/include/gctypes.h \
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h \
|
||||
/opt/devkitpro/libogc/include/gcbool.h \
|
||||
/opt/devkitpro/libogc/include/ogc/arqueue.h \
|
||||
/opt/devkitpro/libogc/include/ogc/lwp_queue.h \
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h \
|
||||
/opt/devkitpro/libogc/include/ogc/arqmgr.h \
|
||||
/opt/devkitpro/libogc/include/ogc/audio.h \
|
||||
/opt/devkitpro/libogc/include/ogc/cache.h \
|
||||
/opt/devkitpro/libogc/include/ogc/card.h \
|
||||
/opt/devkitpro/libogc/include/ogc/cast.h \
|
||||
/opt/devkitpro/libogc/include/ogc/color.h \
|
||||
/opt/devkitpro/libogc/include/ogc/consol.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h \
|
||||
/opt/devkitpro/libogc/include/ogc/dvd.h \
|
||||
/opt/devkitpro/libogc/include/ogc/disc_io.h \
|
||||
/opt/devkitpro/libogc/include/ogc/exi.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h \
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h \
|
||||
/opt/devkitpro/libogc/include/ogc/si.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h \
|
||||
/opt/devkitpro/libogc/include/ogc/irq.h \
|
||||
/opt/devkitpro/libogc/include/ogc/context.h \
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h \
|
||||
/opt/devkitpro/libogc/include/ogc/mutex.h \
|
||||
/opt/devkitpro/libogc/include/ogc/message.h \
|
||||
/opt/devkitpro/libogc/include/ogc/semaphore.h \
|
||||
/opt/devkitpro/libogc/include/ogc/pad.h \
|
||||
/opt/devkitpro/libogc/include/ogc/tpl.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h \
|
||||
/opt/devkitpro/libogc/include/ogc/system.h \
|
||||
/opt/devkitpro/libogc/include/gcutil.h \
|
||||
/opt/devkitpro/libogc/include/ogc/video.h \
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h \
|
||||
/opt/devkitpro/libogc/include/ogc/usbgecko.h \
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h \
|
||||
/opt/devkitpro/libogc/include/ogc/texconv.h \
|
||||
/opt/devkitpro/libogc/include/ogc/ipc.h \
|
||||
/opt/devkitpro/libogc/include/ogc/sha.h \
|
||||
/opt/devkitpro/libogc/include/ogc/aes.h \
|
||||
/opt/devkitpro/libogc/include/ogc/es.h \
|
||||
/opt/devkitpro/libogc/include/ogc/stm.h \
|
||||
/opt/devkitpro/libogc/include/ogc/ios.h \
|
||||
/opt/devkitpro/libogc/include/ogc/usb.h \
|
||||
/opt/devkitpro/libogc/include/ogc/isfs.h \
|
||||
/opt/devkitpro/libogc/include/ogc/conf.h \
|
||||
/opt/devkitpro/libogc/include/ogc/usbstorage.h \
|
||||
/opt/devkitpro/libogc/include/ogc/mutex.h \
|
||||
/opt/devkitpro/libogc/include/ogc/system.h \
|
||||
/opt/devkitpro/libogc/include/ogc/wiilaunch.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/glint.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glext.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glu.h
|
||||
/opt/devkitpro/libogc/include/ogcsys.h:
|
||||
/opt/devkitpro/libogc/include/gccore.h:
|
||||
/opt/devkitpro/libogc/include/ogc/dsp.h:
|
||||
/opt/devkitpro/libogc/include/gctypes.h:
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h:
|
||||
/opt/devkitpro/libogc/include/gcbool.h:
|
||||
/opt/devkitpro/libogc/include/ogc/arqueue.h:
|
||||
/opt/devkitpro/libogc/include/ogc/lwp_queue.h:
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h:
|
||||
/opt/devkitpro/libogc/include/ogc/arqmgr.h:
|
||||
/opt/devkitpro/libogc/include/ogc/audio.h:
|
||||
/opt/devkitpro/libogc/include/ogc/cache.h:
|
||||
/opt/devkitpro/libogc/include/ogc/card.h:
|
||||
/opt/devkitpro/libogc/include/ogc/cast.h:
|
||||
/opt/devkitpro/libogc/include/ogc/color.h:
|
||||
/opt/devkitpro/libogc/include/ogc/consol.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h:
|
||||
/opt/devkitpro/libogc/include/ogc/dvd.h:
|
||||
/opt/devkitpro/libogc/include/ogc/disc_io.h:
|
||||
/opt/devkitpro/libogc/include/ogc/exi.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h:
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h:
|
||||
/opt/devkitpro/libogc/include/ogc/si.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h:
|
||||
/opt/devkitpro/libogc/include/ogc/irq.h:
|
||||
/opt/devkitpro/libogc/include/ogc/context.h:
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h:
|
||||
/opt/devkitpro/libogc/include/ogc/mutex.h:
|
||||
/opt/devkitpro/libogc/include/ogc/message.h:
|
||||
/opt/devkitpro/libogc/include/ogc/semaphore.h:
|
||||
/opt/devkitpro/libogc/include/ogc/pad.h:
|
||||
/opt/devkitpro/libogc/include/ogc/tpl.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h:
|
||||
/opt/devkitpro/libogc/include/ogc/system.h:
|
||||
/opt/devkitpro/libogc/include/gcutil.h:
|
||||
/opt/devkitpro/libogc/include/ogc/video.h:
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h:
|
||||
/opt/devkitpro/libogc/include/ogc/usbgecko.h:
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h:
|
||||
/opt/devkitpro/libogc/include/ogc/texconv.h:
|
||||
/opt/devkitpro/libogc/include/ogc/ipc.h:
|
||||
/opt/devkitpro/libogc/include/ogc/sha.h:
|
||||
/opt/devkitpro/libogc/include/ogc/aes.h:
|
||||
/opt/devkitpro/libogc/include/ogc/es.h:
|
||||
/opt/devkitpro/libogc/include/ogc/stm.h:
|
||||
/opt/devkitpro/libogc/include/ogc/ios.h:
|
||||
/opt/devkitpro/libogc/include/ogc/usb.h:
|
||||
/opt/devkitpro/libogc/include/ogc/isfs.h:
|
||||
/opt/devkitpro/libogc/include/ogc/conf.h:
|
||||
/opt/devkitpro/libogc/include/ogc/usbstorage.h:
|
||||
/opt/devkitpro/libogc/include/ogc/mutex.h:
|
||||
/opt/devkitpro/libogc/include/ogc/system.h:
|
||||
/opt/devkitpro/libogc/include/ogc/wiilaunch.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/glint.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glext.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glu.h:
|
Binary file not shown.
|
@ -0,0 +1,123 @@
|
|||
glut.o: /home/mike/Videos/gl2gx-master/gl2gx/libogc/../source/glut.c \
|
||||
/opt/devkitpro/libogc/include/ogcsys.h \
|
||||
/opt/devkitpro/libogc/include/gccore.h \
|
||||
/opt/devkitpro/libogc/include/ogc/dsp.h \
|
||||
/opt/devkitpro/libogc/include/gctypes.h \
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h \
|
||||
/opt/devkitpro/libogc/include/gcbool.h \
|
||||
/opt/devkitpro/libogc/include/ogc/arqueue.h \
|
||||
/opt/devkitpro/libogc/include/ogc/lwp_queue.h \
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h \
|
||||
/opt/devkitpro/libogc/include/ogc/arqmgr.h \
|
||||
/opt/devkitpro/libogc/include/ogc/audio.h \
|
||||
/opt/devkitpro/libogc/include/ogc/cache.h \
|
||||
/opt/devkitpro/libogc/include/ogc/card.h \
|
||||
/opt/devkitpro/libogc/include/ogc/cast.h \
|
||||
/opt/devkitpro/libogc/include/ogc/color.h \
|
||||
/opt/devkitpro/libogc/include/ogc/consol.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h \
|
||||
/opt/devkitpro/libogc/include/ogc/dvd.h \
|
||||
/opt/devkitpro/libogc/include/ogc/disc_io.h \
|
||||
/opt/devkitpro/libogc/include/ogc/exi.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h \
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h \
|
||||
/opt/devkitpro/libogc/include/ogc/si.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h \
|
||||
/opt/devkitpro/libogc/include/ogc/irq.h \
|
||||
/opt/devkitpro/libogc/include/ogc/context.h \
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h \
|
||||
/opt/devkitpro/libogc/include/ogc/mutex.h \
|
||||
/opt/devkitpro/libogc/include/ogc/message.h \
|
||||
/opt/devkitpro/libogc/include/ogc/semaphore.h \
|
||||
/opt/devkitpro/libogc/include/ogc/pad.h \
|
||||
/opt/devkitpro/libogc/include/ogc/tpl.h \
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h \
|
||||
/opt/devkitpro/libogc/include/ogc/system.h \
|
||||
/opt/devkitpro/libogc/include/gcutil.h \
|
||||
/opt/devkitpro/libogc/include/ogc/video.h \
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h \
|
||||
/opt/devkitpro/libogc/include/ogc/usbgecko.h \
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h \
|
||||
/opt/devkitpro/libogc/include/ogc/texconv.h \
|
||||
/opt/devkitpro/libogc/include/ogc/ipc.h \
|
||||
/opt/devkitpro/libogc/include/ogc/sha.h \
|
||||
/opt/devkitpro/libogc/include/ogc/aes.h \
|
||||
/opt/devkitpro/libogc/include/ogc/es.h \
|
||||
/opt/devkitpro/libogc/include/ogc/stm.h \
|
||||
/opt/devkitpro/libogc/include/ogc/ios.h \
|
||||
/opt/devkitpro/libogc/include/ogc/usb.h \
|
||||
/opt/devkitpro/libogc/include/ogc/isfs.h \
|
||||
/opt/devkitpro/libogc/include/ogc/conf.h \
|
||||
/opt/devkitpro/libogc/include/ogc/usbstorage.h \
|
||||
/opt/devkitpro/libogc/include/ogc/mutex.h \
|
||||
/opt/devkitpro/libogc/include/ogc/system.h \
|
||||
/opt/devkitpro/libogc/include/ogc/wiilaunch.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/glint.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glext.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glut.h \
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glu.h
|
||||
/opt/devkitpro/libogc/include/ogcsys.h:
|
||||
/opt/devkitpro/libogc/include/gccore.h:
|
||||
/opt/devkitpro/libogc/include/ogc/dsp.h:
|
||||
/opt/devkitpro/libogc/include/gctypes.h:
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h:
|
||||
/opt/devkitpro/libogc/include/gcbool.h:
|
||||
/opt/devkitpro/libogc/include/ogc/arqueue.h:
|
||||
/opt/devkitpro/libogc/include/ogc/lwp_queue.h:
|
||||
/opt/devkitpro/libogc/include/ogc/aram.h:
|
||||
/opt/devkitpro/libogc/include/ogc/arqmgr.h:
|
||||
/opt/devkitpro/libogc/include/ogc/audio.h:
|
||||
/opt/devkitpro/libogc/include/ogc/cache.h:
|
||||
/opt/devkitpro/libogc/include/ogc/card.h:
|
||||
/opt/devkitpro/libogc/include/ogc/cast.h:
|
||||
/opt/devkitpro/libogc/include/ogc/color.h:
|
||||
/opt/devkitpro/libogc/include/ogc/consol.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h:
|
||||
/opt/devkitpro/libogc/include/ogc/dvd.h:
|
||||
/opt/devkitpro/libogc/include/ogc/disc_io.h:
|
||||
/opt/devkitpro/libogc/include/ogc/exi.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h:
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gu.h:
|
||||
/opt/devkitpro/libogc/include/ogc/si.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx_struct.h:
|
||||
/opt/devkitpro/libogc/include/ogc/irq.h:
|
||||
/opt/devkitpro/libogc/include/ogc/context.h:
|
||||
/opt/devkitpro/libogc/include/ogc/lwp.h:
|
||||
/opt/devkitpro/libogc/include/ogc/mutex.h:
|
||||
/opt/devkitpro/libogc/include/ogc/message.h:
|
||||
/opt/devkitpro/libogc/include/ogc/semaphore.h:
|
||||
/opt/devkitpro/libogc/include/ogc/pad.h:
|
||||
/opt/devkitpro/libogc/include/ogc/tpl.h:
|
||||
/opt/devkitpro/libogc/include/ogc/gx.h:
|
||||
/opt/devkitpro/libogc/include/ogc/system.h:
|
||||
/opt/devkitpro/libogc/include/gcutil.h:
|
||||
/opt/devkitpro/libogc/include/ogc/video.h:
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h:
|
||||
/opt/devkitpro/libogc/include/ogc/usbgecko.h:
|
||||
/opt/devkitpro/libogc/include/ogc/video_types.h:
|
||||
/opt/devkitpro/libogc/include/ogc/texconv.h:
|
||||
/opt/devkitpro/libogc/include/ogc/ipc.h:
|
||||
/opt/devkitpro/libogc/include/ogc/sha.h:
|
||||
/opt/devkitpro/libogc/include/ogc/aes.h:
|
||||
/opt/devkitpro/libogc/include/ogc/es.h:
|
||||
/opt/devkitpro/libogc/include/ogc/stm.h:
|
||||
/opt/devkitpro/libogc/include/ogc/ios.h:
|
||||
/opt/devkitpro/libogc/include/ogc/usb.h:
|
||||
/opt/devkitpro/libogc/include/ogc/isfs.h:
|
||||
/opt/devkitpro/libogc/include/ogc/conf.h:
|
||||
/opt/devkitpro/libogc/include/ogc/usbstorage.h:
|
||||
/opt/devkitpro/libogc/include/ogc/mutex.h:
|
||||
/opt/devkitpro/libogc/include/ogc/system.h:
|
||||
/opt/devkitpro/libogc/include/ogc/wiilaunch.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/glint.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glext.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/gl.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glut.h:
|
||||
/home/mike/Videos/gl2gx-master/gl2gx/libogc/../include/GL/glu.h:
|
Binary file not shown.
|
@ -0,0 +1,991 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <ogcsys.h>
|
||||
#include <gccore.h>
|
||||
|
||||
#include "glint.h"
|
||||
#include "GL/gl.h"
|
||||
|
||||
GXColor _clearcolor = {0, 0, 0, 0xff};
|
||||
|
||||
//textures need to be 4x4 tiles
|
||||
|
||||
|
||||
/* matrix */
|
||||
|
||||
void glLoadIdentity(void) {
|
||||
guMtxIdentity(model);
|
||||
}
|
||||
|
||||
void glTranslatef( GLfloat x, GLfloat y, GLfloat z ) {
|
||||
Mtx temp;
|
||||
|
||||
guMtxIdentity(temp);
|
||||
guMtxTrans(temp, x, y, z);
|
||||
guMtxConcat(model,temp,model);
|
||||
}
|
||||
|
||||
void glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z) {
|
||||
Mtx temp;
|
||||
guVector axis;
|
||||
|
||||
axis.x = x;
|
||||
axis.y = y;
|
||||
axis.z = z;
|
||||
guMtxIdentity(temp);
|
||||
guMtxRotAxisDeg(temp, &axis, angle);
|
||||
guMtxConcat(model,temp,model);
|
||||
|
||||
}
|
||||
|
||||
void glScalef (GLfloat x, GLfloat y, GLfloat z){
|
||||
Mtx temp;
|
||||
|
||||
guMtxIdentity(temp);
|
||||
guMtxScale(temp, x, y, z);
|
||||
guMtxConcat(model,temp,model);
|
||||
}
|
||||
|
||||
void glPopMatrix (void){
|
||||
_mtxcurrentelement--;
|
||||
guMtxCopy(_mtxelements[_mtxcurrentelement], model);
|
||||
}
|
||||
|
||||
void glPushMatrix (void){
|
||||
guMtxCopy(model, _mtxelements[_mtxcurrentelement]);
|
||||
_mtxcurrentelement++;
|
||||
}
|
||||
|
||||
/* glVertex */
|
||||
|
||||
void glVertex3f( GLfloat x, GLfloat y, GLfloat z ) {
|
||||
//store the vertex and keep index
|
||||
_vertexelements[_numelements].x = x;
|
||||
_vertexelements[_numelements].y = y;
|
||||
_vertexelements[_numelements].z = z;
|
||||
|
||||
_colorelements[_numelements].r = _tempcolorelement.r;
|
||||
_colorelements[_numelements].g = _tempcolorelement.g;
|
||||
_colorelements[_numelements].b = _tempcolorelement.b;
|
||||
_colorelements[_numelements].a = _tempcolorelement.a;
|
||||
|
||||
_normalelements[_numelements].x = _tempnormalelement.x;
|
||||
_normalelements[_numelements].y = _tempnormalelement.y;
|
||||
_normalelements[_numelements].z = _tempnormalelement.z;
|
||||
|
||||
_texcoordelements[_numelements].s = _temptexcoordelement.s;
|
||||
_texcoordelements[_numelements].t = _temptexcoordelement.t;
|
||||
|
||||
_numelements += 1;
|
||||
}
|
||||
|
||||
void glNormal3f( GLfloat x, GLfloat y, GLfloat z ){
|
||||
_tempnormalelement.x = x;
|
||||
_tempnormalelement.y = y;
|
||||
_tempnormalelement.z = z;
|
||||
}
|
||||
|
||||
void glColor3f( GLfloat r, GLfloat g, GLfloat b ) {
|
||||
//store the vertex and keep index
|
||||
_tempcolorelement.r = r;
|
||||
_tempcolorelement.g = g;
|
||||
_tempcolorelement.b = b;
|
||||
_tempcolorelement.a = 0.0f;
|
||||
}
|
||||
|
||||
void glTexCoord2f( GLfloat s, GLfloat t ){
|
||||
_temptexcoordelement.s = s;
|
||||
_temptexcoordelement.t = t;
|
||||
};
|
||||
|
||||
/* functions */
|
||||
void glBegin(GLenum type) {
|
||||
_numelements =0;
|
||||
//store the type
|
||||
switch(type)
|
||||
{
|
||||
case GL_TRIANGLE_STRIP: _type = GX_TRIANGLESTRIP; break;
|
||||
case GL_TRIANGLES: _type = GX_TRIANGLES; break;
|
||||
case GL_QUADS: _type = GX_QUADS; break;
|
||||
case GL_LINES: _type = GL_LINES; break;
|
||||
};
|
||||
}
|
||||
|
||||
// Render a vertex to Gecko (used by glEnd)
|
||||
void UploadVertex(int index){
|
||||
GX_Position3f32( _vertexelements[index].x, _vertexelements[index].y, _vertexelements[index].z);
|
||||
GX_Normal3f32(_normalelements[index].x, _normalelements[index].y, _normalelements[index].z);
|
||||
|
||||
//when using GL_FLAT only one color is allowed!!! //GL_SMOOTH allows for an color to be specified at each vertex
|
||||
GX_Color3f32( _colorelements[index].r, _colorelements[index].g, _colorelements[index].b); //glmaterialfv call instead when glcolormaterial call is used
|
||||
GX_TexCoord2f32(_texcoordelements[index].s,_texcoordelements[index].t);
|
||||
};
|
||||
|
||||
void GX_TestInitSpecularDir(GXLightObj *lit_obj,f32 nx,f32 ny,f32 nz) {
|
||||
//f32 px, py, pz;
|
||||
f32 hx, hy, hz, mag;
|
||||
// Compute half-angle guVector
|
||||
hx = -nx;
|
||||
hy = -ny;
|
||||
hz = (-nz + 1.0f);
|
||||
mag = 1.0f / sqrtf((hx * hx) + (hy * hy) + (hz * hz));
|
||||
hx *= mag;
|
||||
hy *= mag;
|
||||
hz *= mag;
|
||||
|
||||
//px = -nx * BIG_NUMBER;
|
||||
//py = -ny * BIG_NUMBER;
|
||||
//pz = -nz * BIG_NUMBER;
|
||||
//((f32*)lit_obj)[10] = px;
|
||||
//((f32*)lit_obj)[11] = py;
|
||||
//((f32*)lit_obj)[12] = pz;
|
||||
((f32*)lit_obj)[13] = hx;
|
||||
((f32*)lit_obj)[14] = hy;
|
||||
((f32*)lit_obj)[15] = hz;
|
||||
}
|
||||
|
||||
void GX_TestInitLightShininess(GXLightObj *lobj, f32 shininess) {
|
||||
|
||||
shininess = (shininess / 128) * 256; //convert opengl range to gx
|
||||
GX_InitLightAttn(lobj, 1.0, 0.0, 2.0, (shininess)*0.5, 0.0, 1.0F-(shininess)*0.5 );
|
||||
|
||||
//Redshade
|
||||
//math behind a and k is [a0 + a1^2 + a2^3], brightness as you go away from the center, [or brightness as you go away from source in k
|
||||
//if you want to see the GL equivalent, look up GL_(CONSTANT|LINEAR|QUADRATIC)_ATTENUATION, since those are k0,k1,k2 respectively
|
||||
//your end equation value should be between 0.0 and 1.0
|
||||
}
|
||||
|
||||
void glEnd(void) {
|
||||
|
||||
GX_SetCullMode(GX_CULL_FRONT);
|
||||
|
||||
Mtx mvi;
|
||||
Mtx mv;
|
||||
|
||||
// Mtx inversemodelview;
|
||||
|
||||
// load the modelview matrix into matrix memory
|
||||
guMtxConcat(view,model,modelview);
|
||||
GX_LoadPosMtxImm(modelview, GX_PNMTX0);
|
||||
|
||||
//for normals first calculate normal matrix (thanks shagkur)
|
||||
guMtxInverse(modelview,mvi);
|
||||
guMtxTranspose(mvi,modelview);
|
||||
GX_LoadNrmMtxImm(modelview,GX_PNMTX0); //experimtal leave out (hmm works good?)
|
||||
|
||||
|
||||
//use global ambient light together with current material ambient and add emissive material color
|
||||
GXColor constcolor;
|
||||
constcolor.r = (gxcurrentmaterialambientcolor.r*gxglobalambientlightcolor.r) * 0xFF;
|
||||
constcolor.g = (gxcurrentmaterialambientcolor.g*gxglobalambientlightcolor.g) * 0xFF;
|
||||
constcolor.b = (gxcurrentmaterialambientcolor.b*gxglobalambientlightcolor.b) * 0xFF;
|
||||
constcolor.a = (gxcurrentmaterialambientcolor.a*gxglobalambientlightcolor.a) * 0xFF;
|
||||
GX_SetTevColor(GX_TEVREG0, constcolor);
|
||||
|
||||
GXColor emiscolor;
|
||||
emiscolor.r = gxcurrentmaterialemissivecolor.r * 0xFF;
|
||||
emiscolor.g = gxcurrentmaterialemissivecolor.g * 0xFF;
|
||||
emiscolor.b = gxcurrentmaterialemissivecolor.b * 0xFF;
|
||||
emiscolor.a = gxcurrentmaterialemissivecolor.a * 0xFF;
|
||||
GX_SetTevColor(GX_TEVREG1, emiscolor);
|
||||
|
||||
//first check if a lightdirtyflag is set (thanks ector) so we do not have to set up light every run
|
||||
//also usefull on matrices etc.
|
||||
|
||||
//now set each light
|
||||
GXColor gxchanambient;
|
||||
gxchanambient.r = gxcurrentmaterialambientcolor.r;
|
||||
gxchanambient.g = gxcurrentmaterialambientcolor.g;
|
||||
gxchanambient.b = gxcurrentmaterialambientcolor.b;
|
||||
gxchanambient.a = gxcurrentmaterialambientcolor.a;
|
||||
|
||||
GXColor gxchanspecular;
|
||||
gxchanspecular.r = gxcurrentmaterialspecularcolor.r;
|
||||
gxchanspecular.g = gxcurrentmaterialspecularcolor.g;
|
||||
gxchanspecular.b = gxcurrentmaterialspecularcolor.b;
|
||||
gxchanspecular.a = gxcurrentmaterialspecularcolor.a;
|
||||
|
||||
int lightcounter = 0;
|
||||
for (lightcounter =0; lightcounter < 4; lightcounter++){
|
||||
|
||||
if(gxlightenabled[lightcounter]){ //when light is enabled
|
||||
|
||||
//somewhere here an error happens?
|
||||
|
||||
//Setup mat/light ambient color
|
||||
gxchanambient.r = ((gxchanambient.r * gxlightambientcolor[lightcounter].r) * 0xFF);
|
||||
gxchanambient.g = ((gxchanambient.g * gxlightambientcolor[lightcounter].g) * 0xFF);
|
||||
gxchanambient.b = ((gxchanambient.b * gxlightambientcolor[lightcounter].b) * 0xFF);
|
||||
gxchanambient.a = ((gxchanambient.a * gxlightambientcolor[lightcounter].a) * 0xFF);
|
||||
GX_SetChanAmbColor(GX_COLOR0A0, gxchanambient );
|
||||
|
||||
//Setup diffuse material color
|
||||
GXColor mdc;
|
||||
mdc.r = (gxcurrentmaterialdiffusecolor.r * 0xFF);
|
||||
mdc.g = (gxcurrentmaterialdiffusecolor.g * 0xFF);
|
||||
mdc.b = (gxcurrentmaterialdiffusecolor.b * 0xFF);
|
||||
mdc.a = (gxcurrentmaterialdiffusecolor.a * 0xFF);
|
||||
GX_SetChanMatColor(GX_COLOR0A0, mdc );
|
||||
|
||||
//Setup specular material color
|
||||
// gxcurrentmaterialshininess *
|
||||
gxchanspecular.r = (gxchanspecular.r * gxlightspecularcolor[lightcounter].r) * 0xFF;
|
||||
gxchanspecular.g = (gxchanspecular.g * gxlightspecularcolor[lightcounter].g) * 0xFF;
|
||||
gxchanspecular.b = (gxchanspecular.b * gxlightspecularcolor[lightcounter].b) * 0xFF;
|
||||
gxchanspecular.a = (gxchanspecular.a * gxlightspecularcolor[lightcounter].a) * 0xFF;
|
||||
GX_SetChanMatColor(GX_COLOR1A1, gxchanspecular); // use red as test color
|
||||
|
||||
//Setup light diffuse color
|
||||
GXColor ldc;
|
||||
ldc.r = gxlightdiffusecolor[lightcounter].r * 0xFF;
|
||||
ldc.g = gxlightdiffusecolor[lightcounter].g * 0xFF;
|
||||
ldc.b = gxlightdiffusecolor[lightcounter].b * 0xFF;
|
||||
ldc.a = gxlightdiffusecolor[lightcounter].a * 0xFF;
|
||||
GX_InitLightColor(&gxlight[lightcounter], ldc ); //move call to glend or init?;
|
||||
GX_InitLightColor(&gxlight[lightcounter+4], ldc ); //move call to glend or init?;
|
||||
|
||||
//Setup light postion
|
||||
|
||||
//check on w component when 1. light is positional
|
||||
// when 0. light is directional at infinite pos
|
||||
|
||||
guVector lpos;
|
||||
guVector wpos;
|
||||
lpos.x = gxlightpos[lightcounter].x;
|
||||
lpos.y = gxlightpos[lightcounter].y;
|
||||
lpos.z = gxlightpos[lightcounter].z;
|
||||
|
||||
|
||||
if (gxlightpos[lightcounter].w == 0){
|
||||
guVecNormalize(&lpos);
|
||||
lpos.x *= BIG_NUMBER;
|
||||
lpos.y *= BIG_NUMBER;
|
||||
lpos.z *= BIG_NUMBER;
|
||||
}
|
||||
|
||||
guVecMultiply(view,&lpos,&wpos); //light position should be transformed by world-to-view matrix (thanks h0lyRS)
|
||||
GX_InitLightPosv(&gxlight[lightcounter], &wpos); //feed corrected coord to light pos
|
||||
GX_InitLightPosv(&gxlight[lightcounter+4], &wpos); //feed corrected coord to light pos
|
||||
|
||||
|
||||
|
||||
//Setup light direction (when w is 1 dan dir = 0,0,0
|
||||
guVector ldir;
|
||||
if (gxlightpos[lightcounter].w==0){
|
||||
//lpos.x = gxlightpos[lightcounter].x;
|
||||
//lpos.y = gxlightpos[lightcounter].y;
|
||||
//lpos.z = gxlightpos[lightcounter].z;
|
||||
|
||||
ldir.x = gxlightpos[lightcounter].x;
|
||||
ldir.y = gxlightpos[lightcounter].y;
|
||||
ldir.z = gxlightpos[lightcounter].z;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gxspotcutoff[lightcounter] != 180){ //if we have a spot light direction is needed
|
||||
ldir.x = gxspotdirection[lightcounter].x;
|
||||
ldir.y = gxspotdirection[lightcounter].y;
|
||||
ldir.z = gxspotdirection[lightcounter].z;
|
||||
}
|
||||
else {
|
||||
ldir.x = 0;
|
||||
ldir.y = 0;
|
||||
ldir.z = -1;
|
||||
}
|
||||
}
|
||||
|
||||
//guVecNormalize(&ldir);
|
||||
//ldir.x *= BIG_NUMBER;
|
||||
//ldir.y *= BIG_NUMBER;
|
||||
//ldir.z *= BIG_NUMBER;
|
||||
|
||||
guMtxInverse(view,mvi);
|
||||
guMtxTranspose(mvi,view);
|
||||
|
||||
guVecMultiply(view,&ldir,&ldir); //and direction should be transformed by inv-transposed of world-to-view (thanks h0lyRS)
|
||||
|
||||
GX_InitLightDir(&gxlight[lightcounter], ldir.x, ldir.y, ldir.z); //feed corrected coord to light dir
|
||||
GX_InitLightDir(&gxlight[lightcounter+4], ldir.x, ldir.y, ldir.z); //feed corrected coord to light dir
|
||||
|
||||
|
||||
if (gxspotcutoff[lightcounter] != 180){
|
||||
//Setup specular light (only for spotlight when GL_SPOT_CUTOFF <> 180)
|
||||
//make this line optional? If on it disturbs diffuse light?
|
||||
guVector sdir;
|
||||
sdir.x = gxspotdirection[lightcounter].x;
|
||||
sdir.y = gxspotdirection[lightcounter].y;
|
||||
sdir.z = gxspotdirection[lightcounter].z;
|
||||
//guVecNormalize(&sdir);
|
||||
|
||||
//sdir.x *= BIG_NUMBER;
|
||||
//sdir.y *= BIG_NUMBER;
|
||||
//sdir.z *= BIG_NUMBER;
|
||||
|
||||
guVecMultiply(view,&sdir,&sdir);
|
||||
|
||||
guVector light_dir;
|
||||
guVecSub(&sdir, &lpos, &light_dir);
|
||||
|
||||
GX_TestInitSpecularDir(&gxlight[lightcounter], light_dir.x, light_dir.y, light_dir.z); //needed to enable specular light
|
||||
GX_TestInitSpecularDir(&gxlight[lightcounter+4], light_dir.x, light_dir.y, light_dir.z); //needed to enable specular light
|
||||
|
||||
};
|
||||
|
||||
|
||||
//this calls:
|
||||
// #define GX_InitLightShininess(lobj, shininess) (GX_InitLightAttn(lobj, 0.0F, 0.0F, 1.0F, (shininess)/2.0F, 0.0F, 1.0F-(shininess)/2.0F ))
|
||||
|
||||
//Setup distance attinuation (opengl vs gx differences?)
|
||||
//GX_InitLightDistAttn(&gxlight[lightcounter], 100.0f, gxspotexponent[lightcounter], GX_DA_GENTLE); //gxspotexponent was 0.5f
|
||||
//ref_dist, bright, dist func
|
||||
//k0 = 1.0;
|
||||
//k1 = 0.5f*(1.0f-ref_brite)/(ref_brite*ref_dist);
|
||||
//k2 = 0.5f*(1.0f-ref_brite)/(ref_brite*ref_dist*ref_dist); or 0.0f;
|
||||
|
||||
|
||||
|
||||
//Attenuation factor = 1 / (kc + kl*d + kq*d2)
|
||||
//kc = constant attenuation factor (default = 1.0)
|
||||
//kl = linear attenuation factor (default = 0.0)
|
||||
//kq = quadratic attenuation factor (default = 0.0)
|
||||
|
||||
float distance = BIG_NUMBER; //either distance of light or falloff factor
|
||||
float factor = 1 / (gxconstantattanuation[lightcounter] + gxlinearattanuation[lightcounter]*distance + gxquadraticattanuation[lightcounter]*distance*distance);
|
||||
|
||||
//float factor = 5.0;
|
||||
|
||||
//k0 - 0;
|
||||
//k1 = 0.5f*(1.0f-ref_brite)/(ref_brite*ref_dist);
|
||||
//k2 = 0.5f*(1.0f-ref_brite)/(ref_brite*ref_dist*ref_dist);
|
||||
|
||||
/*
|
||||
GX_InitLightAttn(&gxlight[lightcounter],
|
||||
1.0, //filled by initlightspot
|
||||
0.0, //filled by initlightspot
|
||||
0.0, //filled by initlightspot
|
||||
gxconstantattanuation[lightcounter],
|
||||
gxlinearattanuation[lightcounter]*distance,
|
||||
gxquadraticattanuation[lightcounter]*distance*distance
|
||||
|
||||
) ;
|
||||
// k0 k1 , k2
|
||||
*/
|
||||
|
||||
//GX_InitLightAttnK(&gxlight[lightcounter], (gxcurrentmaterialshininess)/2.0F , 0.0F ,1.0F-(gxcurrentmaterialshininess)/2.0F);
|
||||
|
||||
|
||||
|
||||
|
||||
GX_InitLightDistAttn(&gxlight[lightcounter], factor ,1.0, GX_DA_STEEP); //gxspotexponent[lightcounter] GX_DA_GENTLE
|
||||
GX_InitLightDistAttn(&gxlight[lightcounter+4], factor ,1.0, GX_DA_STEEP); //gxspotexponent[lightcounter] GX_DA_GENTLE
|
||||
|
||||
|
||||
//ref_dist //ref_brite
|
||||
// factor / strenght
|
||||
//1.0 is // glLightf(GL_LIGHT1, GL_SPOT_EXPONENT, 10.0f); ??
|
||||
|
||||
|
||||
//Setup light type (normal/spotlight)
|
||||
//0-90 / 255-0
|
||||
|
||||
|
||||
//cut_off, spot func
|
||||
//GX_InitLightSpot(&gxlight[lightcounter], 0.0f, GX_SP_OFF); //not this is not a spot light
|
||||
|
||||
//GX_InitLightShininess(&gxlight[lightcounter], gxcurrentmaterialshininess); // /180?
|
||||
|
||||
//float testspot = 90 - ((gxcurrentmaterialshininess * 90) / 128); //thanks ector 90 - (x * 90 / 255)
|
||||
//if (gxcurrentmaterialshininess == 0){
|
||||
// testspot = 90;
|
||||
//}
|
||||
//zid 255-gxcurrentmaterialshininess/(255/90);
|
||||
|
||||
//setup specular highlight
|
||||
//GX_InitLightSpot(&gxlight[lightcounter], testspot, GX_SP_COS); //not this is not a spot light (gxspotcutoff[lightcounter])
|
||||
|
||||
//setup normal spotlight
|
||||
GX_InitLightSpot(&gxlight[lightcounter], gxspotcutoff[lightcounter], GX_SP_RING1); //not this is not a spot light ()
|
||||
GX_InitLightSpot(&gxlight[1], gxspotcutoff[lightcounter], GX_SP_RING1); //not this is not a spot light ()
|
||||
|
||||
if ( gxcurrentmaterialshininess != 0 ) {
|
||||
//if (gxspotcutoff[lightcounter] != 180) {
|
||||
GX_TestInitLightShininess(&gxlight[lightcounter+4], gxcurrentmaterialshininess);
|
||||
//}
|
||||
};
|
||||
|
||||
//Load the light up
|
||||
switch (lightcounter){
|
||||
case 0:
|
||||
GX_LoadLightObj(&gxlight[lightcounter], GX_LIGHT0);
|
||||
GX_LoadLightObj(&gxlight[lightcounter+4], GX_LIGHT4);
|
||||
break;
|
||||
case 1:
|
||||
GX_LoadLightObj(&gxlight[lightcounter], GX_LIGHT1);
|
||||
GX_LoadLightObj(&gxlight[lightcounter+4], GX_LIGHT5);
|
||||
break;
|
||||
case 2:
|
||||
GX_LoadLightObj(&gxlight[lightcounter], GX_LIGHT2);
|
||||
GX_LoadLightObj(&gxlight[lightcounter+4], GX_LIGHT6);
|
||||
break;
|
||||
case 3:
|
||||
GX_LoadLightObj(&gxlight[lightcounter], GX_LIGHT3);
|
||||
GX_LoadLightObj(&gxlight[lightcounter+4], GX_LIGHT7);
|
||||
break;
|
||||
// case 4: GX_LoadLightObj(&gxlight[lightcounter], GX_LIGHT4); break;
|
||||
// case 5: GX_LoadLightObj(&gxlight[lightcounter], GX_LIGHT5); break;
|
||||
// case 6: GX_LoadLightObj(&gxlight[lightcounter], GX_LIGHT6); break;
|
||||
// case 7: GX_LoadLightObj(&gxlight[lightcounter], GX_LIGHT7); break;
|
||||
}
|
||||
|
||||
//GX_LoadLightObj(&gxlight[lightcounter], GX_LIGHT0);
|
||||
//GX_LoadLightObj(&gxlight[1], GX_LIGHT1);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//set the curtexture if tex2denabled
|
||||
if (tex2denabled){
|
||||
GX_LoadTexObj(&gxtextures[curtexture], GX_TEXMAP0); //TODO: make GX_TEXMAP0 dynamic for multitexturing
|
||||
};
|
||||
|
||||
//now we can draw the gx way (experiment try render in reverse ivm normals pointing the wrong way)
|
||||
|
||||
int countelements = _numelements*2;
|
||||
if (gxcullfaceanabled==true){
|
||||
countelements = _numelements;
|
||||
}
|
||||
|
||||
GX_Begin(_type, GX_VTXFMT0, countelements); //dependend on culling setting
|
||||
int i =0;
|
||||
//default
|
||||
//order dependend on glFrontFace(GL_CCW);
|
||||
//or GL_CW // for( i=0; i<_numelements; i++)
|
||||
|
||||
//GX_TRIANGLESTRIP GL_TRIANGLE_STRIP
|
||||
//0 1 2 0 1 2
|
||||
//1 3 2 2 1 3
|
||||
//2 3 4 2 3 4
|
||||
//better think of a clever swapping routine
|
||||
//maybe then no need to invert normal for trianglestrip anymore
|
||||
|
||||
//also GX_TRIANLES need to be drawn in reverse?
|
||||
//but GX_QUAD does not
|
||||
|
||||
//so GX = CW by default while opengl is CCW by default?
|
||||
|
||||
//bushing say cannot i be possibel that opengl reorders vertexes
|
||||
|
||||
//u32 reverse = 0;
|
||||
//int pos = 0;
|
||||
//int temp = 0;
|
||||
|
||||
//GL_POLYGON: http://www.gamedev.net/reference/articles/article425.asp
|
||||
|
||||
bool cw = true;
|
||||
bool ccw = true;
|
||||
|
||||
if(gxcullfaceanabled==true){
|
||||
cw = false;
|
||||
ccw = false;
|
||||
switch(gxwinding){
|
||||
case GL_CW: cw = true; break;
|
||||
case GL_CCW: ccw = true; break;
|
||||
}
|
||||
}
|
||||
|
||||
if (cw==true){
|
||||
//CW
|
||||
for( i=_numelements-1; i>=0; i--)
|
||||
{
|
||||
UploadVertex(i);
|
||||
}
|
||||
}
|
||||
|
||||
if (ccw==true){
|
||||
//CCW
|
||||
for( i=0; i<_numelements; i++)
|
||||
{
|
||||
UploadVertex(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GX_End();
|
||||
|
||||
//clean up just to be sure
|
||||
i =0;
|
||||
for( i=0; i<_numelements; i++)
|
||||
{
|
||||
_vertexelements[i].x = 0.0F;
|
||||
_vertexelements[i].y = 0.0F;
|
||||
_vertexelements[i].z = 0.0F;
|
||||
|
||||
_normalelements[i].x = 0.0F;
|
||||
_normalelements[i].y = 0.0F;
|
||||
_normalelements[i].z = 0.0F;
|
||||
|
||||
_colorelements[i].r = 0.0F;
|
||||
_colorelements[i].g = 0.0F;
|
||||
_colorelements[i].b = 0.0F;
|
||||
_colorelements[i].a = 0.0F;
|
||||
|
||||
_texcoordelements[i].s = 0.0F;
|
||||
_texcoordelements[i].t = 0.0F;
|
||||
|
||||
}
|
||||
_numelements =0;
|
||||
}
|
||||
|
||||
/* light */
|
||||
|
||||
void glLightModelfv( GLenum pname, const GLfloat *params ){
|
||||
switch(pname)
|
||||
{
|
||||
case GL_LIGHT_MODEL_AMBIENT:
|
||||
gxglobalambientlightcolor.r = params[0];
|
||||
gxglobalambientlightcolor.g = params[1];
|
||||
gxglobalambientlightcolor.b = params[2];
|
||||
gxglobalambientlightcolor.a = params[3];
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
void glLightf( GLenum light, GLenum pname, GLfloat param ){
|
||||
int lightNum = 0;
|
||||
switch(light)
|
||||
{
|
||||
case GL_LIGHT0: lightNum = 0; break;
|
||||
case GL_LIGHT1: lightNum = 1; break;
|
||||
case GL_LIGHT2: lightNum = 2; break;
|
||||
case GL_LIGHT3: lightNum = 3; break;
|
||||
case GL_LIGHT4: lightNum = 4; break;
|
||||
case GL_LIGHT5: lightNum = 5; break;
|
||||
case GL_LIGHT6: lightNum = 6; break;
|
||||
case GL_LIGHT7: lightNum = 7; break;
|
||||
};
|
||||
|
||||
switch(pname)
|
||||
{
|
||||
case GL_SPOT_CUTOFF: gxspotcutoff[lightNum] = param; break;
|
||||
case GL_SPOT_EXPONENT: gxspotexponent[lightNum] = param; break;
|
||||
case GL_CONSTANT_ATTENUATION: gxconstantattanuation[lightNum] = param; break;
|
||||
case GL_LINEAR_ATTENUATION: gxlinearattanuation[lightNum] = param; break;
|
||||
case GL_QUADRATIC_ATTENUATION: gxquadraticattanuation[lightNum] = param; break;
|
||||
};
|
||||
};
|
||||
|
||||
void glLightfv( GLenum light, GLenum pname, const GLfloat *params ){
|
||||
int lightNum = 0;
|
||||
switch(light)
|
||||
{
|
||||
case GL_LIGHT0: lightNum = 0; break;
|
||||
case GL_LIGHT1: lightNum = 1; break;
|
||||
case GL_LIGHT2: lightNum = 2; break;
|
||||
case GL_LIGHT3: lightNum = 3; break;
|
||||
case GL_LIGHT4: lightNum = 4; break;
|
||||
case GL_LIGHT5: lightNum = 5; break;
|
||||
case GL_LIGHT6: lightNum = 6; break;
|
||||
case GL_LIGHT7: lightNum = 7; break;
|
||||
};
|
||||
|
||||
guVector lightPos={0.0F,0.0F,0.0F}; //TODO: make it opengl default light position
|
||||
GXColor defcolor={0xFF,0xFF,0xFF,0xFF};
|
||||
switch(pname)
|
||||
{
|
||||
case GL_POSITION:
|
||||
lightPos.x = params[0];
|
||||
lightPos.y = params[1];
|
||||
lightPos.z = params[2];
|
||||
guVecMultiply(model,&lightPos,&lightPos); //update light position by current model matrix
|
||||
gxlightpos[lightNum].x = lightPos.x;
|
||||
gxlightpos[lightNum].y = lightPos.y;
|
||||
gxlightpos[lightNum].z = lightPos.z;
|
||||
gxlightpos[lightNum].w = params[3]; //leave W param untouched
|
||||
gxcurlight = lightNum;
|
||||
break;
|
||||
case GL_DIFFUSE:
|
||||
gxlightdiffusecolor[lightNum].r = params[0];
|
||||
gxlightdiffusecolor[lightNum].g = params[1];
|
||||
gxlightdiffusecolor[lightNum].b = params[2];
|
||||
gxlightdiffusecolor[lightNum].a = params[3];
|
||||
break;
|
||||
case GL_AMBIENT:
|
||||
gxlightambientcolor[lightNum].r = params[0];
|
||||
gxlightambientcolor[lightNum].g = params[1];
|
||||
gxlightambientcolor[lightNum].b = params[2];
|
||||
gxlightambientcolor[lightNum].a = params[3];
|
||||
break;
|
||||
case GL_SPECULAR:
|
||||
gxlightspecularcolor[lightNum].r = params[0];
|
||||
gxlightspecularcolor[lightNum].g = params[1];
|
||||
gxlightspecularcolor[lightNum].b = params[2];
|
||||
gxlightspecularcolor[lightNum].a = params[3];
|
||||
break;
|
||||
case GL_SPOT_DIRECTION:
|
||||
gxspotdirection[lightNum].x = params[0];
|
||||
gxspotdirection[lightNum].y = params[1];
|
||||
gxspotdirection[lightNum].z = params[2];
|
||||
gxspotdirection[lightNum].w = params[3];
|
||||
break;
|
||||
};
|
||||
};
|
||||
|
||||
/* material */
|
||||
|
||||
void glMaterialf( GLenum face, GLenum pname, GLfloat param ){
|
||||
switch(pname)
|
||||
{
|
||||
case GL_SHININESS:
|
||||
gxcurrentmaterialshininess = param; break;
|
||||
}
|
||||
};
|
||||
|
||||
void glMaterialfv( GLenum face, GLenum pname, const GLfloat *params ){
|
||||
switch(pname)
|
||||
{
|
||||
case GL_EMISSION:
|
||||
gxcurrentmaterialemissivecolor.r = params[0];
|
||||
gxcurrentmaterialemissivecolor.g = params[1];
|
||||
gxcurrentmaterialemissivecolor.b = params[2];
|
||||
gxcurrentmaterialemissivecolor.a = params[3];
|
||||
break;
|
||||
case GL_DIFFUSE:
|
||||
gxcurrentmaterialdiffusecolor.r = params[0];
|
||||
gxcurrentmaterialdiffusecolor.g = params[1];
|
||||
gxcurrentmaterialdiffusecolor.b = params[2];
|
||||
gxcurrentmaterialdiffusecolor.a = params[3];
|
||||
break;
|
||||
case GL_AMBIENT:
|
||||
gxcurrentmaterialambientcolor.r = params[0];
|
||||
gxcurrentmaterialambientcolor.g = params[1];
|
||||
gxcurrentmaterialambientcolor.b = params[2];
|
||||
gxcurrentmaterialambientcolor.a = params[3];
|
||||
break;
|
||||
case GL_SPECULAR:
|
||||
gxcurrentmaterialspecularcolor.r = params[0];
|
||||
gxcurrentmaterialspecularcolor.g = params[1];
|
||||
gxcurrentmaterialspecularcolor.b = params[2];
|
||||
gxcurrentmaterialspecularcolor.a = params[3];
|
||||
break;
|
||||
case GL_SHININESS:
|
||||
gxcurrentmaterialshininess = params[0]; break;
|
||||
}
|
||||
};
|
||||
|
||||
/* texture */
|
||||
|
||||
void glGenTextures( GLsizei n, GLuint *textures ){
|
||||
textures = malloc(sizeof(GLuint)*n);
|
||||
int i=0;
|
||||
for(i=0;i<n;i++)
|
||||
textures[i] = i;
|
||||
};
|
||||
|
||||
void glBindTexture( GLenum target, GLuint texture ){
|
||||
curtexture = texture;
|
||||
curtexturetarget = target;
|
||||
};
|
||||
|
||||
void glTexImage2D( GLenum target, GLint level,
|
||||
GLint internalFormat,
|
||||
GLsizei width, GLsizei height,
|
||||
GLint border, GLenum format, GLenum type,
|
||||
const GLvoid *pixels ){
|
||||
//glTexImage2D(GL_TEXTURE_2D, 0, 3, crate0tex.width, crate0tex.height, 0, GL_RGB, GL_UNSIGNED_BYTE, crate0tex.tex_data);
|
||||
GX_InitTexObj(&gxtextures[curtexture], (void*)pixels, width,height,6,1,1,GX_FALSE); //6 = colfmt make it dynamic
|
||||
|
||||
};
|
||||
|
||||
/* clear */
|
||||
|
||||
void glClear (GLbitfield mask) {
|
||||
//implement logic dealing with mask.
|
||||
GX_SetCopyClear(_clearcolor, _cleardepth); // this clears both buffers
|
||||
|
||||
//to clear only one of buffers then something more clever has to be done (thanks to samson)
|
||||
//Disable colour-write, enable zwrite, disable z-test, write a screen-aligned quad at whatever depth you want.
|
||||
}
|
||||
|
||||
void glClearColor( GLclampf red,
|
||||
GLclampf green,
|
||||
GLclampf blue,
|
||||
GLclampf alpha ) {
|
||||
_clearcolor.r = red * 0xff; //color needs to be converted to byte
|
||||
_clearcolor.g = green * 0xff;
|
||||
_clearcolor.b = blue * 0xff;
|
||||
_clearcolor.a = alpha * 0xff;
|
||||
}
|
||||
|
||||
void glClearDepth (GLclampd depth){
|
||||
_cleardepth = depth * 0x00ffffff;
|
||||
}
|
||||
|
||||
/* misc */
|
||||
|
||||
void glFlush(void) {
|
||||
GX_DrawDone();
|
||||
}
|
||||
|
||||
void glEnable(GLenum type){
|
||||
|
||||
u8 gxlightmask = 0x00000000;
|
||||
u8 gxlightmaskspec = 0x00000000;
|
||||
int lightcounter = 0;
|
||||
int countlights =0;
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case GL_DEPTH_TEST: depthtestenabled = GX_TRUE; break;
|
||||
case GL_LIGHTING:
|
||||
|
||||
//getting opengl lights to work on gx
|
||||
//
|
||||
//xg has only one light color (a diffuse one)
|
||||
//opengl lights have the following colors: diffuse, ambient and specular
|
||||
//also opengl has a global ambient color independend of a individual light
|
||||
//gx has 2 material colors: diffuse (mat) and ambient (can also be considered part of light?)
|
||||
//opengl material have the followning colors: diffuse, ambient, specular and emission
|
||||
//so we (may) have problem (or call it a challenge)
|
||||
|
||||
//now how does opengl calculate light with all these colors
|
||||
//vertex color = material emission
|
||||
// + global ambient scaled by material ambient
|
||||
// + ambient, diffuse, specular contributions from light(s), properly attinuated
|
||||
//
|
||||
//let us take these apart.
|
||||
//
|
||||
//material emission is like a constant color. So we can just add this in a tev stage. The only problem is how to add a color to a specific stage?)
|
||||
//
|
||||
//global ambient scaled by material ambient
|
||||
//this is global ambient * material ambient so we can feed that result to an tev stage.
|
||||
//
|
||||
//Now comes the hard part as each color is used in the light calulation. And we only have once color in gx.
|
||||
//Maybe we are lucky as each colors term is added to each other and only then used in light calculation
|
||||
//So we might get away with just adding the 3 colors upfront and feed that as color to the light source
|
||||
//But first let see how these terms are calculated.
|
||||
//
|
||||
//Ambient Term = light ambient * material ambient = GXChanAmbColor ?
|
||||
//Diffuse Term = surface * (light diffuse * material diffuse) light diffues = light color | material diffuse = GXChanMatColor (let gx handle this)
|
||||
//Specular Term = normal.shininess * (light specular * material specular) (let gx handle this, but add lspec*mspec to GXChanMatColor)
|
||||
//
|
||||
//now we could use 3 light to emulate 1 opengl light but that would not be helpfull
|
||||
//so maybe there is an other way also gx material misses color components
|
||||
//
|
||||
//gx has max to channels
|
||||
//each can be setup differently so we can have on chanel for normal diffuse
|
||||
//and the other for specular. But we only have on light color so unless the specular color equals light color this it not usefull)
|
||||
//maybe some experiments with GXChanMatColor help with that? So light color to none and all color CHANMatColor?
|
||||
//
|
||||
//also we have multiple tev stages.
|
||||
//as we have used 2 channels we have to use 3 stages
|
||||
//stage 1 = emissive + global ambient scaled by material as constant color (maybe 2 stages?)
|
||||
//stage 2 = ambient + diffuse
|
||||
//stage 3 = specular
|
||||
//
|
||||
//So this might do the trick in theory. Now on to practice...
|
||||
|
||||
//<h0lyRS> did you try setting specular to channel GX_COLOR1A1, and diffuse to GX_COLOR0A0, so you can blend them anyway you want?
|
||||
//this could add an extra color?
|
||||
//one way is adding the specular light, other way is multiplying
|
||||
|
||||
|
||||
//Setup lightmask with enabled lights (thanks h0lyRS)
|
||||
for (lightcounter =0; lightcounter < 4; lightcounter++){
|
||||
if(gxlightenabled[lightcounter]){ //when light is enabled
|
||||
gxlightmask |= (GX_LIGHT0 << lightcounter);
|
||||
gxlightmaskspec |= (GX_LIGHT0 << (lightcounter+4) );
|
||||
//countlights++;
|
||||
}
|
||||
};
|
||||
|
||||
// gxlightmask |= (GX_LIGHT0 << 0);
|
||||
// gxlightmaskspec |= (GX_LIGHT0 << 1);
|
||||
|
||||
|
||||
//Setup light system/channels
|
||||
GX_SetNumChans(2); //dependend on if there is a specular color/effect needed
|
||||
|
||||
//channel 1 (ambient + diffuse)
|
||||
GX_SetChanCtrl(GX_COLOR0A0,GX_TRUE,GX_SRC_REG,GX_SRC_REG,gxlightmask,GX_DF_CLAMP,GX_AF_SPOT);
|
||||
|
||||
//channel 2 (specular)
|
||||
GX_SetChanCtrl(GX_COLOR1A1,GX_ENABLE,GX_SRC_REG,GX_SRC_REG,gxlightmaskspec,GX_DF_CLAMP,GX_AF_SPEC);
|
||||
|
||||
|
||||
//Setup TEV-shader
|
||||
|
||||
//Setup the number of tev stages needed
|
||||
int numtevstages = 0;
|
||||
if (tex2denabled){
|
||||
numtevstages = 5;
|
||||
} else {
|
||||
numtevstages = 4;
|
||||
}
|
||||
GX_SetNumTevStages(numtevstages); //each extra color takes another stage?
|
||||
|
||||
|
||||
//stage 1 (global ambient light)
|
||||
|
||||
//color
|
||||
GX_SetTevColorIn(GX_TEVSTAGE0, GX_CC_ZERO, GX_CC_ZERO, GX_CC_ZERO, GX_CC_C0); //shagkur method
|
||||
GX_SetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_ENABLE, GX_TEVPREV);
|
||||
|
||||
//alpha
|
||||
GX_SetTevAlphaIn(GX_TEVSTAGE0, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO, GX_CA_A0); //shagkur method
|
||||
GX_SetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_ENABLE, GX_TEVPREV);
|
||||
|
||||
//tevorder
|
||||
GX_SetTevOrder(GX_TEVSTAGE0, GX_TEXCOORDNULL, GX_TEXMAP_NULL, GX_COLOR0A0); //only use color
|
||||
|
||||
//end stage 1
|
||||
|
||||
|
||||
//stage 2 (global ambient light)
|
||||
|
||||
//color
|
||||
GX_SetTevColorIn(GX_TEVSTAGE1, GX_CC_CPREV, GX_CC_ZERO, GX_CC_ZERO, GX_CC_C1); //shagkur method
|
||||
GX_SetTevColorOp(GX_TEVSTAGE1, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_ENABLE, GX_TEVPREV);
|
||||
|
||||
//alpha
|
||||
GX_SetTevAlphaIn(GX_TEVSTAGE1, GX_CA_APREV, GX_CA_ZERO, GX_CA_ZERO, GX_CA_A1); //shagkur method
|
||||
GX_SetTevAlphaOp(GX_TEVSTAGE1, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_ENABLE, GX_TEVPREV);
|
||||
|
||||
//tevorder
|
||||
GX_SetTevOrder(GX_TEVSTAGE1, GX_TEXCOORDNULL, GX_TEXMAP_NULL, GX_COLOR0A0); //only use color
|
||||
|
||||
//end stage 2
|
||||
|
||||
|
||||
//stage 3 (ambient and diffuse light from material and lights)
|
||||
|
||||
//color
|
||||
GX_SetTevColorIn(GX_TEVSTAGE2, GX_CC_CPREV, GX_CC_ZERO, GX_CC_ZERO, GX_CC_RASC);
|
||||
GX_SetTevColorOp(GX_TEVSTAGE2, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_ENABLE, GX_TEVPREV);
|
||||
|
||||
//alpha
|
||||
GX_SetTevAlphaIn(GX_TEVSTAGE2, GX_CA_APREV, GX_CA_ZERO, GX_CA_ZERO, GX_CC_RASA);
|
||||
GX_SetTevAlphaOp(GX_TEVSTAGE2, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_ENABLE, GX_TEVPREV);
|
||||
|
||||
//tevorder
|
||||
GX_SetTevOrder(GX_TEVSTAGE2, GX_TEXCOORDNULL, GX_TEXMAP_NULL, GX_COLOR0A0); //only use color
|
||||
|
||||
// end stage 3
|
||||
|
||||
//stage 4 (specular light)
|
||||
|
||||
|
||||
// color - blend
|
||||
|
||||
|
||||
|
||||
GX_SetTevColorOp(GX_TEVSTAGE3, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_ENABLE, GX_TEVPREV);
|
||||
//GX_SetTevColorIn(GX_TEVSTAGE3, GX_CC_CPREV, GX_CC_ZERO, GX_CC_ZERO, GX_CC_RASC);
|
||||
// GX_SetTevColorIn(GX_TEVSTAGE3,GX_CC_ZERO,GX_CC_RASC,GX_CC_CPREV,GX_CC_ZERO);
|
||||
GX_SetTevColorIn(GX_TEVSTAGE3,GX_CC_ZERO,GX_CC_RASC,GX_CC_ONE,GX_CC_CPREV);
|
||||
|
||||
|
||||
// alpha - nop
|
||||
GX_SetTevAlphaOp(GX_TEVSTAGE3, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_ENABLE, GX_TEVPREV);
|
||||
//GX_SetTevAlphaIn(GX_TEVSTAGE3, GX_CA_APREV, GX_CA_ZERO, GX_CA_ZERO, GX_CA_RASA); //shagkur method
|
||||
GX_SetTevAlphaIn(GX_TEVSTAGE3,GX_CA_ZERO,GX_CA_RASA,GX_CA_APREV,GX_CA_ZERO);
|
||||
|
||||
GX_SetTevOrder(GX_TEVSTAGE3, GX_TEXCOORDNULL, GX_TEXMAP_NULL, GX_COLOR1A1);
|
||||
|
||||
|
||||
// end stage 4
|
||||
|
||||
if (tex2denabled){
|
||||
|
||||
// stage 5 (textures)
|
||||
|
||||
GX_SetTevOrder(GX_TEVSTAGE4, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR0A0); //use texture
|
||||
GX_SetTevOp(GX_TEVSTAGE4, GX_MODULATE); //blend with previous stage
|
||||
|
||||
// end stage 5
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
case GL_TEXTURE_2D:
|
||||
tex2denabled = true;
|
||||
GX_SetNumTexGens(1); //multitexturing so set to 1 for now
|
||||
GX_SetTevOp(GX_TEVSTAGE0,GX_REPLACE);
|
||||
GX_SetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR0A0);
|
||||
break;
|
||||
case GL_LIGHT0: gxlightenabled[0]=true; break;
|
||||
case GL_LIGHT1: gxlightenabled[1]=true; break;
|
||||
case GL_LIGHT2: gxlightenabled[2]=true; break;
|
||||
case GL_LIGHT3: gxlightenabled[3]=true; break;
|
||||
case GL_LIGHT4: gxlightenabled[4]=true; break;
|
||||
case GL_LIGHT5: gxlightenabled[5]=true; break;
|
||||
case GL_LIGHT6: gxlightenabled[6]=true; break;
|
||||
case GL_LIGHT7: gxlightenabled[7]=true; break;
|
||||
case GL_CULL_FACE: gxcullfaceanabled=true; break;
|
||||
};
|
||||
}
|
||||
|
||||
void glDisable(GLenum type){
|
||||
switch(type)
|
||||
{
|
||||
case GL_DEPTH_TEST: depthtestenabled = GX_FALSE; break;
|
||||
case GL_LIGHTING:
|
||||
GX_SetNumChans(1); //keep this at one all time?
|
||||
GX_SetNumTevStages(1);
|
||||
if (tex2denabled){
|
||||
GX_SetNumTexGens(1); //multitexturing so set to 1 for now
|
||||
GX_SetTevOp(GX_TEVSTAGE0,GX_REPLACE);
|
||||
GX_SetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR0A0);
|
||||
}
|
||||
else
|
||||
{
|
||||
GX_SetTevOp(GX_TEVSTAGE0, GX_PASSCLR);
|
||||
GX_SetChanCtrl(GX_COLOR0A0,GX_DISABLE,GX_SRC_REG,GX_SRC_VTX,GX_LIGHTNULL,GX_DF_NONE,GX_AF_NONE);
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_2D:
|
||||
tex2denabled = false;
|
||||
GX_SetNumTexGens(0); //texturing is of so no textures
|
||||
GX_SetTevOrder(GX_TEVSTAGE0, GX_TEXCOORDNULL, GX_TEXMAP_NULL, GX_COLOR0A0);
|
||||
GX_SetTevOp(GX_TEVSTAGE0, GX_PASSCLR);
|
||||
break;
|
||||
case GL_LIGHT0: gxlightenabled[0]=false; break;
|
||||
case GL_LIGHT1: gxlightenabled[1]=false; break;
|
||||
case GL_LIGHT2: gxlightenabled[2]=false; break;
|
||||
case GL_LIGHT3: gxlightenabled[3]=false; break;
|
||||
case GL_LIGHT4: gxlightenabled[4]=false; break;
|
||||
case GL_LIGHT5: gxlightenabled[5]=false; break;
|
||||
case GL_LIGHT6: gxlightenabled[6]=false; break;
|
||||
case GL_LIGHT7: gxlightenabled[7]=false; break;
|
||||
case GL_CULL_FACE: gxcullfaceanabled=false; break;
|
||||
};
|
||||
}
|
||||
|
||||
/* Depth Buffer */
|
||||
|
||||
void glDepthFunc(GLenum type){
|
||||
switch(type)
|
||||
{
|
||||
case GL_NEVER: depthfunction = GX_NEVER; break;
|
||||
case GL_LESS: depthfunction = GX_LESS; break;
|
||||
case GL_EQUAL: depthfunction = GX_EQUAL; break;
|
||||
case GL_LEQUAL: depthfunction = GX_LEQUAL; break;
|
||||
case GL_GREATER: depthfunction = GX_GREATER; break;
|
||||
case GL_NOTEQUAL: depthfunction = GX_NEQUAL; break;
|
||||
case GL_GEQUAL: depthfunction = GX_GEQUAL; break;
|
||||
case GL_ALWAYS: depthfunction = GX_ALWAYS; break;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
/* Culling / Winding */
|
||||
|
||||
void glFrontFace( GLenum mode ){
|
||||
gxwinding = mode;
|
||||
};
|
||||
|
||||
/* end */
|
|
@ -0,0 +1,39 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <ogcsys.h>
|
||||
#include <gccore.h>
|
||||
|
||||
#include "glint.h"
|
||||
#include "GL/gl.h"
|
||||
#include "GL/glu.h"
|
||||
|
||||
/* glu */
|
||||
|
||||
void gluLookAt( GLdouble eyeX,
|
||||
GLdouble eyeY,
|
||||
GLdouble eyeZ,
|
||||
GLdouble centerX,
|
||||
GLdouble centerY,
|
||||
GLdouble centerZ,
|
||||
GLdouble upX,
|
||||
GLdouble upY,
|
||||
GLdouble upZ ) {
|
||||
|
||||
guVector cam = {eyeX, eyeY, eyeZ},
|
||||
up = {upX, upY, upZ},
|
||||
look = {centerX, centerY, centerZ};
|
||||
|
||||
guLookAt(view, &cam, &up, &look);
|
||||
}
|
||||
|
||||
void gluPerspective( GLdouble fovy,
|
||||
GLdouble aspect,
|
||||
GLdouble zNear,
|
||||
GLdouble zFar ) {
|
||||
guPerspective(perspective, fovy, aspect, zNear, zFar);
|
||||
GX_LoadProjectionMtx(perspective, GX_PERSPECTIVE);
|
||||
}
|
|
@ -0,0 +1,287 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <ogcsys.h>
|
||||
#include <gccore.h>
|
||||
|
||||
#include "glint.h"
|
||||
#include "GL/gl.h"
|
||||
#include "GL/glut.h"
|
||||
|
||||
#define DEFAULT_FIFO_SIZE (256*1024)
|
||||
|
||||
static void *frameBuffer[2] = { NULL, NULL};
|
||||
GXRModeObj *rmode;
|
||||
|
||||
u32 fb = 0; // initial framebuffer index
|
||||
|
||||
/* glut */
|
||||
|
||||
void glutInit(int *argcp, char **argv) {
|
||||
|
||||
// init the vi.
|
||||
VIDEO_Init();
|
||||
|
||||
rmode = VIDEO_GetPreferredMode(NULL);
|
||||
|
||||
//initialize gl default values
|
||||
glColor3f(1.0,1.0,1.0);
|
||||
glTexCoord2f(0.0f, 0.0f);
|
||||
glNormal3f(0.0f,0.0f,0.0f);
|
||||
|
||||
int i = 0;
|
||||
for (i=0;i<8;i++){
|
||||
gxlightenabled[i] = false;
|
||||
gxlightambientcolor[i].r=0;
|
||||
gxlightambientcolor[i].g=0;
|
||||
gxlightambientcolor[i].b=0;
|
||||
gxlightambientcolor[i].a=1;
|
||||
gxlightdiffusecolor[i].r=0;
|
||||
gxlightdiffusecolor[i].g=0;
|
||||
gxlightdiffusecolor[i].b=0;
|
||||
gxlightdiffusecolor[i].a=0;
|
||||
gxlightspecularcolor[i].r=0;
|
||||
gxlightspecularcolor[i].g=0;
|
||||
gxlightspecularcolor[i].b=0;
|
||||
gxlightspecularcolor[i].a=0;
|
||||
|
||||
gxspotcutoff[i] = 180;
|
||||
gxspotexponent[i] = 0;
|
||||
gxspotdirection[i].x = 0.0;
|
||||
gxspotdirection[i].y = 0.0;
|
||||
gxspotdirection[i].z = -1.0;
|
||||
gxspotdirection[i].w = 1.0;
|
||||
}
|
||||
|
||||
gxlightdiffusecolor[0].r=1;
|
||||
gxlightdiffusecolor[0].g=1;
|
||||
gxlightdiffusecolor[0].b=1;
|
||||
gxlightdiffusecolor[0].a=1;
|
||||
|
||||
gxlightspecularcolor[0].r=1;
|
||||
gxlightspecularcolor[0].g=1;
|
||||
gxlightspecularcolor[0].b=1;
|
||||
gxlightspecularcolor[0].a=1;
|
||||
|
||||
gxglobalambientlightcolor.r = 0.2;
|
||||
gxglobalambientlightcolor.g = 0.2;
|
||||
gxglobalambientlightcolor.b = 0.2;
|
||||
gxglobalambientlightcolor.a = 1.0;
|
||||
|
||||
//material specs
|
||||
gxcurrentmaterialemissivecolor.r = 0.0;
|
||||
gxcurrentmaterialemissivecolor.g = 0.0;
|
||||
gxcurrentmaterialemissivecolor.b = 0.0;
|
||||
gxcurrentmaterialemissivecolor.a = 1.0;
|
||||
|
||||
gxcurrentmaterialambientcolor.r = 0.2;
|
||||
gxcurrentmaterialambientcolor.g = 0.2;
|
||||
gxcurrentmaterialambientcolor.b = 0.2;
|
||||
gxcurrentmaterialambientcolor.a = 1.0;
|
||||
|
||||
gxcurrentmaterialdiffusecolor.r = 0.8;
|
||||
gxcurrentmaterialdiffusecolor.g = 0.8;
|
||||
gxcurrentmaterialdiffusecolor.b = 0.8;
|
||||
gxcurrentmaterialdiffusecolor.a = 1.0;
|
||||
|
||||
gxcurrentmaterialspecularcolor.r = 0.0;
|
||||
gxcurrentmaterialspecularcolor.g = 0.0;
|
||||
gxcurrentmaterialspecularcolor.b = 0.0;
|
||||
gxcurrentmaterialspecularcolor.a = 1.0;
|
||||
|
||||
gxcurrentmaterialshininess = 0.0;
|
||||
|
||||
|
||||
//texture is disabled by default
|
||||
tex2denabled = false;
|
||||
|
||||
//setup culling
|
||||
gxcullfaceanabled=false; //disable
|
||||
gxwinding = GL_CCW; //counterclockwise
|
||||
|
||||
//VIDEO_ClearFrameBuffer(GXRModeObj *rmode,void *fb,u32 color);?
|
||||
|
||||
|
||||
}
|
||||
|
||||
void glutInitDisplayMode(unsigned int mode) {
|
||||
// allocate 2 framebuffers for double buffering
|
||||
frameBuffer[0] = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode));
|
||||
frameBuffer[1] = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode));
|
||||
|
||||
VIDEO_Configure(rmode);
|
||||
VIDEO_SetNextFramebuffer(frameBuffer[fb]);
|
||||
VIDEO_SetBlack(FALSE);
|
||||
VIDEO_Flush();
|
||||
VIDEO_WaitVSync();
|
||||
if(rmode->viTVMode&VI_NON_INTERLACE) VIDEO_WaitVSync();
|
||||
|
||||
|
||||
f32 yscale;
|
||||
|
||||
u32 xfbHeight;
|
||||
|
||||
// setup the fifo and then init the flipper
|
||||
void *gp_fifo = NULL;
|
||||
gp_fifo = memalign(32,DEFAULT_FIFO_SIZE);
|
||||
memset(gp_fifo,0,DEFAULT_FIFO_SIZE);
|
||||
|
||||
GX_Init(gp_fifo,DEFAULT_FIFO_SIZE);
|
||||
|
||||
// other gx setup
|
||||
GX_SetViewport(0,0,rmode->fbWidth,rmode->efbHeight,0,1);
|
||||
yscale = GX_GetYScaleFactor(rmode->efbHeight,rmode->xfbHeight);
|
||||
xfbHeight = GX_SetDispCopyYScale(yscale);
|
||||
GX_SetScissor(0,0,rmode->fbWidth,rmode->efbHeight);
|
||||
GX_SetDispCopySrc(0,0,rmode->fbWidth,rmode->efbHeight);
|
||||
GX_SetDispCopyDst(rmode->fbWidth,xfbHeight);
|
||||
GX_SetCopyFilter(rmode->aa,rmode->sample_pattern,GX_TRUE,rmode->vfilter);
|
||||
GX_SetFieldMode(rmode->field_rendering,((rmode->viHeight==2*rmode->xfbHeight)?GX_ENABLE:GX_DISABLE));
|
||||
|
||||
GX_SetCullMode(GX_CULL_ALL);
|
||||
GX_CopyDisp(frameBuffer[fb],GX_TRUE);
|
||||
GX_SetDispCopyGamma(GX_GM_1_0);
|
||||
|
||||
|
||||
// setup the vertex descriptor
|
||||
// tells the flipper to expect direct data
|
||||
GX_ClearVtxDesc();
|
||||
GX_SetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
GX_SetVtxDesc(GX_VA_NRM, GX_DIRECT);
|
||||
GX_SetVtxDesc(GX_VA_CLR0, GX_DIRECT);
|
||||
GX_SetVtxDesc(GX_VA_TEX0, GX_DIRECT);
|
||||
|
||||
|
||||
// setup the vertex attribute table
|
||||
// describes the data
|
||||
// args: vat location 0-7, type of data, data format, size, scale
|
||||
// so for ex. in the first call we are sending position data with
|
||||
// 3 values X,Y,Z of size F32. scale sets the number of fractional
|
||||
// bits for non float data.
|
||||
GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0); //vertex
|
||||
GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0); //normals
|
||||
GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGB8, 0); //color
|
||||
GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0); //texture
|
||||
|
||||
// setup texture coordinate generation
|
||||
// args: texcoord slot 0-7, matrix type, source to generate texture coordinates from, matrix to use
|
||||
GX_SetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY);
|
||||
|
||||
GX_SetNumChans(1); // <RedShade> GX_SetNumChans(1); = turn on 1 channel of lighting
|
||||
|
||||
GX_SetNumTexGens(1); //multitexturing so set to 1 for now
|
||||
GX_InvalidateTexAll(); //now be carefull as this clears all texture memory could get unpredicted results on second call
|
||||
|
||||
GX_SetTevOrder(GX_TEVSTAGE0, GX_TEXCOORDNULL, GX_TEXMAP_NULL, GX_COLOR0A0);
|
||||
GX_SetTevOp(GX_TEVSTAGE0, GX_PASSCLR);
|
||||
|
||||
}
|
||||
|
||||
int glutCreateWindow(const char *title) {
|
||||
GX_SetViewport(0,0,rmode->fbWidth,rmode->efbHeight,0,1);
|
||||
gluLookAt(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -1.0F, 0.0F, 1.0F, 0.0F); //setup opengl compat coord system
|
||||
return 0;
|
||||
}
|
||||
|
||||
void glutSwapBuffers(void) {
|
||||
fb ^= 1; // flip framebuffer //swapbuffers(DC);
|
||||
GX_SetZMode(depthtestenabled, depthfunction, depthtestenabled); //
|
||||
GX_SetColorUpdate(GX_TRUE); //
|
||||
GX_CopyDisp(frameBuffer[fb],GX_TRUE); //
|
||||
//
|
||||
VIDEO_SetNextFramebuffer(frameBuffer[fb]); //
|
||||
//
|
||||
VIDEO_Flush(); //
|
||||
//
|
||||
VIDEO_WaitVSync(); //
|
||||
}
|
||||
|
||||
void glutInitWindowSize(int width, int height) {
|
||||
GX_SetViewport(0,0,width,height,0,1);
|
||||
}
|
||||
|
||||
int glutGet(GLenum type) {
|
||||
int retval = 0;
|
||||
switch(type)
|
||||
{
|
||||
case GLUT_SCREEN_WIDTH: retval = rmode->viWidth; break;
|
||||
case GLUT_SCREEN_HEIGHT: retval = rmode->viHeight; break;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* shapes */
|
||||
static void
|
||||
drawBox(GLfloat size, GLenum type)
|
||||
{
|
||||
static GLfloat n[6][3] =
|
||||
{
|
||||
{-1.0, 0.0, 0.0},
|
||||
{0.0, 1.0, 0.0},
|
||||
{1.0, 0.0, 0.0},
|
||||
{0.0, -1.0, 0.0},
|
||||
{0.0, 0.0, 1.0},
|
||||
{0.0, 0.0, -1.0}
|
||||
};
|
||||
static GLint faces[6][4] =
|
||||
{
|
||||
{0, 1, 2, 3},
|
||||
{3, 2, 6, 7},
|
||||
{7, 6, 5, 4},
|
||||
{4, 5, 1, 0},
|
||||
{5, 6, 2, 1},
|
||||
{7, 4, 0, 3}
|
||||
};
|
||||
GLfloat v[8][3];
|
||||
GLint i;
|
||||
|
||||
v[0][0] = v[1][0] = v[2][0] = v[3][0] = -size / 2;
|
||||
v[4][0] = v[5][0] = v[6][0] = v[7][0] = size / 2;
|
||||
v[0][1] = v[1][1] = v[4][1] = v[5][1] = -size / 2;
|
||||
v[2][1] = v[3][1] = v[6][1] = v[7][1] = size / 2;
|
||||
v[0][2] = v[3][2] = v[4][2] = v[7][2] = -size / 2;
|
||||
v[1][2] = v[2][2] = v[5][2] = v[6][2] = size / 2;
|
||||
|
||||
for (i = 5; i >= 0; i--) {
|
||||
glBegin(type);
|
||||
glNormal3f(n[i][0],n[i][1],n[i][2]);
|
||||
glVertex3f(v[faces[i][0]][0],v[faces[i][0]][1],v[faces[i][0]][2]);
|
||||
glVertex3f(v[faces[i][1]][0],v[faces[i][1]][1],v[faces[i][1]][2]);
|
||||
glVertex3f(v[faces[i][2]][0],v[faces[i][2]][1],v[faces[i][2]][2]);
|
||||
glVertex3f(v[faces[i][3]][0],v[faces[i][3]][1],v[faces[i][3]][2]);
|
||||
glEnd();
|
||||
}
|
||||
}
|
||||
|
||||
void glutWireCube(GLdouble size)
|
||||
{
|
||||
drawBox(size, GL_LINE_LOOP);
|
||||
}
|
||||
|
||||
void glutSolidCube(GLdouble size)
|
||||
{
|
||||
drawBox(size, GL_QUADS);
|
||||
}
|
||||
|
||||
void (*displayfunc)(void);
|
||||
|
||||
void glutDisplayFunc(void (*func)(void)){
|
||||
displayfunc = func;
|
||||
}
|
||||
|
||||
void (*idlefunc)(void);
|
||||
|
||||
void glutIdleFunc(void (*func)(void)){
|
||||
idlefunc = func;
|
||||
}
|
||||
|
||||
void glutMainLoop(void){
|
||||
|
||||
displayfunc();
|
||||
while(1) {
|
||||
idlefunc();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue