forked from mirrors/principia
Building with CMake on Windows is mostly complete now
This commit is contained in:
parent
789b709097
commit
9a333119c5
20 changed files with 80 additions and 39607 deletions
12
.gitattributes
vendored
12
.gitattributes
vendored
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
# Exclude vendored libraries from GitHub language detection
|
||||
src/lua linguist-vendored
|
||||
src/luasocket linguist-vendored
|
||||
src/SDL_image linguist-vendored
|
||||
src/SDL_mixer linguist-vendored
|
||||
src/SDL_ttf linguist-vendored
|
||||
src/SDL-mobile linguist-vendored
|
||||
src/lua/* linguist-vendored
|
||||
src/luasocket/* linguist-vendored
|
||||
src/SDL_image/* linguist-vendored
|
||||
src/SDL_mixer/* linguist-vendored
|
||||
src/SDL_ttf/* linguist-vendored
|
||||
src/SDL-mobile/* linguist-vendored
|
||||
|
|
|
|||
|
|
@ -79,15 +79,32 @@ if(NOT SCREENSHOT_BUILD)
|
|||
find_package(CURL REQUIRED)
|
||||
find_package(GLEW REQUIRED)
|
||||
|
||||
# Luasocket
|
||||
SET(LUASOCKET_FLAGS "-DBUILD_LUASOCKET -DLUASOCKET_INET_PTON")
|
||||
|
||||
include_directories(
|
||||
src/luasocket/
|
||||
${CURL_INCLUDE_DIR}
|
||||
${GLEW_INCLUDE_DIRS}
|
||||
${GTK3_INCLUDE_DIRS})
|
||||
|
||||
if(WIN32) # TODO: Fix Luasocket building on Windows
|
||||
set(USE_LUASOCKET false)
|
||||
else()
|
||||
option(USE_LUASOCKET "Build with Luasocket support" TRUE)
|
||||
endif()
|
||||
else()
|
||||
set(USE_LUASOCKET false)
|
||||
endif()
|
||||
|
||||
# Luasocket
|
||||
if(USE_LUASOCKET)
|
||||
set(LUASOCKET_FLAGS "-DBUILD_LUASOCKET")
|
||||
|
||||
if(WIN32)
|
||||
set(LUAROCKS_PLAT_SRC src/luasocket/wsocket.c)
|
||||
else()
|
||||
set(LUASOCKET_FLAGS "${LUASOCKET_FLAGS} -DLUASOCKET_INET_PTON")
|
||||
set(LUAROCKS_PLAT_SRC
|
||||
src/luasocket/usocket.c
|
||||
src/luasocket/unix.c)
|
||||
endif()
|
||||
set(SRCS ${SRCS}
|
||||
src/luasocket/auxiliar.c
|
||||
src/luasocket/buffer.c
|
||||
|
|
@ -100,9 +117,7 @@ if(NOT SCREENSHOT_BUILD)
|
|||
src/luasocket/select.c
|
||||
src/luasocket/tcp.c
|
||||
src/luasocket/timeout.c
|
||||
src/luasocket/udp.c
|
||||
src/luasocket/usocket.c
|
||||
src/luasocket/unix.c)
|
||||
src/luasocket/udp.c)
|
||||
endif()
|
||||
|
||||
include_directories(src/tms/backends/${TMS_BACKEND}/)
|
||||
|
|
@ -110,6 +125,22 @@ include_directories(src/tms/backends/${TMS_BACKEND}/)
|
|||
set(SRCS ${SRCS}
|
||||
src/tms/backends/${TMS_BACKEND}/main.cc)
|
||||
|
||||
if(WIN32)
|
||||
set(WINRESOURCE_FILE "packaging/principia.rc")
|
||||
set(WINMANIFEST_FILE "packaging/principia.manifest")
|
||||
|
||||
if(NOT CMAKE_RC_COMPILER)
|
||||
set(CMAKE_RC_COMPILER "windres.exe")
|
||||
endif()
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/winresource.o
|
||||
COMMAND ${CMAKE_RC_COMPILER} -I${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_CURRENT_BINARY_DIR}
|
||||
-i${WINRESOURCE_FILE}
|
||||
-o ${CMAKE_CURRENT_BINARY_DIR}/winresource.o
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
DEPENDS ${WINRESOURCE_FILE} ${WINMANIFEST_FILE})
|
||||
SET(SRCS ${SRCS} ${CMAKE_CURRENT_BINARY_DIR}/winresource.o)
|
||||
endif()
|
||||
|
||||
add_executable(${PROJECT_NAME} ${SRCS})
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
|
|
@ -131,10 +162,12 @@ if(NOT SCREENSHOT_BUILD)
|
|||
${GTK3_LIBRARIES})
|
||||
endif()
|
||||
|
||||
set(COMMON_FLAGS "${LUASOCKET_FLAGS} -DGL_GLEXT_PROTOTYPES -DTMS_BACKEND_PC -DTMS_FAST_MATH -DLUA_COMPAT_MODULE -D__STDC_FORMAT_MACROS=1")
|
||||
set(COMMON_FLAGS "${LUASOCKET_FLAGS} -DGL_GLEXT_PROTOTYPES -DTMS_BACKEND_PC -DTMS_FAST_MATH -DLUA_COMPAT_MODULE -D__STDC_FORMAT_MACROS=1 -DUNICODE")
|
||||
|
||||
if(WIN32)
|
||||
set(COMMON_FLAGS "${COMMON_FLAGS} -DTMS_BACKEND_WINDOWS")
|
||||
target_link_libraries(${PROJECT_NAME} ws2_32.lib version.lib shlwapi.lib winmm.lib)
|
||||
|
||||
set(COMMON_FLAGS "${COMMON_FLAGS} -DTMS_BACKEND_WINDOWS -D_WIN32_WINNT=0x0501 -mwindows -Dsrandom=srand -Drandom=rand")
|
||||
else()
|
||||
if(SCREENSHOT_BUILD)
|
||||
set(COMMON_FLAGS "${COMMON_FLAGS} -DNO_UI -DTMS_BACKEND_LINUX_SS")
|
||||
|
|
|
|||
16
README.md
16
README.md
|
|
@ -51,24 +51,24 @@ pacman -Syu
|
|||
The terminal will then ask you to close it when done. Proceed with doing so, and then go to the start menu and run MSYS Mingw32 64-bit. It is important that you run the "MINGW64 64-Bit" version and not the "MSYS2 MSYS" or "MINGW64 32-Bit". Run the commands below to install the necessary dependencies.
|
||||
|
||||
```bash
|
||||
pacman -S base-devel autotools mingw-w64-x86_64-{toolchain,curl,gtk3,gtksourceview4,libpng,libjpeg-turbo,freetype,SDL2,SDL2_image,SDL2_mixer,SDL2_ttf}
|
||||
pacman -S base-devel mingw-w64-x86_64-{toolchain,cmake,ninja,curl,gtk3,glew,gtksourceview4,libpng,libjpeg-turbo,freetype,SDL2,SDL2_image,SDL2_mixer,SDL2_ttf}
|
||||
```
|
||||
|
||||
Then navigate to the `build-windows` folder inside of where you cloned Principia, for example:
|
||||
Then navigate to the folder where you cloned Principia, for example:
|
||||
|
||||
```bash
|
||||
cd /c/Users/<username>/Documents/Principia/build-windows
|
||||
cd /c/Users/<username>/Documents/Principia
|
||||
```
|
||||
|
||||
And start the building process:
|
||||
|
||||
```bash
|
||||
./autogen.sh
|
||||
./configure
|
||||
./go
|
||||
mkdir build; cd build
|
||||
cmake .. -G Ninja
|
||||
ninja
|
||||
```
|
||||
|
||||
Principia will launch if the compilation was successful. Keep in mind that the built executable can only be run inside of the MINGW terminal, to make a release build see below to build the installer:
|
||||
When finished there will be a `principia.exe` file in the build folder. Keep in mind that the built executable can only be run inside of the MINGW terminal, to make a release build see below to build the installer:
|
||||
|
||||
#### Windows installer
|
||||
The Windows installer uses NSIS, which must be installed first before building:
|
||||
|
|
@ -77,7 +77,7 @@ The Windows installer uses NSIS, which must be installed first before building:
|
|||
pacman -S mingw-w64-x86_64-nsis
|
||||
```
|
||||
|
||||
For making Windows release builds you would run the `make_release.sh` script, which will bundle necessary DLLs and other files to make the game run, and builds the installer.
|
||||
For making Windows release builds you would run the `packaging/windows_release.sh` script, which will bundle necessary DLLs and other files to make the game run, and builds the installer.
|
||||
|
||||
### Linux
|
||||
If you just want to play Principia on Linux, there are packages available for Arch-based and Debian-based distros as well as NixOS. See the [principia-web downloads page](https://principia-web.se/download) for more info.
|
||||
|
|
|
|||
|
|
@ -11,16 +11,15 @@ GLOBAL_FLAGS := -DGL_GLEXT_PROTOTYPES \
|
|||
-DUNICODE \
|
||||
-DTMS_FAST_MATH \
|
||||
-DTMS_BACKEND_WINDOWS \
|
||||
-DTMS_BACKEND_PC
|
||||
-DTMS_BACKEND_PC -DBUILD_LUASOCKET
|
||||
|
||||
TMS_PATH = ../src/tms
|
||||
ROOT = ../
|
||||
|
||||
GLOBAL_FLAGS += -I../src/tms/backends/windows/ \
|
||||
-I../src/src/ -I../src/ -I/usr/include/ \
|
||||
-I../src/src/ -I../src/ \
|
||||
-mwindows -Dsrandom=srand -Drandom=rand -Dmain=SDL_main \
|
||||
-static-libgcc -static-libstdc++ \
|
||||
-DGLEW_STATIC \
|
||||
-I/mingw64/include/ \
|
||||
-I/mingw64/include/freetype2 \
|
||||
-I/mingw64/include/SDL2/ \
|
||||
|
|
@ -37,8 +36,7 @@ GLOBAL_FLAGS += -I../src/tms/backends/windows/ \
|
|||
-I/mingw64/include/gdk-pixbuf-2.0 \
|
||||
-I/mingw64/include/webp \
|
||||
-I/mingw64/include/atk-1.0 \
|
||||
-I../src/lua/ -I../src/include/ \
|
||||
-DLIBDEFLATE_DLL
|
||||
-I../src/lua/
|
||||
|
||||
principia_CFLAGS = ${GLOBAL_FLAGS} -std=gnu99
|
||||
|
||||
|
|
@ -48,7 +46,7 @@ principia_LDADD = -L`pwd` -lopengl32 -lz \
|
|||
-lmingw32 -lws2_32 -lwinmm -luuid -loleaut32 -limm32 -lversion \
|
||||
-lole32 -luser32 \
|
||||
-lgtk-3 -lgdk-3 -lz -lgdi32 -limm32 -lshell32 -lole32 -luuid -lwinmm -ldwmapi -lsetupapi -lcfgmgr32 -lhid -lwinspool -lcomctl32 -lcomdlg32 -lpangowin32-1.0 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl \
|
||||
-lcurl -lShlwapi -lpng -ljpeg -lfreetype -lSDL2 -lSDL2_image -lSDL2_mixer -lSDL2_ttf
|
||||
-lcurl -lShlwapi -lpng -ljpeg -lfreetype -lSDL2 -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lglew32
|
||||
|
||||
principia_SOURCES = \
|
||||
principia.rc \
|
||||
|
|
@ -131,7 +129,6 @@ principia.rc \
|
|||
../src/tms/util/hash.c \
|
||||
\
|
||||
../src/tms/backends/windows/main.cc \
|
||||
../src/GLEW/glew.c \
|
||||
../src/tms/bindings/cpp/cpp.cc \
|
||||
../src/tms/modules/3ds.c \
|
||||
\
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
|
|
@ -1,6 +1,6 @@
|
|||
!include "MUI2.nsh"
|
||||
|
||||
!define MUI_ICON "icon.ico"
|
||||
!define MUI_ICON "..\packaging\icon.ico"
|
||||
!define /ifndef VER_MAJOR 1
|
||||
!define /ifndef VER_MINOR 5
|
||||
!define /ifndef VER_BUILD 2
|
||||
|
|
@ -32,8 +32,8 @@ FunctionEnd
|
|||
!define MUI_ABORTWARNING
|
||||
!define MUI_UNABORTWARNING
|
||||
|
||||
!define MUI_WELCOMEFINISHPAGE_BITMAP "installer\welcome.bmp"
|
||||
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "installer\unwelcome.bmp"
|
||||
!define MUI_WELCOMEFINISHPAGE_BITMAP "..\packaging\installer\welcome.bmp"
|
||||
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "..\packaging\installer\unwelcome.bmp"
|
||||
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR/principia.exe"
|
||||
!define MUI_FINISHPAGE_RUN_TEXT "Run Principia"
|
||||
|
|
@ -20,6 +20,9 @@ cp /mingw64/$SCHEMAS_DIR/{gschema.dtd,gschemas.compiled} $SCHEMAS_DIR/
|
|||
|
||||
cd ..
|
||||
|
||||
./mingw-bundledlls release/principia.exe --copy
|
||||
../packaging/mingw-bundledlls release/principia.exe --copy
|
||||
|
||||
cp ../packaging/principia_install.nsi .
|
||||
cp -r ../packaging/installer/ .
|
||||
|
||||
makensis principia_install
|
||||
18062
src/GL/glew.h
18062
src/GL/glew.h
File diff suppressed because it is too large
Load diff
289
src/GL/glu.h
289
src/GL/glu.h
|
|
@ -1,289 +0,0 @@
|
|||
/*
|
||||
** 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__
|
||||
#define _GLU_H
|
||||
#if __GNUC__ >= 3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#include <stddef.h> /* for wchar_t */
|
||||
#include <GL/gl.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
/* Boolean */
|
||||
#define GLU_FALSE 0
|
||||
#define GLU_TRUE 1
|
||||
|
||||
/* Version */
|
||||
#define GLU_VERSION_1_1 1
|
||||
#define GLU_VERSION_1_2 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_INVALID_OPERATION 100904
|
||||
|
||||
/* NurbsDisplay */
|
||||
/* GLU_FILL */
|
||||
#define GLU_OUTLINE_POLYGON 100240
|
||||
#define GLU_OUTLINE_PATCH 100241
|
||||
|
||||
/* 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
|
||||
|
||||
/* NurbsSampling */
|
||||
#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 */
|
||||
#define GLU_ERROR 100103
|
||||
|
||||
/* 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
|
||||
|
||||
/* Obsolete. For compatibility with previous Sun OpenGL versions */
|
||||
#define GLU_INCOMPATIBLE_GL_VERSION 100903
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
|
||||
#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 (APIENTRY *_GLUfuncptr)();
|
||||
|
||||
GLAPI void APIENTRY gluBeginCurve (GLUnurbs* nurb);
|
||||
GLAPI void APIENTRY gluBeginPolygon (GLUtesselator* tess);
|
||||
GLAPI void APIENTRY gluBeginSurface (GLUnurbs* nurb);
|
||||
GLAPI void APIENTRY gluBeginTrim (GLUnurbs* nurb);
|
||||
GLAPI GLint APIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
|
||||
GLAPI GLint APIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
|
||||
GLAPI void APIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
|
||||
GLAPI void APIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
|
||||
GLAPI void APIENTRY gluDeleteQuadric (GLUquadric* quad);
|
||||
GLAPI void APIENTRY gluDeleteTess (GLUtesselator* tess);
|
||||
GLAPI void APIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
|
||||
GLAPI void APIENTRY gluEndCurve (GLUnurbs* nurb);
|
||||
GLAPI void APIENTRY gluEndPolygon (GLUtesselator* tess);
|
||||
GLAPI void APIENTRY gluEndSurface (GLUnurbs* nurb);
|
||||
GLAPI void APIENTRY gluEndTrim (GLUnurbs* nurb);
|
||||
GLAPI const GLubyte * APIENTRY gluErrorString (GLenum error);
|
||||
GLAPI const wchar_t * APIENTRY gluErrorUnicodeStringEXT (GLenum error);
|
||||
GLAPI void APIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
|
||||
GLAPI const GLubyte * APIENTRY gluGetString (GLenum name);
|
||||
GLAPI void APIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
|
||||
GLAPI void APIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
|
||||
GLAPI void APIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
|
||||
GLAPI GLUnurbs* APIENTRY gluNewNurbsRenderer (void);
|
||||
GLAPI GLUquadric* APIENTRY gluNewQuadric (void);
|
||||
GLAPI GLUtesselator* APIENTRY gluNewTess (void);
|
||||
GLAPI void APIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
|
||||
GLAPI void APIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
|
||||
GLAPI void APIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
|
||||
GLAPI void APIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
|
||||
GLAPI void APIENTRY 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 APIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
|
||||
GLAPI void APIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
|
||||
GLAPI void APIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
|
||||
GLAPI void APIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
|
||||
GLAPI GLint APIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ);
|
||||
GLAPI void APIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
|
||||
GLAPI void APIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
|
||||
GLAPI void APIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
|
||||
GLAPI void APIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
|
||||
GLAPI void APIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
|
||||
GLAPI void APIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
|
||||
GLAPI GLint APIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
|
||||
GLAPI void APIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
|
||||
GLAPI void APIENTRY gluTessBeginContour (GLUtesselator* tess);
|
||||
GLAPI void APIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
|
||||
GLAPI void APIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
|
||||
GLAPI void APIENTRY gluTessEndContour (GLUtesselator* tess);
|
||||
GLAPI void APIENTRY gluTessEndPolygon (GLUtesselator* tess);
|
||||
GLAPI void APIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
|
||||
GLAPI void APIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
|
||||
GLAPI void APIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
|
||||
GLAPI GLint APIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);
|
||||
GLAPI GLint APIENTRY 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 UNICODE
|
||||
#define gluErrorStringWIN gluErrorUnicodeStringEXT
|
||||
#else
|
||||
#define gluErrorStringWIN gluErrorString
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __glu_h__ */
|
||||
1669
src/GL/glxew.h
1669
src/GL/glxew.h
File diff suppressed because it is too large
Load diff
1419
src/GL/wglew.h
1419
src/GL/wglew.h
File diff suppressed because it is too large
Load diff
18123
src/GLEW/glew.c
18123
src/GLEW/glew.c
File diff suppressed because it is too large
Load diff
|
|
@ -41,11 +41,6 @@
|
|||
|
||||
typedef std::vector<struct escript_sprite>::iterator sprite_iterator;
|
||||
|
||||
// TODO: remove this once CMake is the only build system on linux and windows
|
||||
#if defined(TMS_BACKEND_WINDOWS) || defined(TMS_BACKEND_LINUX)
|
||||
#define BUILD_LUASOCKET
|
||||
#endif
|
||||
|
||||
extern "C" {
|
||||
#include "lua.h"
|
||||
#include "lstate.h"
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@
|
|||
|
||||
//#define GL3_PROTOTYPES
|
||||
|
||||
#include "GL/glew.h"
|
||||
#include "GL/wglew.h"
|
||||
#include <windows.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/wglew.h>
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -10,10 +10,7 @@
|
|||
|
||||
#include "SDL_image.h"
|
||||
|
||||
#ifdef TMS_BACKEND_WINDOWS
|
||||
#include <Winsock2.h> // FIXME: move this to an appropriate position..
|
||||
#endif
|
||||
|
||||
#ifdef TMS_BACKEND_ANDROID
|
||||
#include <tms/util/packme.h>
|
||||
struct etc1_header {
|
||||
char tag[6];
|
||||
|
|
@ -24,7 +21,9 @@ struct etc1_header {
|
|||
uint16_t original_height;
|
||||
} PACKED;
|
||||
#include <tms/util/unpackme.h>
|
||||
#endif
|
||||
|
||||
#ifdef TMS_BACKEND_IOS
|
||||
#include <tms/util/packme.h>
|
||||
struct pvrtc_header {
|
||||
uint32_t header_length;
|
||||
|
|
@ -42,6 +41,7 @@ struct pvrtc_header {
|
|||
uint32_t numsurfs;
|
||||
} PACKED;
|
||||
#include <tms/util/unpackme.h>
|
||||
#endif
|
||||
|
||||
struct tms_texture*
|
||||
tms_texture_alloc(void)
|
||||
|
|
@ -165,6 +165,7 @@ int tms_texture_free_buffer(struct tms_texture *tex)
|
|||
int
|
||||
tms_texture_load_pvrtc_4bpp(struct tms_texture *tex, const char *filename)
|
||||
{
|
||||
#ifdef TMS_BACKEND_IOS
|
||||
SDL_RWops *rw = SDL_RWFromFile(filename, "rb");
|
||||
|
||||
tms_infof("Load PVRTC 4BPP: %s", filename);
|
||||
|
|
@ -203,6 +204,8 @@ tms_texture_load_pvrtc_4bpp(struct tms_texture *tex, const char *filename)
|
|||
} else
|
||||
tms_errorf("Unable to open texture: '%s'", SDL_GetError());
|
||||
|
||||
#endif
|
||||
|
||||
return T_COULD_NOT_OPEN;
|
||||
}
|
||||
|
||||
|
|
@ -213,6 +216,7 @@ int
|
|||
tms_texture_load_etc1(struct tms_texture *tex,
|
||||
const char *filename)
|
||||
{
|
||||
#ifdef TMS_BACKEND_ANDROID
|
||||
SDL_RWops *rw = SDL_RWFromFile(filename,"rb");
|
||||
|
||||
tms_infof("Load ETC1: %s", filename);
|
||||
|
|
@ -249,6 +253,8 @@ tms_texture_load_etc1(struct tms_texture *tex,
|
|||
} else
|
||||
tms_errorf("Unable to open texture: '%s'", SDL_GetError());
|
||||
|
||||
#endif
|
||||
|
||||
return T_COULD_NOT_OPEN;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue