Merge branch 'master' into dijkstra-test

This commit is contained in:
hiker 2016-07-21 09:18:07 +10:00
commit 2cfe99827f
271 changed files with 15931 additions and 4893 deletions

View File

@ -10,6 +10,7 @@
* Scripting work under the hood
* Work on the track editor by mhp
* Tweak to challenges
* New farm track song by 0zone0ne and Krobonil
* Bugfixes
## SuperTuxKart 0.9.1

View File

@ -20,6 +20,10 @@ option(CHECK_ASSETS "Check if assets are installed in ../stk-assets" ON)
option(USE_SYSTEM_ANGELSCRIPT "Use system angelscript instead of built-in angelscript. If you enable this option, make sure to use a compatible version." OFF)
option(ENABLE_NETWORK_MULTIPLAYER "Enable network multiplayer. This will replace the online profile GUI in the main menu with the network multiplayer GUI" OFF)
if (UNIX AND NOT APPLE)
option(USE_GLES2 "Use OpenGL ES2 renderer" OFF)
endif()
if(MSVC AND (MSVC_VERSION LESS 1900))
# Normally hide the option to build wiiuse on VS, since it depends
# on the installation of the Windows DDK (Driver Developer Kit),
@ -39,6 +43,7 @@ endif()
if(UNIX AND NOT APPLE)
option(USE_XRANDR "Use xrandr instead of vidmode" ON)
option(USE_ASAN "Build with Leak/Address sanitizer" OFF)
option(USE_LIBBFD "Use libbfd for crash reporting and leak check" OFF)
endif()
set(STK_SOURCE_DIR "src")
@ -59,6 +64,10 @@ if(WIN32)
add_definitions(-D_IRR_STATIC_LIB_)
endif()
if(USE_GLES2)
add_definitions(-DUSE_GLES2)
endif()
# Build the Bullet physics library
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/bullet")
include_directories("${PROJECT_SOURCE_DIR}/lib/bullet/src")
@ -68,8 +77,11 @@ add_subdirectory("${PROJECT_SOURCE_DIR}/lib/enet")
include_directories("${PROJECT_SOURCE_DIR}/lib/enet/include")
# Build glew library
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/glew")
include_directories("${PROJECT_SOURCE_DIR}/lib/glew/include")
if(NOT USE_GLES2)
add_definitions(-DGLEW_NO_GLU)
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/glew")
include_directories("${PROJECT_SOURCE_DIR}/lib/glew/include")
endif()
if((WIN32 AND NOT MINGW) OR APPLE)
if (NOT APPLE)
@ -194,8 +206,10 @@ if (OPENMP_FOUND)
endif()
# OpenGL
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
if(NOT USE_GLES2)
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
endif()
if(UNIX AND NOT APPLE)
find_package(X11 REQUIRED)
@ -210,6 +224,17 @@ if(UNIX AND NOT APPLE)
find_library(IRRLICHT_XF86VM_LIBRARY Xxf86vm)
mark_as_advanced(IRRLICHT_XF86VM_LIBRARY)
endif()
if(USE_LIBBFD)
find_package(Libbfd)
if(LIBBFD_FOUND)
add_definitions(-DENABLE_LIBBFD)
include_directories(${LIBBFD_INCLUDE_DIRS})
else()
set(USE_LIBBFD OFF CACHE BOOL "Use libbfd for crash reporting and leak check" FORCE)
message(WARNING "Libbfd not found, disable integrated stack trace.")
endif()
endif()
endif()
# Set some compiler options
@ -342,16 +367,20 @@ target_link_libraries(supertuxkart
bulletcollision
bulletmath
enet
glew
stkirrlicht
${Angelscript_LIBRARIES}
${CURL_LIBRARIES}
${OGGVORBIS_LIBRARIES}
${OPENAL_LIBRARY}
${OPENGL_LIBRARIES}
${FREETYPE_LIBRARIES}
)
if(NOT USE_GLES2)
target_link_libraries(supertuxkart ${OPENGL_LIBRARIES} glew)
else()
target_link_libraries(supertuxkart EGL GLESv2)
endif()
if(UNIX AND NOT APPLE)
target_link_libraries(supertuxkart ${X11_LIBRARIES})
if(USE_XRANDR)
@ -359,12 +388,20 @@ if(UNIX AND NOT APPLE)
else()
target_link_libraries(supertuxkart ${IRRLICHT_XF86VM_LIBRARY})
endif()
if(USE_LIBBFD)
target_link_libraries(supertuxkart ${LIBBFD_LIBRARIES})
endif()
if(USE_ASAN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
target_link_libraries(supertuxkart "-fsanitize=address")
endif()
endif()
# FreeBSD does not search in /usr/local/lib, but at least Freetype is installed there :(
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib")
endif()
if(APPLE)
# In theory it would be cleaner to let CMake detect the right dependencies. In practice, this means that if a OSX user has
# unix-style installs of Vorbis/Ogg/OpenAL/etc. they will be picked up over our frameworks. This is blocking when I make releases :

View File

@ -6,7 +6,7 @@ the game assets from Sourceforge using SVN.
`svn checkout https://svn.code.sf.net/p/supertuxkart/code/stk-assets stk-assets`
Place the `stk-assets` folder next to the source root `stk-code` folder.
See <http://supertuxkart.sourceforge.net/Source_control> for more information
See <https://supertuxkart.net/Source_control> for more information
## Building STK on Linux
@ -75,8 +75,8 @@ location, specify `CMAKE_INSTALL_PREFIX` when running cmake, e.g.:
## Building STK on OS X
See <http://supertuxkart.sourceforge.net/Building_and_packaging_on_OSX>
See <https://supertuxkart.net/Building_and_packaging_on_OSX>
## Building STK on Windows
See <http://supertuxkart.sourceforge.net/How_to_build_the_Windows_version>
See <https://supertuxkart.net/How_to_build_the_Windows_version>

View File

@ -3,9 +3,9 @@
SuperTuxKart is a free kart racing game. It focuses on fun and not on realistic kart physics. Instructions can be found on the in-game help page.
The SuperTuxKart homepage can be found at: <http://supertuxkart.sourceforge.net>
The SuperTuxKart homepage can be found at: <https://supertuxkart.net/>
The official SuperTuxKart forum is at <http://supertuxkart.sourceforge.net/forum>. If you need support, this would be the best place to start.
The official SuperTuxKart forum is at <http://forum.freegamedev.net/viewforum.php?f=16>. If you need support, this would be the best place to start.
Hope you enjoy the game.
@ -22,7 +22,7 @@ Hope you enjoy the game.
### Windows
1. Install VS 2013 (or later). The free express versions work fine.
2. Download and install a source package - either a released package or from our [git/svn repositories](http://supertuxkart.sourceforge.net/Source_control).
2. Download and install a source package - either a released package or from our [git/svn repositories](https://supertuxkart.net/Source_control).
3. Download the latest dependency package from [here](https://sourceforge.net/projects/supertuxkart/files/SuperTuxKart%20Dependencies/Windows/). Unzip it in the root directory, so that the dependencies directory is next to the src and data directories (if you are updating from a previous dependency package, you can delete the .dll files in the root directory, they are not needed anymore).
4. Download cmake and install it. Then start cmake-gui and select the STK root directory as 'Where is the source code', and a new directory in the root directory (next to src, data etc) as the build directory (for now I assume that this directory is called bld).
5. Click on configure. You will be asked to create the directory (yes), then for your VS version. Make sure you select the right version (be aware of the easy to confuse version numbers: VS 2013 = version 12). Click on configure, then generate. This will create the directory 'bld', and a VS solution in that directory.
@ -30,10 +30,12 @@ Hope you enjoy the game.
7. Right click on the supertuxkart project in the solution explorer, and select "Set as StartUp Project".
8. Select Build->Build Solution (or press F7) to compile.
See <https://supertuxkart.net/How_to_build_the_Windows_version> for more information.
Compilation with cygwin is not officially supported, but this has been done (check with the forum for details).
### Mac OS X
The latest information about compilation on Mac are on our wiki: <http://supertuxkart.sourceforge.net/Building_and_packaging_on_OSX>
The latest information about compilation on Mac are at our site: <https://supertuxkart.net/Building_and_packaging_on_OSX>
### UNIX
See [`INSTALL.md`](INSTALL.md) for details.

31
TODO.md
View File

@ -4,30 +4,27 @@ SuperTuxKart is looking for additional man power to make this
one of the best free linux games out there :) We need (in
no particular order):
1. Musicians/sound engineers
- Create additional background soundtrack
- Musicians/sound engineers
- Create additional background soundtracks
- Create sound effects
2. Artists and track designer
- Artists and track designer
- Create additional tracks
- Create additional art work for tracks,
background images
3. Developers
- Create additional artwork for tracks and background images
- Developers
- Work on network play support
- Check our bug and enhancement request tracker on
https://github.com/supertuxkart/stk-code/issues
- Extend the current web page, keep it up to date
4. Tester
- For just about everything
- Esp. different platforms and graphics cards
5. Writers
- Write documentation, ranging from man page, to
a description for the web, to a design document, ...
- Extend the current web page and keep it up to date
- Testers
- For just about everything, especially different platforms and graphics cards
- Writers
- Write documentation, ranging from man page, to a description for the web, to a design document, etc...
If you want to help the SuperTuxKart - Project, please
contact us on the email list: [supertuxkart-devel@lists.sourceforge.net](mailto:supertuxkart-devel@lists.sourceforge.net)
If you want to help the SuperTuxKart Project, please contact us on the email list: [supertuxkart-devel@lists.sourceforge.net](mailto:supertuxkart-devel@lists.sourceforge.net)
Thanks in advance!
-- The SuperTuxKart-Team
-- The SuperTuxKart Team
For details, see <http://supertuxkart.sourceforge.net/Get_involved>
For details, see <http://supertuxkart.net/Community>

89
cmake/FindLibbfd.cmake Normal file
View File

@ -0,0 +1,89 @@
# - Try to find libbfd
# Once done this will define
#
# LIBBFD_FOUND - system has libbfd
# LIBBFD_INCLUDE_DIRS - the libbfd include directory
# LIBBFD_LIBRARIES - Link these to use libbfd
# LIBBFD_DEFINITIONS - Compiler switches required for using libbfd
#
# Based on:
#
# Copyright (c) 2008 Bernhard Walle <bernhard.walle@gmx.de>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
if (LIBBFD_LIBRARIES AND LIBBFD_INCLUDE_DIRS)
set (LIBBFD_FIND_QUIETLY TRUE)
endif ()
find_path (LIBBFD_INCLUDE_DIRS
NAMES
bfd.h
dis-asm.h
PATHS
/usr/include
/usr/local/include
/opt/local/include
/opt/include
ENV CPATH)
# Ugly, yes ugly...
find_library (LIBBFD_BFD_LIBRARY
NAMES
bfd
PATHS
/usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/usr/include
/opt/local/lib
/opt/usr/lib64
ENV LIBRARY_PATH
ENV LD_LIBRARY_PATH)
#find_library (LIBBFD_IBERTY_LIBRARY
# NAMES
# iberty
# PATHS
# /usr/lib
# /usr/lib64
# /usr/local/lib
# /usr/local/lib64
# /usr/include
# /opt/local/lib
# /opt/usr/lib64
# ENV LIBRARY_PATH
# ENV LD_LIBRARY_PATH)
#find_library (LIBBFD_OPCODES_LIBRARY
# NAMES
# opcodes
# PATHS
# /usr/lib
# /usr/lib64
# /usr/local/lib
# /usr/local/lib64
# /usr/include
# /opt/local/lib
# /opt/usr/lib64
# ENV LIBRARY_PATH
# ENV LD_LIBRARY_PATH)
include (FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBBFD_FOUND to TRUE if all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBBFD DEFAULT_MSG
LIBBFD_BFD_LIBRARY
# LIBBFD_IBERTY_LIBRARY
# LIBBFD_OPCODES_LIBRARY
LIBBFD_INCLUDE_DIRS)
set(LIBBFD_LIBRARIES "${LIBBFD_BFD_LIBRARY}")
mark_as_advanced(LIBBFD_INCLUDE_DIRS LIBBFD_LIBRARIES LIBBFD_BFD_LIBRARY)

View File

@ -26,5 +26,6 @@
1.32.20 -->
<card contains="Radeon" os="linux" version="<14.300" disable="DriverRecentEnough"/>
<card contains="Radeon" os="windows" version="<14.300" disable="DriverRecentEnough"/>
<card contains="ATI" os="windows" version="<14.300" disable="DriverRecentEnough"/>
</graphical-restrictions>

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: supertuxkart\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-04-23 09:00-0400\n"
"POT-Creation-Date: 2016-05-30 18:52-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -196,7 +196,7 @@ msgstr ""
#: src/states_screens/arenas_screen.cpp:83
#: src/states_screens/easter_egg_screen.cpp:145
#: src/states_screens/grand_prix_editor_screen.cpp:327
#: src/states_screens/kart_selection.cpp:287
#: src/states_screens/kart_selection.cpp:286
#: src/states_screens/tracks_and_gp_screen.cpp:148
msgid "Add-Ons"
msgstr ""
@ -216,7 +216,7 @@ msgstr ""
#: src/states_screens/edit_track_screen.cpp:147
#: src/states_screens/gp_info_screen.cpp:76
#: src/states_screens/grand_prix_editor_screen.cpp:324
#: src/states_screens/kart_selection.cpp:279
#: src/states_screens/kart_selection.cpp:278
#: src/states_screens/options_screen_video.cpp:389
#: src/states_screens/tracks_and_gp_screen.cpp:138
#: src/states_screens/tracks_screen.cpp:142
@ -453,7 +453,7 @@ msgstr ""
#. I18N: In soccer setup screen
#. I18N: ./data/gui/tutorial_message_dialog.stkgui
#. I18N: Button in tutorial
#: src/states_screens/race_result_gui.cpp:203
#: src/states_screens/race_result_gui.cpp:205
msgid "Continue"
msgstr ""
@ -795,7 +795,7 @@ msgstr ""
#. I18N: In the user screen
#. I18N: ./data/gui/user_screen_tab.stkgui
#. I18N: In the user screen
#: src/states_screens/main_menu_screen.cpp:77
#: src/states_screens/main_menu_screen.cpp:78
#: src/states_screens/online_profile_friends.cpp:222
msgid "Online"
msgstr ""
@ -933,7 +933,7 @@ msgstr ""
#. I18N: Difficulty
#. I18N: ./data/gui/select_challenge.stkgui
#. I18N: Difficulty
#: src/race/race_manager.hpp:542
#: src/race/race_manager.hpp:544
#: src/states_screens/ghost_replay_selection.cpp:120
msgid "Novice"
msgstr ""
@ -944,7 +944,7 @@ msgstr ""
#. I18N: Difficulty
#. I18N: ./data/gui/select_challenge.stkgui
#. I18N: Difficulty
#: src/race/race_manager.hpp:543
#: src/race/race_manager.hpp:545
#: src/states_screens/ghost_replay_selection.cpp:120
msgid "Intermediate"
msgstr ""
@ -955,7 +955,7 @@ msgstr ""
#. I18N: Difficulty
#. I18N: ./data/gui/select_challenge.stkgui
#. I18N: Difficulty
#: src/race/race_manager.hpp:544
#: src/race/race_manager.hpp:546
#: src/states_screens/ghost_replay_selection.cpp:119
msgid "Expert"
msgstr ""
@ -964,7 +964,7 @@ msgstr ""
#. I18N: Difficulty
#. I18N: ./data/gui/race_setup.stkgui
#. I18N: Difficulty
#: src/race/race_manager.hpp:545
#: src/race/race_manager.hpp:547
#: src/states_screens/ghost_replay_selection.cpp:118
msgid "SuperTux"
msgstr ""
@ -996,7 +996,7 @@ msgstr ""
#. I18N: ./data/gui/online/guest_login.stkgui
#. I18N: ./data/gui/user_screen.stkgui
#: src/states_screens/main_menu_screen.cpp:78
#: src/states_screens/main_menu_screen.cpp:79
msgid "Login"
msgstr ""
@ -1544,7 +1544,7 @@ msgstr ""
#. I18N: ./data/gui/race_paused_dialog.stkgui
#. I18N: Race paused button
#: src/states_screens/race_result_gui.cpp:226
#: src/states_screens/race_result_gui.cpp:228
msgid "Setup New Race"
msgstr ""
@ -1699,6 +1699,10 @@ msgstr ""
msgid "Hacienda"
msgstr ""
#. I18N: ../stk-assets/tracks/icy_soccer_field/track.xml
msgid "Icy Soccer Field"
msgstr ""
#. I18N: Cutscene subtitle from ../stk-assets/tracks/introcutscene2/scene.xml
#. I18N: ../stk-assets/tracks/introcutscene2/scene.xml
msgid "What's wrong, little hippies? Your great gnu leader is missing?"
@ -1778,6 +1782,10 @@ msgstr ""
msgid "Temple"
msgstr ""
#. I18N: ../stk-assets/tracks/volcano_island/track.xml
msgid "Volcan Island"
msgstr ""
#. I18N: ../stk-assets/tracks/xr591/track.xml
msgid "XR591"
msgstr ""
@ -1934,12 +1942,12 @@ msgid ""
"created."
msgstr ""
#: src/graphics/irr_driver.cpp:1895
#: src/graphics/irr_driver.cpp:1896
#, c-format
msgid "FPS: %d/%d/%d - PolyCount: %d Solid, %d Shadows - LightDist : %d"
msgstr ""
#: src/graphics/irr_driver.cpp:1906
#: src/graphics/irr_driver.cpp:1907
#, c-format
msgid "FPS: %d/%d/%d - %d KTris"
msgstr ""
@ -2626,7 +2634,7 @@ msgstr ""
msgid "You finished the race!"
msgstr ""
#: src/main.cpp:1234
#: src/main.cpp:1296
msgid ""
"SuperTuxKart may connect to a server to download add-ons and notify you of "
"updates. We also collect anonymous hardware statistics to help with the "
@ -2636,12 +2644,12 @@ msgid ""
"edit \"Connect to the Internet\" and \"Send anonymous HW statistics\")."
msgstr ""
#: src/main.cpp:1384
#: src/main.cpp:1446
msgid ""
"Your driver version is too old. Please install the latest video drivers."
msgstr ""
#: src/main.cpp:1396
#: src/main.cpp:1458
msgid ""
"Your OpenGL version appears to be too old. Please verify if an update for "
"your video driver is available. SuperTuxKart requires OpenGL 3.1 or better."
@ -2679,11 +2687,11 @@ msgstr ""
msgid "WRONG WAY!"
msgstr ""
#: src/modes/world.cpp:1196
#: src/modes/world.cpp:1208
msgid "You have been eliminated!"
msgstr ""
#: src/modes/world.cpp:1199
#: src/modes/world.cpp:1211
#, c-format
msgid "'%s' has been eliminated."
msgstr ""
@ -2827,7 +2835,7 @@ msgid "Please wait while addons are updated"
msgstr ""
#: src/states_screens/addons_screen.cpp:512
#: src/states_screens/main_menu_screen.cpp:550
#: src/states_screens/main_menu_screen.cpp:553
msgid ""
"Sorry, an error occurred while contacting the add-ons website. Make sure you "
"are connected to the Internet and that SuperTuxKart is not blocked by a "
@ -2840,7 +2848,7 @@ msgstr ""
#. I18N: track group name
#: src/states_screens/arenas_screen.cpp:81
#: src/states_screens/easter_egg_screen.cpp:143
#: src/states_screens/kart_selection.cpp:285
#: src/states_screens/kart_selection.cpp:284
#: src/states_screens/tracks_and_gp_screen.cpp:146
msgid "standard"
msgstr ""
@ -3263,16 +3271,16 @@ msgid "User defined"
msgstr ""
#. I18N: when failing a GP
#: src/states_screens/grand_prix_lose.cpp:150
#: src/states_screens/grand_prix_lose.cpp:153
msgid "Better luck next time!"
msgstr ""
#: src/states_screens/grand_prix_win.cpp:125
#: src/states_screens/race_result_gui.cpp:192
#: src/states_screens/grand_prix_win.cpp:126
#: src/states_screens/race_result_gui.cpp:194
msgid "You completed a challenge!"
msgstr ""
#: src/states_screens/grand_prix_win.cpp:281
#: src/states_screens/grand_prix_win.cpp:283
msgid "You completed the Grand Prix!"
msgstr ""
@ -3291,25 +3299,25 @@ msgid ""
"Press the 'Select' button to join the game"
msgstr ""
#: src/states_screens/main_menu_screen.cpp:489
#: src/states_screens/main_menu_screen.cpp:492
msgid ""
"You can not play online without internet access. If you want to play online, "
"go to options, select tab 'User Interface', and edit \"Connect to the "
"Internet\"."
msgstr ""
#: src/states_screens/main_menu_screen.cpp:513
#: src/states_screens/main_menu_screen.cpp:516
msgid ""
"You can not download addons without internet access. If you want to download "
"addons, go to options, select tab 'User Interface', and edit \"Connect to "
"the Internet\"."
msgstr ""
#: src/states_screens/main_menu_screen.cpp:545
#: src/states_screens/main_menu_screen.cpp:548
msgid "The add-ons module is currently disabled in the Options screen"
msgstr ""
#: src/states_screens/main_menu_screen.cpp:557
#: src/states_screens/main_menu_screen.cpp:560
msgid "Please wait while the add-ons are loading"
msgstr ""
@ -3634,20 +3642,20 @@ msgid "GOAL!"
msgstr ""
#. I18N: string used to show the author of the music. (e.g. "Sunny Song" by "John Doe")
#: src/states_screens/race_gui_base.cpp:502
#: src/states_screens/race_gui_base.cpp:504
msgid "by"
msgstr ""
#: src/states_screens/race_gui_base.cpp:610
#: src/states_screens/race_gui_base.cpp:612
msgid "Collect nitro!"
msgstr ""
#: src/states_screens/race_gui_base.cpp:612
#: src/states_screens/race_gui_base.cpp:614
msgid "Follow the leader!"
msgstr ""
#. I18N: When some GlobalPlayerIcons are hidden, write "Top 10" to show it
#: src/states_screens/race_gui_base.cpp:778
#: src/states_screens/race_gui_base.cpp:780
#, c-format
msgid "Top %i"
msgstr ""
@ -3673,40 +3681,40 @@ msgstr ""
msgid "Press fire to start the challenge"
msgstr ""
#: src/states_screens/race_result_gui.cpp:173
#: src/states_screens/race_result_gui.cpp:175
msgid "Continue."
msgstr ""
#: src/states_screens/race_result_gui.cpp:176
#: src/states_screens/race_result_gui.cpp:178
msgid "Quit the server."
msgstr ""
#: src/states_screens/race_result_gui.cpp:193
#: src/states_screens/race_result_gui.cpp:195
msgid "You completed challenges!"
msgstr ""
#: src/states_screens/race_result_gui.cpp:206
#: src/states_screens/race_result_gui.cpp:208
msgid "Abort Grand Prix"
msgstr ""
#: src/states_screens/race_result_gui.cpp:216
#: src/states_screens/race_result_gui.cpp:218
msgid "Restart"
msgstr ""
#: src/states_screens/race_result_gui.cpp:222
#: src/states_screens/race_result_gui.cpp:224
msgid "Back to challenge selection"
msgstr ""
#: src/states_screens/race_result_gui.cpp:228
#: src/states_screens/race_result_gui.cpp:230
msgid "Back to the menu"
msgstr ""
#: src/states_screens/race_result_gui.cpp:371
#: src/states_screens/race_result_gui.cpp:373
msgid "Do you really want to abort the Grand Prix?"
msgstr ""
#: src/states_screens/race_result_gui.cpp:513
#: src/states_screens/race_result_gui.cpp:884
#: src/states_screens/race_result_gui.cpp:498
#: src/states_screens/race_result_gui.cpp:861
msgid "Eliminated"
msgstr ""
@ -3722,21 +3730,22 @@ msgstr ""
msgid "It's a draw"
msgstr ""
#: src/states_screens/race_result_gui.cpp:1105
#: src/states_screens/race_result_gui.cpp:1153
#. I18N: indicates a player that scored in their own goal in result screen
#: src/states_screens/race_result_gui.cpp:1106
#: src/states_screens/race_result_gui.cpp:1154
msgid "(Own Goal)"
msgstr ""
#: src/states_screens/race_result_gui.cpp:1218
#: src/states_screens/race_result_gui.cpp:1219
#, c-format
msgid "Track %i/%i"
msgstr ""
#: src/states_screens/race_result_gui.cpp:1302
#: src/states_screens/race_result_gui.cpp:1303
msgid "Grand Prix progress:"
msgstr ""
#: src/states_screens/race_result_gui.cpp:1340
#: src/states_screens/race_result_gui.cpp:1341
msgid "Highscores"
msgstr ""

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# A simple script that adds all authors from transifex, which are
# listed in comments at the beginning of the file, to the
# 'translator-credits' translations - where launchpad added them
@ -19,75 +19,79 @@ import re
import sys
if __name__ == "__main__":
if len(sys.argv)!=2:
if len(sys.argv) < 2:
print "Usage: getpo_authors.py PATH_TO_PO_FILE"
sys.exit(-1)
f = open(sys.argv[1], "r")
if not f:
print "Can not find", sys.argv[1]
exit
lines = f.readlines()
for filename in sys.argv[1:]:
print("Processing file ", filename)
f = open(filename, "r")
if not f:
print "Can not find", filename
exit
lines = f.readlines()
f.close()
f.close()
new_authors = []
found = 0
new_authors = []
found = 0
# Find all authors with a simple finite state machine:
contributions = -1
line_count = 0
for i in lines:
line = i[:-1] # remove \n
if line=="# Translators:":
found = 1
elif found and line[:2]=="# " and line [:14]!="# FIRST AUTHOR":
new_authors.append(line[2:])
elif line[:5]=="msgid":
found = 0
elif line[:31]== "msgstr \"Launchpad Contributions":
contributions = line_count
line_count = line_count + 1
# Find all authors with a simple finite state machine:
contributions = -1
line_count = 0
for i in lines:
line = i[:-1] # remove \n
if line=="# Translators:":
found = 1
elif found and line[:2]=="# " and line [:14]!="# FIRST AUTHOR":
new_authors.append(line[2:])
elif line[:5]=="msgid":
found = 0
elif line[:31]== "msgstr \"Launchpad Contributions":
contributions = line_count
line_count = line_count + 1
# Delete all email addresses - not sure if the authors
# would want them to be published
email=re.compile(" *<.*@.*\..*> *") # one @ and one dot at least
for i in range(len(new_authors)):
g = email.search(new_authors[i])
if g:
new_authors[i] = new_authors[i][:g.start()] \
+ new_authors[i][g.end():]
# Delete all email addresses - not sure if the authors
# would want them to be published
email=re.compile(" *<.*@.*\..*> *") # one @ and one dot at least
for i in range(len(new_authors)):
g = email.search(new_authors[i])
if g:
new_authors[i] = new_authors[i][:g.start()] \
+ new_authors[i][g.end():]
# Get the old authors from the translator-credits string:
if contributions>0:
# Ignore the first entry, which is "msgstr ...", and the
# last two characters, which are the '"\n'.
old_authors = lines[contributions][:-2].split("\\n")[1:]
for i in range(len(old_authors)):
old_authors[i] = old_authors[i].strip()
else:
old_authors=[]
all_authors = old_authors + new_authors;
all_authors = sorted(all_authors, key=lambda x: x.lower())
all_authors_string = reduce(lambda x,y: x+"\\n"+y, all_authors, "")
# Get the old authors from the translator-credits string:
if contributions>0:
# Ignore the first entry, which is "msgstr ...", and the
# last two characters, which are the '"\n'.
old_authors = lines[contributions][:-2].split("\\n")[1:]
for i in range(len(old_authors)):
old_authors[i] = old_authors[i].strip()
else:
old_authors=[]
all_authors = old_authors + new_authors;
all_authors = sorted(all_authors, key=lambda x: x.lower())
all_authors_string = reduce(lambda x,y: x+"\\n"+y, all_authors, "")
credits_line = "msgstr \"Launchpad Contributions:%s\"\n"%all_authors_string
# If no old authors exists, write a new entry:
if contributions==-1:
lines.append("\n")
lines.append("#: src/states_screens/credits.cpp:209\n")
lines.append("msgid \"translator-credits\"\n")
lines.append(credits_line)
else:
# Otherwise just replace the old contribution string
lines[contributions] = credits_line
credits_line = "msgstr \"Launchpad Contributions:%s\"\n"%all_authors_string
# If no old authors exists, write a new entry:
if contributions==-1:
lines.append("\n")
lines.append("#: src/states_screens/credits.cpp:209\n")
lines.append("msgid \"translator-credits\"\n")
lines.append(credits_line)
else:
# Otherwise just replace the old contribution string
lines[contributions] = credits_line
# Overwrite old file
f = open(sys.argv[1], "w")
for i in lines:
f.write(i)
f.close()
# Overwrite old file
f = open(filename, "w")
for i in lines:
f.write(i)
f.close()
print("Done with ", filename)

View File

@ -4,10 +4,10 @@ uniform sampler2D dtex;
out vec4 Diff;
out vec4 Spec;
vec3 DecodeNormal(vec2 n);
vec4 getPosFromUVDepth(vec3 uvDepth, mat4 InverseProjectionMatrix);
vec3 DiffuseIBL(vec3 normal);
vec3 SpecularIBL(vec3 normal, vec3 V, float roughness);
#stk_include "utils/decodeNormal.frag"
#stk_include "utils/getPosFromUVDepth.frag"
#stk_include "utils/DiffuseIBL.frag"
#stk_include "utils/SpecularIBL.frag"
void main(void)
{

View File

@ -22,7 +22,7 @@ layout (std430) buffer BoundingBoxes
CascadeBoundingBox BB[4];
};
vec4 getPosFromUVDepth(vec3 uvDepth, mat4 InverseProjectionMatrix);
#stk_include "utils/getPosFromUVDepth.frag"
shared int xmin[4];
shared int xmax[4];

View File

@ -3,12 +3,13 @@
uniform sampler2D tex;
uniform sampler2D depth;
uniform vec2 pixel;
uniform float sigma = 5.;
out vec4 FragColor;
void main()
{
float sigma = 5.;
vec2 uv = gl_FragCoord.xy * pixel;
float X = uv.x;
float Y = uv.y;
@ -23,11 +24,11 @@ void main()
g1 *= g2;
float tmp_weight, total_weight = g0;
for (int i = 1; i < 9; i++) {
tmp_weight = max(0.0, 1.0 - .001 * abs(texture(depth, vec2(X - i * pixel.x, Y)).x - pixel_depth));
sum += texture(tex, vec2(X - i * pixel.x, Y)) * g0 * tmp_weight;
tmp_weight = max(0.0, 1.0 - .001 * abs(texture(depth, vec2(X - float(i) * pixel.x, Y)).x - pixel_depth));
sum += texture(tex, vec2(X - float(i) * pixel.x, Y)) * g0 * tmp_weight;
total_weight += g0 * tmp_weight;
tmp_weight = max(0.0, 1.0 - .001 * abs(texture(depth, vec2(X + i * pixel.x, Y)).x - pixel_depth));
sum += texture(tex, vec2(X + i * pixel.x, Y)) * g0 * tmp_weight;
tmp_weight = max(0.0, 1.0 - .001 * abs(texture(depth, vec2(X + float(i) * pixel.x, Y)).x - pixel_depth));
sum += texture(tex, vec2(X + float(i) * pixel.x, Y)) * g0 * tmp_weight;
total_weight += g0 * tmp_weight;
g0 *= g1;
g1 *= g2;

View File

@ -3,12 +3,13 @@
uniform sampler2D tex;
uniform sampler2D depth;
uniform vec2 pixel;
uniform float sigma = 5.;
out vec4 FragColor;
void main()
{
float sigma = 5.;
vec2 uv = gl_FragCoord.xy * pixel;
float X = uv.x;
float Y = uv.y;
@ -23,11 +24,11 @@ void main()
g1 *= g2;
float tmp_weight, total_weight = g0;
for (int i = 1; i < 9; i++) {
tmp_weight = max(0.0, 1.0 - .001 * abs(texture(depth, vec2(X, Y - i * pixel.y)).x - pixel_depth));
sum += texture(tex, vec2(X, Y - i * pixel.y)) * g0 * tmp_weight;
tmp_weight = max(0.0, 1.0 - .001 * abs(texture(depth, vec2(X, Y - float(i) * pixel.y)).x - pixel_depth));
sum += texture(tex, vec2(X, Y - float(i) * pixel.y)) * g0 * tmp_weight;
total_weight += g0 * tmp_weight;
tmp_weight = max(0.0, 1.0 - .001 * abs(texture(depth, vec2(X, Y + i * pixel.y)).x - pixel_depth));
sum += texture(tex, vec2(X, Y + i * pixel.y)) * g0 * tmp_weight;
tmp_weight = max(0.0, 1.0 - .001 * abs(texture(depth, vec2(X, Y + float(i) * pixel.y)).x - pixel_depth));
sum += texture(tex, vec2(X, Y + float(i) * pixel.y)) * g0 * tmp_weight;
total_weight += g0 * tmp_weight;
g0 *= g1;
g1 *= g2;

View File

@ -2,17 +2,17 @@ uniform sampler2D tex;
out vec4 FragColor;
vec3 getCIEYxy(vec3 rgbColor);
vec3 getRGBFromCIEXxy(vec3 YxyColor);
#stk_include "utils/getCIEXYZ.frag"
#stk_include "utils/getRGBfromCIEXxy.frag"
void main()
{
vec2 uv = gl_FragCoord.xy / 512;
vec2 uv = gl_FragCoord.xy / 512.;
vec3 col = texture(tex, uv).xyz;
vec3 Yxy = getCIEYxy(col);
vec3 WhiteYxy = getCIEYxy(vec3(1.));
Yxy.x = smoothstep(WhiteYxy.x, WhiteYxy.x * 4, Yxy.x);
Yxy.x = smoothstep(WhiteYxy.x, WhiteYxy.x * 4., Yxy.x);
FragColor = vec4(max(vec3(0.), getRGBFromCIEXxy(Yxy)), 1.0);
}

View File

@ -3,10 +3,10 @@ uniform sampler2D ntex;
out vec4 Diff;
out vec4 Spec;
vec3 DecodeNormal(vec2 n);
vec4 getPosFromUVDepth(vec3 uvDepth, mat4 InverseProjectionMatrix);
vec3 DiffuseIBL(vec3 normal);
vec3 SpecularIBL(vec3 normal, vec3 V, float roughness);
#stk_include "utils/decodeNormal.frag"
#stk_include "utils/getPosFromUVDepth.frag"
#stk_include "utils/DiffuseIBL.frag"
#stk_include "utils/SpecularIBL.frag"
void main(void)
{

View File

@ -12,7 +12,7 @@ in vec2 uv;
in vec2 uv_bis;
out vec4 FragColor;
vec3 getLightFactor(vec3 diffuseMatColor, vec3 specularMatColor, float specMapValue, float emitMapValue);
#stk_include "utils/getLightFactor.frag"
void main(void)
{

View File

@ -11,7 +11,7 @@ void main()
{
vec2 uv = gl_FragCoord.xy / screen;
float curdepth = texture(dtex, uv).x;
vec4 FragPos = InverseProjectionMatrix * (2.0f * vec4(uv, curdepth, 1.0f) - 1.0f);
vec4 FragPos = InverseProjectionMatrix * (2.0 * vec4(uv, curdepth, 1.0) - 1.0);
FragPos /= FragPos.w;
float depth = FragPos.z;
@ -70,7 +70,7 @@ void main()
col = vec4(col.rgb / 41.0, col.a);
depth = clamp(max(1.1666 - (FragPos.z/240.0), FragPos.z - 2000.0), 0., 1.);
vec3 final = colOriginal.rgb * depth + col.rgb * (1 - depth);
vec3 final = colOriginal.rgb * depth + col.rgb * (1. - depth);
FragColor = vec4(final, colOriginal.a);
}

View File

@ -6,7 +6,7 @@ uniform vec3 col;
out vec4 FragColor;
vec4 getPosFromUVDepth(vec3 uvDepth, mat4 InverseProjectionMatrix);
#stk_include "utils/getPosFromUVDepth.frag"
void main()
{

View File

@ -20,8 +20,8 @@ void main()
g0 *= g1;
g1 *= g2;
for (int i = 1; i < 6; i++) {
sum += texture(tex, vec2(X - i * pixel.x, Y)) * g0;
sum += texture(tex, vec2(X + i * pixel.x, Y)) * g0;
sum += texture(tex, vec2(X - float(i) * pixel.x, Y)) * g0;
sum += texture(tex, vec2(X + float(i) * pixel.x, Y)) * g0;
g0 *= g1;
g1 *= g2;
}

View File

@ -20,8 +20,8 @@ void main()
g0 *= g1;
g1 *= g2;
for (int i = 1; i < 6; i++) {
sum += texture(tex, vec2(X, Y - i * pixel.y)) * g0;
sum += texture(tex, vec2(X, Y + i * pixel.y)) * g0;
sum += texture(tex, vec2(X, Y - float(i) * pixel.y)) * g0;
sum += texture(tex, vec2(X, Y + float(i) * pixel.y)) * g0;
g0 *= g1;
g1 *= g2;
}

View File

@ -14,7 +14,7 @@ uniform mat4 RHMatrix;
uniform mat4 InvRHMatrix;
vec4 SHBasis (const in vec3 dir)
{
{
float L00 = 0.282095;
float L1_1 = 0.488603 * dir.y;
float L10 = 0.488603 * dir.z;
@ -30,8 +30,8 @@ vec3 SH2RGB (in vec4 sh_r, in vec4 sh_g, in vec4 sh_b, in vec3 dir)
out vec4 Diffuse;
vec3 DecodeNormal(vec2 n);
vec4 getPosFromUVDepth(vec3 uvDepth, mat4 InverseProjectionMatrix);
#stk_include "utils/decodeNormal.frag"
#stk_include "utils/getPosFromUVDepth.frag"
vec3 resolution = vec3(32, 16, 32);

View File

@ -12,8 +12,7 @@ layout(location = 12) in vec4 GlowColor;
flat out vec4 glowColor;
mat4 getWorldMatrix(vec3 translation, vec3 rotation, vec3 scale);
mat4 getInverseWorldMatrix(vec3 translation, vec3 rotation, vec3 scale);
#stk_include "utils/getworldmatrix.vert"
void main(void)
{

View File

@ -12,7 +12,7 @@ in vec3 nor;
in vec2 uv;
out vec4 FragColor;
vec3 getLightFactor(vec3 diffuseMatColor, vec3 specularMatColor, float specMapValue, float emitMapValue);
#stk_include "utils/getLightFactor.frag"
void main(void)
{

View File

@ -13,7 +13,7 @@ in vec2 uv;
in vec2 uv_bis;
out vec4 FragColor;
vec3 getLightFactor(vec3 diffuseMatColor, vec3 specularMatColor, float specMapValue, float emitMapValue);
#stk_include "utils/getLightFactor.frag"
void main(void)
{

View File

@ -32,8 +32,7 @@ flat out sampler2D handle;
flat out sampler2D secondhandle;
#endif
mat4 getWorldMatrix(vec3 translation, vec3 rotation, vec3 scale);
mat4 getInverseWorldMatrix(vec3 translation, vec3 rotation, vec3 scale);
#stk_include "utils/getworldmatrix.vert"
void main()
{

View File

@ -14,7 +14,7 @@ in vec3 nor;
in vec2 uv;
out vec4 FragColor;
vec3 getLightFactor(vec3 diffuseMatColor, vec3 specularMatColor, float specMapValue, float emitMapValue);
#stk_include "utils/getLightFactor.frag"
void main(void)
{

View File

@ -12,7 +12,7 @@ in vec3 bitangent;
in vec2 uv;
out vec3 EncodedNormal;
vec2 EncodeNormal(vec3 n);
#stk_include "utils/encode_normal.frag"
void main()
{

View File

@ -42,8 +42,7 @@ flat out sampler2D secondhandle;
flat out sampler2D thirdhandle;
#endif
mat4 getWorldMatrix(vec3 translation, vec3 rotation, vec3 scale);
mat4 getInverseWorldMatrix(vec3 translation, vec3 rotation, vec3 scale);
#stk_include "utils/getworldmatrix.vert"
void main(void)
{

View File

@ -9,7 +9,7 @@ in vec3 nor;
in vec2 uv;
out vec3 EncodedNormal;
vec2 EncodeNormal(vec3 n);
#stk_include "utils/encode_normal.frag"
void main(void)
{

View File

@ -1,17 +1,22 @@
#ifndef Use_Bindless_Texture
uniform sampler2D Albedo;
uniform sampler2D SpecMap;
uniform sampler2D colorization_mask;
#endif
#ifdef Use_Bindless_Texture
flat in sampler2D handle;
flat in sampler2D secondhandle;
#endif
uniform vec2 color_change;
in vec2 uv;
in vec4 color;
out vec4 FragColor;
vec3 getLightFactor(vec3 diffuseMatColor, vec3 specularMatColor, float specMapValue, float emitMapValue);
#stk_include "utils/getLightFactor.frag"
#stk_include "utils/rgb_conversion.frag"
void main(void)
{
@ -26,8 +31,19 @@ void main(void)
vec4 col = texture(Albedo, uv);
float specmap = texture(SpecMap, uv).g;
float emitmap = texture(SpecMap, uv).b;
float mask = texture(colorization_mask, uv).a;
#endif
if (color_change.x > 0.0)
{
vec3 old_hsv = rgbToHsv(col.rgb);
float mask_step = step(mask, 0.5);
vec2 new_xy = mix(vec2(old_hsv.x, old_hsv.y), vec2(color_change.x, max(old_hsv.y, color_change.y)), vec2(mask_step, mask_step));
vec3 new_color = hsvToRgb(vec3(new_xy.x, new_xy.y, old_hsv.z));
col = vec4(new_color.r, new_color.g, new_color.b, col.a);
}
col.xyz *= pow(color.xyz, vec3(2.2));
FragColor = vec4(getLightFactor(col.xyz, vec3(1.), specmap, emitmap) , 1.);
}

View File

@ -10,9 +10,8 @@ flat in sampler2D handle;
in vec3 nor;
out vec4 FragColor;
vec4 getPosFromUVDepth(vec3 uvDepth, mat4 InverseProjectionMatrix);
vec3 getLightFactor(vec3 diffuseMatColor, vec3 specularMatColor, float specMapValue, float emitMapValue);
#stk_include "utils/getPosFromUVDepth.frag"
#stk_include "utils/getLightFactor.frag"
void main() {
vec3 texc = gl_FragCoord.xyz / vec3(screen, 1.);

View File

@ -11,7 +11,7 @@ in vec3 nor;
in vec2 uv;
out vec3 EncodedNormal;
vec2 EncodeNormal(vec3 n);
#stk_include "utils/encode_normal.frag"
void main() {
#ifdef Use_Bindless_Texture

View File

@ -11,7 +11,7 @@ in vec2 uv;
in vec4 color;
out vec4 FragColor;
vec3 getLightFactor(vec3 diffuseMatColor, vec3 specularMatColor, float specMapValue, float emitMapValue);
#stk_include "utils/getLightFactor.frag"
void main(void)
{

View File

@ -21,8 +21,7 @@ flat out uvec2 handle;
#endif
mat4 getWorldMatrix(vec3 translation, vec3 rotation, vec3 scale);
mat4 getInverseWorldMatrix(vec3 translation, vec3 rotation, vec3 scale);
#stk_include "utils/getworldmatrix.vert"
void main(void)
{

View File

@ -36,8 +36,7 @@ flat out uvec2 hdle;
#endif
#endif
mat4 getWorldMatrix(vec3 translation, vec3 rotation, vec3 scale);
mat4 getInverseWorldMatrix(vec3 translation, vec3 rotation, vec3 scale);
#stk_include "utils/getworldmatrix.vert"
void main(void)
{
@ -57,4 +56,4 @@ void main(void)
hdle = Handle;
#endif
#endif
}
}

View File

@ -33,8 +33,7 @@ flat out uvec2 hdle;
#endif
#endif
mat4 getWorldMatrix(vec3 translation, vec3 rotation, vec3 scale);
mat4 getInverseWorldMatrix(vec3 translation, vec3 rotation, vec3 scale);
#stk_include "utils/getworldmatrix.vert"
void main(void)
{
@ -54,4 +53,4 @@ void main(void)
hdle = Handle;
#endif
#endif
}
}

View File

@ -0,0 +1,142 @@
precision mediump float;
/* Definitions */
#define Solid 0
#define Solid2Layer 1
#define LightMap 2
#define DetailMap 3
#define SphereMap 4
#define Reflection2Layer 5
#define TransparentAlphaChannel 6
#define TransparentAlphaChannelRef 7
#define TransparentVertexAlpha 8
#define TransparentReflection2Layer 9
/* Uniforms */
uniform int uMaterialType;
uniform bool uTextureUsage0;
uniform bool uTextureUsage1;
uniform sampler2D uTextureUnit0;
uniform sampler2D uTextureUnit1;
/* Varyings */
varying vec2 varTexCoord0;
varying vec2 varTexCoord1;
varying vec4 varVertexColor;
varying float varEyeDist;
vec4 renderSolid()
{
vec4 Color = varVertexColor;
if(uTextureUsage0)
Color *= texture2D(uTextureUnit0, varTexCoord0);
Color.a = 1.0;
return Color;
}
vec4 render2LayerSolid()
{
float BlendFactor = varVertexColor.a;
vec4 Texel0 = texture2D(uTextureUnit0, varTexCoord0);
vec4 Texel1 = texture2D(uTextureUnit1, varTexCoord1);
vec4 Color = Texel0 * BlendFactor + Texel1 * (1.0 - BlendFactor);
return Color;
}
vec4 renderLightMap()
{
vec4 Texel0 = texture2D(uTextureUnit0, varTexCoord0);
vec4 Texel1 = texture2D(uTextureUnit1, varTexCoord1);
vec4 Color = Texel0 * Texel1 * 4.0;
Color.a = Texel0.a * Texel0.a;
return Color;
}
vec4 renderDetailMap()
{
vec4 Texel0 = texture2D(uTextureUnit0, varTexCoord0);
vec4 Texel1 = texture2D(uTextureUnit1, varTexCoord1);
vec4 Color = Texel0;
Color += Texel1 - 0.5;
return Color;
}
vec4 renderReflection2Layer()
{
vec4 Color = varVertexColor;
vec4 Texel0 = texture2D(uTextureUnit0, varTexCoord0);
vec4 Texel1 = texture2D(uTextureUnit1, varTexCoord1);
Color *= Texel0 * Texel1;
return Color;
}
vec4 renderTransparent()
{
vec4 Color = vec4(1.0, 1.0, 1.0, 1.0);
if(uTextureUsage0)
Color *= texture2D(uTextureUnit0, varTexCoord0);
return Color;
}
void main ()
{
if (uMaterialType == Solid)
gl_FragColor = renderSolid();
else if(uMaterialType == Solid2Layer)
gl_FragColor = render2LayerSolid();
else if(uMaterialType == LightMap)
gl_FragColor = renderLightMap();
else if(uMaterialType == DetailMap)
gl_FragColor = renderDetailMap();
else if(uMaterialType == SphereMap)
gl_FragColor = renderSolid();
else if(uMaterialType == Reflection2Layer)
gl_FragColor = renderReflection2Layer();
else if(uMaterialType == TransparentAlphaChannel)
gl_FragColor = renderTransparent();
else if(uMaterialType == TransparentAlphaChannelRef)
{
vec4 Color = renderTransparent();
if (Color.a < 0.5)
discard;
gl_FragColor = Color;
}
else if(uMaterialType == TransparentVertexAlpha)
{
vec4 Color = renderTransparent();
Color.a = varVertexColor.a;
gl_FragColor = Color;
}
else if(uMaterialType == TransparentReflection2Layer)
{
vec4 Color = renderReflection2Layer();
Color.a = varVertexColor.a;
gl_FragColor = Color;
}
else
gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
}

View File

@ -0,0 +1,36 @@
/* Attributes */
attribute vec3 inVertexPosition;
attribute vec3 inVertexNormal;
attribute vec4 inVertexColor;
attribute vec2 inTexCoord0;
attribute vec2 inTexCoord1;
/* Uniforms */
uniform int uMaterialType;
uniform mat4 uMvpMatrix;
uniform mat4 uTextureMatrix0;
uniform mat4 uTextureMatrix1;
/* Varyings */
varying vec2 varTexCoord0;
varying vec2 varTexCoord1;
varying vec4 varVertexColor;
varying float varEyeDist;
void main(void)
{
gl_Position = uMvpMatrix * vec4(inVertexPosition,1.0);
vec4 TexCoord0 = vec4(inTexCoord0.x, inTexCoord0.y, 0.0, 0.0);
varTexCoord0 = vec4(uTextureMatrix0 * TexCoord0).xy;
vec4 TexCoord1 = vec4(inTexCoord1.x, inTexCoord1.y, 0.0, 0.0);
varTexCoord1 = vec4(uTextureMatrix1 * TexCoord1).xy;
varVertexColor = inVertexColor.zyxw;
}

View File

@ -0,0 +1,36 @@
// Copyright (C) 2009-2010 Amundis
// Heavily based on the OpenGL driver implemented by Nikolaus Gebhardt
// and OpenGL ES driver implemented by Christian Stehno
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
#define MAX_LIGHTS 2
precision mediump float;
uniform sampler2D texture0;
uniform sampler2D texture1;
varying vec4 varTexCoord;
varying vec3 varLightVector[MAX_LIGHTS];
varying vec4 varLightColor[MAX_LIGHTS];
varying vec4 debug;
void main(void)
{
// fetch color and normal map
vec4 normalMap = texture2D(texture1, varTexCoord.xy) * 2.0 - 1.0;
vec4 colorMap = texture2D(texture0, varTexCoord.xy);
// calculate color of light 0
vec4 color = clamp(varLightColor[0], 0.0, 1.0) * dot(normalMap.xyz, normalize(varLightVector[0].xyz));
// calculate color of light 1
color += clamp(varLightColor[1], 0.0, 1.0) * dot(normalMap.xyz, normalize(varLightVector[1].xyz));
//luminance * base color
color *= colorMap;
color.a = varLightColor[0].a;
gl_FragColor = color;
}

View File

@ -0,0 +1,69 @@
// Copyright (C) 2009-2010 Amundis
// Heavily based on the OpenGL driver implemented by Nikolaus Gebhardt
// and OpenGL ES driver implemented by Christian Stehno
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
#define MAX_LIGHTS 2
attribute vec4 inVertexPosition;
attribute vec4 inVertexColor;
attribute vec4 inTexCoord0;
attribute vec3 inVertexNormal;
attribute vec3 inVertexTangent;
attribute vec3 inVertexBinormal;
uniform mat4 uMvpMatrix;
uniform vec4 uLightPos[MAX_LIGHTS];
uniform vec4 uLightColor[MAX_LIGHTS];
varying vec4 varTexCoord;
varying vec3 varLightVector[MAX_LIGHTS];
varying vec4 varLightColor[MAX_LIGHTS];
varying vec4 debug;
void main(void)
{
debug = vec4(inVertexNormal, 1.0);
// transform position to clip space
gl_Position = uMvpMatrix * inVertexPosition;
// vertex - lightpositions
vec4 tempLightVector0 = uLightPos[0] - inVertexPosition;
vec4 tempLightVector1 = uLightPos[1] - inVertexPosition;
// transform the light vector 1 with U, V, W
varLightVector[0].x = dot(inVertexTangent, tempLightVector0.xyz);
varLightVector[0].y = dot(inVertexBinormal, tempLightVector0.xyz);
varLightVector[0].z = dot(inVertexNormal, tempLightVector0.xyz);
// transform the light vector 2 with U, V, W
varLightVector[1].x = dot(inVertexTangent, tempLightVector1.xyz);
varLightVector[1].y = dot(inVertexBinormal, tempLightVector1.xyz);
varLightVector[1].z = dot(inVertexNormal, tempLightVector1.xyz);
// calculate attenuation of light 0
varLightColor[0].w = 0.0;
varLightColor[0].x = dot(tempLightVector0, tempLightVector0);
varLightColor[0].x *= uLightColor[0].w;
varLightColor[0] = vec4(inversesqrt(varLightColor[0].x));
varLightColor[0] *= uLightColor[0];
// normalize light vector 0
varLightVector[0] = normalize(varLightVector[0]);
// calculate attenuation of light 1
varLightColor[1].w = 0.0;
varLightColor[1].x = dot(tempLightVector1, tempLightVector1);
varLightColor[1].x *= uLightColor[1].w;
varLightColor[1] = vec4(inversesqrt(varLightColor[1].x));
varLightColor[1] *= uLightColor[1];
// normalize light vector 1
varLightVector[1] = normalize(varLightVector[1]);
// move out texture coordinates and original alpha value
varTexCoord = inTexCoord0;
varLightColor[0].a = inVertexColor.a;
}

View File

@ -0,0 +1,49 @@
// Copyright (C) 2009-2010 Amundis
// Heavily based on the OpenGL driver implemented by Nikolaus Gebhardt
// and OpenGL ES driver implemented by Christian Stehno
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
#define MAX_LIGHTS 2
precision mediump float;
uniform sampler2D texture0;
uniform sampler2D texture1;
//uniform vec4 uLightDiffuse[MAX_LIGHTS];
uniform float uHeightScale;
varying vec4 varTexCoord;
varying vec3 varLightVector[MAX_LIGHTS];
varying vec4 varLightColor[MAX_LIGHTS];
varying vec3 varEyeVector;
varying vec4 debug;
void main(void)
{
// fetch color and normal map
vec4 normalMap = texture2D(texture1, varTexCoord.xy) * 2.0 - 1.0;
// height = height * scale
normalMap *= uHeightScale;
// calculate new texture coord: height * eye + oldTexCoord
vec2 offset = varEyeVector.xy * normalMap.w + varTexCoord.xy;
// fetch new textures
vec4 colorMap = texture2D(texture0, offset);
normalMap = normalize(texture2D(texture1, offset) * 2.0 - 1.0);
// calculate color of light 0
vec4 color = clamp(varLightColor[0], 0.0, 1.0) * dot(normalMap.xyz, normalize(varLightVector[0].xyz));
// calculate color of light 1
color += clamp(varLightColor[1], 0.0, 1.0) * dot(normalMap.xyz, normalize(varLightVector[1].xyz));
//luminance * base color
color *= colorMap;
color.a = varLightColor[0].a;
gl_FragColor = color;
}

View File

@ -0,0 +1,81 @@
// Copyright (C) 2009-2010 Amundis
// Heavily based on the OpenGL driver implemented by Nikolaus Gebhardt
// and OpenGL ES driver implemented by Christian Stehno
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
#define MAX_LIGHTS 2
attribute vec4 inVertexPosition;
attribute vec4 inVertexColor;
attribute vec4 inTexCoord0;
attribute vec3 inVertexNormal;
attribute vec3 inVertexTangent;
attribute vec3 inVertexBinormal;
uniform mat4 uMvpMatrix;
uniform vec4 uLightPos[MAX_LIGHTS];
uniform vec4 uLightColor[MAX_LIGHTS];
uniform vec3 uEyePos;
varying vec4 varTexCoord;
varying vec3 varLightVector[MAX_LIGHTS];
varying vec4 varLightColor[MAX_LIGHTS];
varying vec3 varEyeVector;
varying vec4 debug;
void main(void)
{
debug = vec4(inVertexNormal, 1.0);
// transform position to clip space
gl_Position = uMvpMatrix * inVertexPosition;
// vertex - lightpositions
vec4 tempLightVector0 = uLightPos[0] - inVertexPosition;
vec4 tempLightVector1 = uLightPos[1] - inVertexPosition;
// eye vector
vec4 Temp = vec4(uEyePos, 1.0) - inVertexPosition;
// transform the light vector 1 with U, V, W
varLightVector[0].x = dot(inVertexTangent, tempLightVector0.xyz);
varLightVector[0].y = dot(inVertexBinormal, tempLightVector0.xyz);
varLightVector[0].z = dot(inVertexNormal, tempLightVector0.xyz);
// transform the light vector 2 with U, V, W
varLightVector[1].x = dot(inVertexTangent, tempLightVector1.xyz);
varLightVector[1].y = dot(inVertexBinormal, tempLightVector1.xyz);
varLightVector[1].z = dot(inVertexNormal, tempLightVector1.xyz);
// transform the eye vector with U, V, W
varEyeVector.x = dot(inVertexTangent, Temp.xyz);
varEyeVector.y = dot(inVertexBinormal, Temp.xyz);
varEyeVector.z = dot(inVertexNormal, Temp.xyz);
varEyeVector *= vec3(1.0,-1.0, -1.0);
varEyeVector = normalize(varEyeVector);
// calculate attenuation of light 0
varLightColor[0].w = 0.0;
varLightColor[0].x = dot(tempLightVector0, tempLightVector0);
varLightColor[0].x *= uLightColor[0].w;
varLightColor[0] = vec4(inversesqrt(varLightColor[0].x));
varLightColor[0] *= uLightColor[0];
// normalize light vector 0
varLightVector[0] = normalize(varLightVector[0]);
// calculate attenuation of light 1
varLightColor[1].w = 0.0;
varLightColor[1].x = dot(tempLightVector1, tempLightVector1);
varLightColor[1].x *= uLightColor[1].w;
varLightColor[1] = vec4(inversesqrt(varLightColor[1].x));
varLightColor[1] *= uLightColor[1];
// normalize light vector 1
varLightVector[1] = normalize(varLightVector[1]);
// move out texture coordinates and original alpha value
varTexCoord = inTexCoord0;
varLightColor[0].a = inVertexColor.a;
}

View File

@ -0,0 +1,23 @@
// Copyright (C) 2009-2010 Amundis
// Heavily based on the OpenGL driver implemented by Nikolaus Gebhardt
// and OpenGL ES driver implemented by Christian Stehno
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
precision mediump float;
uniform bool uUseTexture;
uniform sampler2D uTextureUnit;
varying vec4 vVertexColor;
varying vec2 vTexCoord;
void main(void)
{
vec4 Color = vVertexColor;
if(uUseTexture)
Color *= texture2D(uTextureUnit, vTexCoord);
gl_FragColor = Color;
}

View File

@ -0,0 +1,21 @@
// Copyright (C) 2009-2010 Amundis
// Heavily based on the OpenGL driver implemented by Nikolaus Gebhardt
// and OpenGL ES driver implemented by Christian Stehno
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
attribute vec4 inVertexPosition;
attribute vec4 inVertexColor;
attribute vec2 inTexCoord0;
uniform mat4 uOrthoMatrix;
varying vec4 vVertexColor;
varying vec2 vTexCoord;
void main(void)
{
gl_Position = uOrthoMatrix * inVertexPosition;
vVertexColor = inVertexColor.bgra;
vTexCoord = inTexCoord0;
}

View File

@ -42,7 +42,7 @@ out vec4 FragColor;
// Number of samples used for blurring
#define NB_SAMPLES 8
vec4 getPosFromUVDepth(vec3 uvDepth, mat4 InverseProjectionMatrix);
#stk_include "utils/getPosFromUVDepth.frag"
void main()
{
@ -74,7 +74,7 @@ void main()
// Compute the blur
vec2 inc_vec = blur_dir / vec2(NB_SAMPLES);
vec2 blur_texcoords = texcoords - inc_vec * NB_SAMPLES / 2;
vec2 blur_texcoords = texcoords - inc_vec * float(NB_SAMPLES) / 2.;
for(int i=1 ; i < NB_SAMPLES ; i++)
{
color += texture(color_buffer, blur_texcoords).rgb;

View File

@ -11,7 +11,7 @@ in vec3 bitangent;
in vec2 uv;
out vec3 EncodedNormal;
vec2 EncodeNormal(vec3 n);
#stk_include "utils/encode_normal.frag"
void main()
{

View File

@ -1,3 +1,8 @@
#ifdef GL_ES
uniform mat4 ModelMatrix;
uniform mat4 InverseModelMatrix;
uniform mat4 TextureMatrix;
#else
uniform mat4 ModelMatrix =
mat4(1., 0., 0., 0.,
0., 1., 0., 0.,
@ -14,6 +19,7 @@ uniform mat4 TextureMatrix =
0., 1., 0., 0.,
0., 0., 1., 0.,
0., 0., 0., 1.);
#endif
#if __VERSION__ >= 330
layout(location = 0) in vec3 Position;

View File

@ -8,7 +8,7 @@ in vec3 nor;
in vec2 uv;
out vec3 EncodedNormal;
vec2 EncodeNormal(vec3 n);
#stk_include "utils/encode_normal.frag"
void main(void)
{

View File

@ -4,13 +4,17 @@ layout(bindless_sampler) uniform sampler2D SpecMap;
#else
uniform sampler2D Albedo;
uniform sampler2D SpecMap;
uniform sampler2D colorization_mask;
#endif
uniform vec2 color_change;
in vec2 uv;
in vec4 color;
out vec4 FragColor;
vec3 getLightFactor(vec3 diffuseMatColor, vec3 specularMatColor, float specMapValue, float emitMapValue);
#stk_include "utils/getLightFactor.frag"
#stk_include "utils/rgb_conversion.frag"
void main(void)
{
@ -21,7 +25,18 @@ void main(void)
#endif
#else
vec4 col = texture(Albedo, uv);
float mask = texture(colorization_mask, uv).a;
#endif
if (color_change.x > 0.0)
{
vec3 old_hsv = rgbToHsv(col.rgb);
float mask_step = step(mask, 0.5);
vec2 new_xy = mix(vec2(old_hsv.x, old_hsv.y), vec2(color_change.x, max(old_hsv.y, color_change.y)), vec2(mask_step, mask_step));
vec3 new_color = hsvToRgb(vec3(new_xy.x, new_xy.y, old_hsv.z));
col = vec4(new_color.r, new_color.g, new_color.b, col.a);
}
col.xyz *= pow(color.xyz, vec3(2.2));
float specmap = texture(SpecMap, uv).g;
float emitmap = texture(SpecMap, uv).b;

View File

@ -9,8 +9,8 @@ uniform sampler2D tex;
in vec3 nor;
out vec4 FragColor;
vec4 getPosFromUVDepth(vec3 uvDepth, mat4 InverseProjectionMatrix);
vec3 getLightFactor(vec3 diffuseMatColor, vec3 specularMatColor, float specMapValue, float emitMapValue);
#stk_include "utils/getPosFromUVDepth.frag"
#stk_include "utils/getLightFactor.frag"
void main() {
vec3 texc = gl_FragCoord.xyz / vec3(screen, 1.);

View File

@ -10,7 +10,7 @@ in vec3 nor;
in vec2 uv;
out vec3 EncodedNormal;
vec2 EncodeNormal(vec3 n);
#stk_include "utils/encode_normal.frag"
void main() {
vec4 col = texture(tex, uv);

View File

@ -10,7 +10,7 @@ in vec2 uv;
in vec4 color;
out vec4 FragColor;
vec3 getLightFactor(vec3 diffuseMatColor, vec3 specularMatColor, float specMapValue, float emitMapValue);
#stk_include "utils/getLightFactor.frag"
void main(void)
{

View File

@ -7,7 +7,7 @@ in vec2 tc;
in vec3 pc;
out vec4 FragColor;
vec4 getPosFromUVDepth(vec3 uvDepth, mat4 InverseProjectionMatrix);
#stk_include "utils/getPosFromUVDepth.frag"
void main(void)
{

View File

@ -0,0 +1,13 @@
#version 300 es
precision mediump float;
uniform sampler2D tex;
in vec2 uv;
out vec4 FragColor;
void main()
{
FragColor = texture(tex, uv);
}

View File

@ -0,0 +1,10 @@
#version 300 es
in vec3 Position;
in vec2 Texcoord;
out vec2 uv;
void main() {
uv = Texcoord;
gl_Position = vec4(Position, 1.);
}

View File

@ -39,7 +39,7 @@ void main(void)
if (gl_VertexID < level)
{
float dt_from_last_frame = fract(updated_lifetime) * lifetime_initial;
float coeff = dt_from_last_frame / dt;
float coeff = dt_from_last_frame / float(dt);
vec4 previous_frame_position = previous_frame_sourcematrix * vec4(particle_position_initial, 1.0);
vec4 current_frame_position = sourcematrix * vec4(particle_position_initial, 1.0);
@ -66,7 +66,7 @@ void main(void)
else
{
new_lifetime = fract(updated_lifetime);
new_size = 0;
new_size = 0.0;
}
}
else
@ -74,7 +74,7 @@ void main(void)
new_particle_position = particle_position + particle_velocity.xyz * float(dt);
new_particle_velocity = particle_velocity;
new_lifetime = updated_lifetime;
new_size = (size == 0) ? 0. : mix(size_initial, size_initial * size_increase_factor, updated_lifetime);
new_size = (size == 0.0) ? 0. : mix(size_initial, size_initial * size_increase_factor, updated_lifetime);
}
gl_Position = vec4(0.);
}

View File

@ -9,10 +9,10 @@ flat in float radius;
out vec4 Diff;
out vec4 Spec;
vec3 DecodeNormal(vec2 n);
vec3 SpecularBRDF(vec3 normal, vec3 eyedir, vec3 lightdir, vec3 color, float roughness);
vec3 DiffuseBRDF(vec3 normal, vec3 eyedir, vec3 lightdir, vec3 color, float roughness);
vec4 getPosFromUVDepth(vec3 uvDepth, mat4 InverseProjectionMatrix);
#stk_include "utils/decodeNormal.frag"
#stk_include "utils/SpecularBRDF.frag"
#stk_include "utils/DiffuseBRDF.frag"
#stk_include "utils/getPosFromUVDepth.frag"
void main()
{

View File

@ -9,7 +9,7 @@ flat in float radius;
out vec4 Fog;
vec4 getPosFromUVDepth(vec3 uvDepth, mat4 InverseProjectionMatrix);
#stk_include "utils/getPosFromUVDepth.frag"
void main()
{
@ -28,14 +28,14 @@ void main()
vec3 closestpoint = - eyedir * (dot(-eyedir, light_pos) - radius);
if (closestpoint.z < 1.) closestpoint = vec3(0.);
float stepsize = length(farthestpoint - closestpoint) / 16;
float stepsize = length(farthestpoint - closestpoint) / 16.;
vec3 fog = vec3(0.);
vec3 xpos = farthestpoint;
for (int i = 0; i < 16; i++)
{
float d = distance(light_pos, xpos);
float l = (16 - i) * stepsize;
float l = (16. - float(i)) * stepsize;
float att = energy * 20. / (1. + d * d);
att *= max((radius - d) / radius, 0.);
fog += density * light_col * att * exp(- density * d) * exp(- density * l) * stepsize;

View File

@ -24,7 +24,7 @@ void main(void)
color = Color.zyxw;
vec3 P = Position / vec3(screen, 1.);
P = 2. * P - 1.;
P.y *= -1;
P.y *= -1.;
gl_Position = vec4(P, 1.);
uv = Texcoord;
}

View File

@ -16,7 +16,7 @@ in vec2 uv;
in vec2 uv_bis;
out vec4 FragColor;
vec3 getLightFactor(vec3 diffuseMatColor, vec3 specularMatColor, float specMapValue, float emitMapValue);
#stk_include "utils/getLightFactor.frag"
void main() {
// Splatting part

View File

@ -3,8 +3,8 @@
uniform sampler2D dtex;
uniform float radius;
uniform float k = 1.5;
uniform float sigma = 1.;
uniform float k;
uniform float sigma;
out float AO;
const float tau = 7.;
@ -12,14 +12,13 @@ const float beta = 0.002;
const float epsilon = .00001;
#define SAMPLES 16
const float invSamples = 1. / SAMPLES;
const float invSamples = 0.0625; // 1. / SAMPLES
vec3 getXcYcZc(int x, int y, float zC)
{
// We use perspective symetric projection matrix hence P(0,2) = P(1, 2) = 0
float xC= (2 * (float(x)) / screen.x - 1.) * zC / ProjectionMatrix[0][0];
float yC= (2 * (float(y)) / screen.y - 1.) * zC / ProjectionMatrix[1][1];
float xC= (2. * (float(x)) / screen.x - 1.) * zC / ProjectionMatrix[0][0];
float yC= (2. * (float(y)) / screen.y - 1.) * zC / ProjectionMatrix[1][1];
return vec3(xC, yC, zC);
}
@ -36,16 +35,16 @@ void main(void)
vec3 norm = normalize(cross(ddy, ddx));
float r = radius / FragPos.z;
float phi = 3. * (x ^ y) + x * y;
float phi = 3. * float((x ^ y) + x * y);
float bl = 0.0;
float m = log2(r) + 6 + log2(invSamples);
float m = log2(r) + 6. + log2(invSamples);
float theta = mod(2. * 3.14 * tau * .5 * invSamples + phi, 6.283185307179586);
vec2 rotations = vec2(cos(theta), sin(theta)) * screen;
vec2 offset = vec2(cos(invSamples), sin(invSamples));
for(int i = 0; i < SAMPLES; ++i) {
float alpha = (i + .5) * invSamples;
float alpha = (float(i) + .5) * invSamples;
rotations = vec2(rotations.x * offset.x - rotations.y * offset.y, rotations.x * offset.y + rotations.y * offset.x);
float h = r * alpha;
vec2 localoffset = h * rotations;
@ -53,13 +52,13 @@ void main(void)
m = m + .5;
ivec2 ioccluder_uv = ivec2(x, y) + ivec2(localoffset);
if (ioccluder_uv.x < 0 || ioccluder_uv.x > screen.x || ioccluder_uv.y < 0 || ioccluder_uv.y > screen.y) continue;
if (ioccluder_uv.x < 0 || ioccluder_uv.x > int(screen.x) || ioccluder_uv.y < 0 || ioccluder_uv.y > int(screen.y)) continue;
float LinearoccluderFragmentDepth = textureLod(dtex, vec2(ioccluder_uv) / screen, max(m, 0.)).x;
vec3 OccluderPos = getXcYcZc(ioccluder_uv.x, ioccluder_uv.y, LinearoccluderFragmentDepth);
vec3 vi = OccluderPos - FragPos;
bl += max(0, dot(vi, norm) - FragPos.z * beta) / (dot(vi, vi) + epsilon);
bl += max(0., dot(vi, norm) - FragPos.z * beta) / (dot(vi, vi) + epsilon);
}
AO = max(pow(1.0 - min(2. * sigma * bl * invSamples, 0.99), k), 0.);

View File

@ -4,11 +4,11 @@ uniform sampler2D dtex;
out vec4 Diff;
out vec4 Spec;
vec3 DecodeNormal(vec2 n);
vec3 SpecularBRDF(vec3 normal, vec3 eyedir, vec3 lightdir, vec3 color, float roughness);
vec3 DiffuseBRDF(vec3 normal, vec3 eyedir, vec3 lightdir, vec3 color, float roughness);
vec4 getPosFromUVDepth(vec3 uvDepth, mat4 InverseProjectionMatrix);
vec3 SunMRP(vec3 normal, vec3 eyedir);
#stk_include "utils/decodeNormal.frag"
#stk_include "utils/SpecularBRDF.frag"
#stk_include "utils/DiffuseBRDF.frag"
#stk_include "utils/getPosFromUVDepth.frag"
#stk_include "utils/SunMRP.frag"
void main() {
vec2 uv = gl_FragCoord.xy / screen;

View File

@ -12,11 +12,11 @@ in vec2 uv;
out vec4 Diff;
out vec4 Spec;
vec3 DecodeNormal(vec2 n);
vec3 SpecularBRDF(vec3 normal, vec3 eyedir, vec3 lightdir, vec3 color, float roughness);
vec3 DiffuseBRDF(vec3 normal, vec3 eyedir, vec3 lightdir, vec3 color, float roughness);
vec4 getPosFromUVDepth(vec3 uvDepth, mat4 InverseProjectionMatrix);
vec3 SunMRP(vec3 normal, vec3 eyedir);
#stk_include "utils/decodeNormal.frag"
#stk_include "utils/SpecularBRDF.frag"
#stk_include "utils/DiffuseBRDF.frag"
#stk_include "utils/getPosFromUVDepth.frag"
#stk_include "utils/SunMRP.frag"
float getShadowFactor(vec3 pos, int index)
{

View File

@ -11,11 +11,11 @@ in vec2 uv;
out vec4 Diff;
out vec4 Spec;
vec3 DecodeNormal(vec2 n);
vec3 SpecularBRDF(vec3 normal, vec3 eyedir, vec3 lightdir, vec3 color, float roughness);
vec3 DiffuseBRDF(vec3 normal, vec3 eyedir, vec3 lightdir, vec3 color, float roughness);
vec4 getPosFromUVDepth(vec3 uvDepth, mat4 InverseProjectionMatrix);
vec3 SunMRP(vec3 normal, vec3 eyedir);
#stk_include "utils/decodeNormal.frag"
#stk_include "utils/SpecularBRDF.frag"
#stk_include "utils/DiffuseBRDF.frag"
#stk_include "utils/getPosFromUVDepth.frag"
#stk_include "utils/SunMRP.frag"
float getShadowFactor(vec3 pos, int index)
{

View File

@ -0,0 +1,6 @@
out vec4 FragColor;
void main(void)
{
FragColor = vec4(1.0);
}

View File

@ -3,8 +3,8 @@ uniform float vignette_weight;
out vec4 FragColor;
vec3 getCIEYxy(vec3 rgbColor);
vec3 getRGBFromCIEXxy(vec3 YxyColor);
#stk_include "utils/getCIEXYZ.frag"
#stk_include "utils/getRGBfromCIEXxy.frag"
void main()
{

View File

@ -7,5 +7,5 @@ out vec4 FragColor;
void main()
{
vec4 res = texture(tex, uv);
FragColor = res * color / 255.;
FragColor = res * vec4(color) / 255.;
}

View File

@ -2,7 +2,7 @@
in vec4 color;
out vec4 FragColor;
vec3 getLightFactor(float specMapValue);
#stk_include "utils/getLightFactor.frag"
void main(void)
{

View File

@ -6,6 +6,6 @@ vec3 SpecularBRDF(vec3 normal, vec3 eyedir, vec3 lightdir, vec3 color, float rou
vec3 H = normalize(eyedir + lightdir);
float NdotH = clamp(dot(normal, H), 0., 1.);
float normalisationFactor = (exponentroughness + 2.) / 8.;
vec3 FresnelSchlick = color + (1.0f - color) * pow(1.0f - clamp(dot(eyedir, H), 0., 1.), 5);
vec3 FresnelSchlick = color + (1.0f - color) * pow(1.0f - clamp(dot(eyedir, H), 0., 1.), 5.);
return max(pow(NdotH, exponentroughness) * FresnelSchlick * normalisationFactor, vec3(0.));
}
}

View File

@ -1,6 +1,6 @@
vec4 getPosFromUVDepth(vec3 uvDepth, mat4 InverseProjectionMatrix)
{
vec4 pos = 2.0 * vec4(uvDepth, 1.0) - 1.0f;
vec4 pos = 2.0 * vec4(uvDepth, 1.0) - 1.0;
pos.xy *= vec2(InverseProjectionMatrix[0][0], InverseProjectionMatrix[1][1]);
pos.zw = vec2(pos.z * InverseProjectionMatrix[2][2] + pos.w, pos.z * InverseProjectionMatrix[2][3] + pos.w);
pos /= pos.w;

View File

@ -0,0 +1,17 @@
vec3 rgbToHsv(vec3 c)
{
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
float d = q.x - min(q.w, q.y);
float e = 1.0e-10;
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}
vec3 hsvToRgb(vec3 c)
{
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}

View File

@ -118,7 +118,7 @@
<!-- The field od views for 1-4 player split screen. fov-3 is
actually not used (since 3 player split screen uses the
same layout as 4 player split screen) -->
<camera fov-1="80" fov-2="65" fov-3="50" fov-4="75" />
<camera fov-1="80" fov-2="65" fov-3="50" fov-4="75" cutscene-fov="0.61" />
<!-- disable-while-unskid: Disable steering when stop skidding during
the time it takes to adjust the physical body with the graphics.
@ -411,12 +411,8 @@
which leads to crash with STK), but the fonts are to blame, what's the point of not
using industry standard nowadays...
-->
<font default="Ubuntu-R.ttf"
default_fallback="FreeSans.ttf"
cjk="wqy-microhei.ttf"
ar="NotoNaskhArabicUI-Bold.ttf"
bold="Ubuntu-B.ttf"
bold_fallback="FreeSansBold.ttf"
digit="SigmarOne.otf" />
<fonts-list regular-faces="Cantarell-Regular.otf FreeSans.ttf wqy-microhei.ttf NotoNaskhArabicUI-Bold.ttf"
bold-faces="Cantarell-Bold.otf FreeSansBold.ttf"
digit-faces="SigmarOne.otf" />
</config>

BIN
data/ttf/Cantarell-Bold.otf Normal file

Binary file not shown.

Binary file not shown.

View File

@ -7,6 +7,6 @@ wqyMicroHei is released under the GPLv3 with font embedding exception and Apache
Noto Naskh Arabic UI is released under Apache-2.0 license
Ubuntu font is released under the ubuntu font license (http://font.ubuntu.com/licence/)
Cantarell font is released under the SIL open font license 1.1
SigmarOne is released under the SIL open font license 1.1 ( https://www.google.com/fonts/specimen/Sigmar+One )

Binary file not shown.

Binary file not shown.

View File

@ -1,96 +0,0 @@
-------------------------------
UBUNTU FONT LICENCE Version 1.0
-------------------------------
PREAMBLE
This licence allows the licensed fonts to be used, studied, modified and
redistributed freely. The fonts, including any derivative works, can be
bundled, embedded, and redistributed provided the terms of this licence
are met. The fonts and derivatives, however, cannot be released under
any other licence. The requirement for fonts to remain under this
licence does not require any document created using the fonts or their
derivatives to be published under this licence, as long as the primary
purpose of the document is not to be a vehicle for the distribution of
the fonts.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this licence and clearly marked as such. This may
include source files, build scripts and documentation.
"Original Version" refers to the collection of Font Software components
as received under this licence.
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to
a new environment.
"Copyright Holder(s)" refers to all individuals and companies who have a
copyright ownership of the Font Software.
"Substantially Changed" refers to Modified Versions which can be easily
identified as dissimilar to the Font Software by users of the Font
Software comparing the Original Version with the Modified Version.
To "Propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification and with or without charging
a redistribution fee), making available to the public, and in some
countries other activities as well.
PERMISSION & CONDITIONS
This licence does not grant any rights under trademark law and all such
rights are reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of the Font Software, to propagate the Font Software, subject to
the below conditions:
1) Each copy of the Font Software must contain the above copyright
notice and this licence. These can be included either as stand-alone
text files, human-readable headers or in the appropriate machine-
readable metadata fields within text or binary files as long as those
fields can be easily viewed by the user.
2) The font name complies with the following:
(a) The Original Version must retain its name, unmodified.
(b) Modified Versions which are Substantially Changed must be renamed to
avoid use of the name of the Original Version or similar names entirely.
(c) Modified Versions which are not Substantially Changed must be
renamed to both (i) retain the name of the Original Version and (ii) add
additional naming elements to distinguish the Modified Version from the
Original Version. The name of such Modified Versions must be the name of
the Original Version, with "derivative X" where X represents the name of
the new work, appended to that name.
3) The name(s) of the Copyright Holder(s) and any contributor to the
Font Software shall not be used to promote, endorse or advertise any
Modified Version, except (i) as required by this licence, (ii) to
acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with
their explicit written permission.
4) The Font Software, modified or unmodified, in part or in whole, must
be distributed entirely under this licence, and must not be distributed
under any other licence. The requirement for fonts to remain under this
licence does not affect any document created using the Font Software,
except any version of the Font Software extracted from a document
created using the Font Software may only be distributed under this
licence.
TERMINATION
This licence becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
DEALINGS IN THE FONT SOFTWARE.

View File

@ -17,6 +17,9 @@ subject to the following restrictions:
#include "SphereTriangleDetector.h"
#include "BulletCollision/CollisionShapes/btTriangleShape.h"
#include "BulletCollision/CollisionShapes/btSphereShape.h"
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
#include "BulletCollision/CollisionDispatch/btManifoldResult.h"
#include "BulletCollision/CollisionShapes/btTriangleShape.h"
SphereTriangleDetector::SphereTriangleDetector(btSphereShape* sphere,btTriangleShape* triangle,btScalar contactBreakingThreshold)
@ -43,6 +46,35 @@ void SphereTriangleDetector::getClosestPoints(const ClosestPointInput& input,Res
if (collide(sphereInTr.getOrigin(),point,normal,depth,timeOfImpact,m_contactBreakingThreshold))
{
// In some cases the normalInB is incorrect with a static triangle
// mesh (i.e. it's the connection point between puck and triangle, not
// the normal from the triangle - which is fine if the triangle mesh
// is a dynamic rigid body (i.e. can be pushed away), but appears to
// be wrong in case of a static body - it causes #2522 (puck suddenly
// pushed in air). So in case of a static triangle mesh, recompute
// the normal just based on the triangle mesh:
const btManifoldResult *mani = dynamic_cast<btManifoldResult*>(&output);
if(mani)
{
// Find the triangle:
const btCollisionObject *co = mani->getBody0Internal();
const btTriangleShape *tri = dynamic_cast<const btTriangleShape*>(co->getCollisionShape());
if(!tri)
{
co = mani->getBody1Internal();
tri = dynamic_cast<const btTriangleShape*>(co->getCollisionShape());
}
// If we have a triangle and it is static, recompute the normal
if(tri && co->isStaticOrKinematicObject())
{
normal = (tri->m_vertices1[1]-tri->m_vertices1[0])
.cross(tri->m_vertices1[2]-tri->m_vertices1[0]);
normal.normalize();;
}
}
if (swapResults)
{
btVector3 normalOnB = transformB.getBasis()*normal;

View File

@ -17,6 +17,9 @@ subject to the following restrictions:
#include "BulletCollision/CollisionShapes/btConvexShape.h"
#include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h"
#include "BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h"
#include "BulletCollision/CollisionDispatch/btManifoldResult.h"
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
#include "BulletCollision/CollisionShapes/btTriangleShape.h"
@ -441,6 +444,32 @@ void btGjkPairDetector::getClosestPointsNonVirtual(const ClosestPointInput& inpu
m_cachedSeparatingAxis = normalInB;
m_cachedSeparatingDistance = distance;
// In some cases the normalInB is incorrect with a static triangle
// mesh (i.e. it's the connection point between puck and triangle, not
// the normal from the triangle - which is fine if the triangle mesh
// is a dynamic rigid body (i.e. can be pushed away), but appears to
// be wrong in case of a static body - it causes #2522 (puck suddenly
// pushed in air). So in case of a static triangle mesh, recompute
// the normal just based on the triangle mesh:
const btManifoldResult *mani = dynamic_cast<btManifoldResult*>(&output);
if(mani)
{
// Find the triangle:
const btCollisionObject *co = mani->getBody0Internal();
const btTriangleShape *tri = dynamic_cast<const btTriangleShape*>(co->getCollisionShape());
if(!tri)
{
co = mani->getBody1Internal();
tri = dynamic_cast<const btTriangleShape*>(co->getCollisionShape());
}
// If we have a triangle and it is static, recompute the normal
if(tri && co->isStaticOrKinematicObject())
{
normalInB = (tri->m_vertices1[1]-tri->m_vertices1[0])
.cross(tri->m_vertices1[2]-tri->m_vertices1[0]);
normalInB.normalize();;
}
}
output.addContactPoint(
normalInB,
pointOnB+positionOffset,

View File

@ -10,10 +10,9 @@ endif()
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
add_definitions(-DGLEW_STATIC)
add_library(glew STATIC
include/GL/glew.h include/GL/glxew.h include/GL/wglew.h
src/glew.c src/glewinfo.c
)
add_definitions(-DGLEW_STATIC)
add_definitions(-DGLEW_NO_GLU)

View File

@ -8,8 +8,15 @@ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include/"
"${ZLIB_INCLUDE_DIR}"
"${CMAKE_CURRENT_BINARY_DIR}/../zlib/") # For zconf.h on WIN32
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
if(NOT USE_GLES2)
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
endif()
if (UNIX AND NOT APPLE)
find_package(X11 REQUIRED)
include_directories(${X11_INCLUDE_DIR})
endif()
if(APPLE)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/source/Irrlicht/MacOSX" "${CMAKE_CURRENT_SOURCE_DIR}/source/Irrlicht")
@ -25,8 +32,8 @@ elseif(MINGW)
add_definitions(-D_IRR_STATIC_LIB_)
add_definitions(-D_CRT_SECURE_NO_WARNINGS) # Shut up about unsafe stuff
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing -I/usr/X11R6/include")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing -I/usr/X11R6/include")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing")
if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexpensive-optimizations")
endif()
@ -35,6 +42,10 @@ else()
endif()
endif()
if(USE_GLES2)
add_definitions(-D_IRR_COMPILE_WITH_OGLES2_ -DNO_IRR_COMPILE_WITH_SOFTWARE_ -DNO_IRR_COMPILE_WITH_BURNINGSVIDEO_ -DNO_IRR_COMPILE_WITH_OGLES1_ -DNO_IRR_COMPILE_WITH_OPENGL_ -DNO_IRR_USE_NON_SYSTEM_JPEG_LIB_ -DNO_IRR_USE_NON_SYSTEM_LIB_PNG_ -DNO_IRR_USE_NON_SYSTEM_ZLIB_)
endif()
# Xrandr
if(UNIX AND USE_XRANDR)
add_definitions(-DNO_IRR_LINUX_X11_VIDMODE_)
@ -45,448 +56,470 @@ if(CYGWIN)
add_definitions(-DNO_IRR_COMPILE_WITH_JOYSTICK_EVENTS_)
endif()
set(IRRLICHT_SOURCES
source/Irrlicht/CGUIListBox.cpp
source/Irrlicht/CZBuffer.cpp
source/Irrlicht/CGUIModalScreen.cpp
source/Irrlicht/CParticleCylinderEmitter.cpp
source/Irrlicht/CLimitReadFile.cpp
source/Irrlicht/CVideoModeList.cpp
source/Irrlicht/CDefaultGUIElementFactory.cpp
source/Irrlicht/CCubeSceneNode.cpp
source/Irrlicht/CGUIMeshViewer.cpp
source/Irrlicht/CParticleSphereEmitter.cpp
source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.cpp
source/Irrlicht/CGUITabControl.cpp
source/Irrlicht/CGUIToolBar.cpp
source/Irrlicht/CTerrainTriangleSelector.cpp
source/Irrlicht/CFileSystem.cpp
source/Irrlicht/CTerrainSceneNode.cpp
source/Irrlicht/os.cpp
source/Irrlicht/CFPSCounter.cpp
source/Irrlicht/CGUIContextMenu.cpp
source/Irrlicht/CImageWriterJPG.cpp
source/Irrlicht/CZipReader.cpp
source/Irrlicht/CImageLoaderPNG.cpp
source/Irrlicht/CImageLoaderBMP.cpp
source/Irrlicht/CDefaultSceneNodeAnimatorFactory.cpp
source/Irrlicht/CSkyDomeSceneNode.cpp
source/Irrlicht/CGUIFileOpenDialog.cpp
source/Irrlicht/CGUISpriteBank.cpp
source/Irrlicht/CParticleFadeOutAffector.cpp
source/Irrlicht/CGUIMenu.cpp
source/Irrlicht/CSphereSceneNode.cpp
source/Irrlicht/CImageWriterPNG.cpp
source/Irrlicht/CSceneNodeAnimatorFollowSpline.cpp
source/Irrlicht/CGUIMessageBox.cpp
source/Irrlicht/CParticleGravityAffector.cpp
source/Irrlicht/CGUISkin.cpp
source/Irrlicht/CBoneSceneNode.cpp
source/Irrlicht/COpenGLSLMaterialRenderer.cpp
source/Irrlicht/CParticleRotationAffector.cpp
source/Irrlicht/CTriangleBBSelector.cpp
source/Irrlicht/CGUIComboBox.cpp
source/Irrlicht/CSceneNodeAnimatorTexture.cpp
source/Irrlicht/COpenGLTexture.cpp
source/Irrlicht/COctreeSceneNode.cpp
source/Irrlicht/CWaterSurfaceSceneNode.cpp
source/Irrlicht/CParticleAttractionAffector.cpp
source/Irrlicht/CMeshSceneNode.cpp
source/Irrlicht/CGUIScrollBar.cpp
source/Irrlicht/CAttributes.cpp
source/Irrlicht/CGUIStaticText.cpp
source/Irrlicht/CSceneNodeAnimatorCollisionResponse.cpp
source/Irrlicht/CGUIFont.cpp
source/Irrlicht/CTriangleSelector.cpp
source/Irrlicht/CParticlePointEmitter.cpp
source/Irrlicht/CTextSceneNode.cpp
source/Irrlicht/CIrrDeviceLinux.cpp
source/Irrlicht/CIrrDeviceStub.cpp
source/Irrlicht/CGUIInOutFader.cpp
source/Irrlicht/CGUITreeView.cpp
source/Irrlicht/CAnimatedMeshSceneNode.cpp
source/Irrlicht/CGUICheckBox.cpp
source/Irrlicht/CGUIWindow.cpp
source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp
source/Irrlicht/CSceneNodeAnimatorFlyCircle.cpp
source/Irrlicht/CColorConverter.cpp
source/Irrlicht/CMeshCache.cpp
source/Irrlicht/CIrrDeviceFB.cpp
source/Irrlicht/CMemoryFile.cpp
source/Irrlicht/CMountPointReader.cpp
source/Irrlicht/CBillboardSceneNode.cpp
source/Irrlicht/CGUIImageList.cpp
source/Irrlicht/CSceneCollisionManager.cpp
source/Irrlicht/CIrrDeviceWin32.cpp
source/Irrlicht/CEmptySceneNode.cpp
source/Irrlicht/CParticleBoxEmitter.cpp
source/Irrlicht/CParticleSystemSceneNode.cpp
source/Irrlicht/CIrrDeviceConsole.cpp
source/Irrlicht/CImage.cpp
source/Irrlicht/CTarReader.cpp
source/Irrlicht/CGUIButton.cpp
source/Irrlicht/COpenGLParallaxMapRenderer.cpp
source/Irrlicht/CGUIEditBox.cpp
source/Irrlicht/CLogger.cpp
source/Irrlicht/CMeshManipulator.cpp
source/Irrlicht/CLightSceneNode.cpp
source/Irrlicht/CSkyBoxSceneNode.cpp
source/Irrlicht/CWriteFile.cpp
source/Irrlicht/COctreeTriangleSelector.cpp
source/Irrlicht/CFileList.cpp
source/Irrlicht/CIrrDeviceSDL.cpp
source/Irrlicht/COSOperator.cpp
source/Irrlicht/CImageLoaderJPG.cpp
source/Irrlicht/COpenGLExtensionHandler.cpp
source/Irrlicht/CXMLWriter.cpp
source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp
source/Irrlicht/CGUIColorSelectDialog.cpp
source/Irrlicht/CSceneManager.cpp
source/Irrlicht/Irrlicht.cpp
source/Irrlicht/COpenGLShaderMaterialRenderer.cpp
source/Irrlicht/COpenGLDriver.cpp
source/Irrlicht/CSceneNodeAnimatorFlyStraight.cpp
source/Irrlicht/irrXML.cpp
source/Irrlicht/CSkinnedMesh.cpp
source/Irrlicht/CXMLReader.cpp
source/Irrlicht/CDummyTransformationSceneNode.cpp
source/Irrlicht/CGUITable.cpp
source/Irrlicht/CAttributes.cpp
source/Irrlicht/CB3DMeshFileLoader.cpp
source/Irrlicht/CGeometryCreator.cpp
source/Irrlicht/CNullDriver.cpp
source/Irrlicht/CBillboardSceneNode.cpp
source/Irrlicht/CBoneSceneNode.cpp
source/Irrlicht/CCameraSceneNode.cpp
source/Irrlicht/CGUISpinBox.cpp
source/Irrlicht/CReadFile.cpp
source/Irrlicht/CParticleRingEmitter.cpp
source/Irrlicht/CMetaTriangleSelector.cpp
source/Irrlicht/CColorConverter.cpp
source/Irrlicht/CCubeSceneNode.cpp
source/Irrlicht/CDefaultGUIElementFactory.cpp
source/Irrlicht/CDefaultSceneNodeAnimatorFactory.cpp
source/Irrlicht/CDefaultSceneNodeFactory.cpp
source/Irrlicht/CGUIImage.cpp
source/Irrlicht/CDummyTransformationSceneNode.cpp
source/Irrlicht/CEmptySceneNode.cpp
source/Irrlicht/CFileList.cpp
source/Irrlicht/CFileSystem.cpp
source/Irrlicht/CFPSCounter.cpp
source/Irrlicht/CGeometryCreator.cpp
source/Irrlicht/CGUIButton.cpp
source/Irrlicht/CGUICheckBox.cpp
source/Irrlicht/CGUIColorSelectDialog.cpp
source/Irrlicht/CGUIComboBox.cpp
source/Irrlicht/CGUIContextMenu.cpp
source/Irrlicht/CGUIEditBox.cpp
source/Irrlicht/CGUIEnvironment.cpp
source/Irrlicht/CParticleScaleAffector.cpp
source/Irrlicht/CSceneNodeAnimatorDelete.cpp
source/Irrlicht/CGUIFileOpenDialog.cpp
source/Irrlicht/CGUIFont.cpp
source/Irrlicht/CGUIImage.cpp
source/Irrlicht/CGUIImageList.cpp
source/Irrlicht/CGUIInOutFader.cpp
source/Irrlicht/CGUIListBox.cpp
source/Irrlicht/CGUIMenu.cpp
source/Irrlicht/CGUIMeshViewer.cpp
source/Irrlicht/CGUIMessageBox.cpp
source/Irrlicht/CGUIModalScreen.cpp
source/Irrlicht/CGUIScrollBar.cpp
source/Irrlicht/CGUISkin.cpp
source/Irrlicht/CGUISpinBox.cpp
source/Irrlicht/CGUISpriteBank.cpp
source/Irrlicht/CGUIStaticText.cpp
source/Irrlicht/CGUITabControl.cpp
source/Irrlicht/CGUITable.cpp
source/Irrlicht/CGUIToolBar.cpp
source/Irrlicht/CGUITreeView.cpp
source/Irrlicht/CGUIWindow.cpp
source/Irrlicht/CImage.cpp
source/Irrlicht/CImageLoaderBMP.cpp
source/Irrlicht/CImageLoaderJPG.cpp
source/Irrlicht/CImageLoaderPNG.cpp
source/Irrlicht/CImageWriterBMP.cpp
source/Irrlicht/CImageWriterJPG.cpp
source/Irrlicht/CImageWriterPNG.cpp
source/Irrlicht/CIrrDeviceConsole.cpp
source/Irrlicht/CIrrDeviceFB.cpp
source/Irrlicht/CIrrDeviceLinux.cpp
source/Irrlicht/CIrrDeviceSDL.cpp
source/Irrlicht/CIrrDeviceStub.cpp
source/Irrlicht/CIrrDeviceWin32.cpp
source/Irrlicht/CLightSceneNode.cpp
source/Irrlicht/CLimitReadFile.cpp
source/Irrlicht/CLogger.cpp
source/Irrlicht/CMemoryFile.cpp
source/Irrlicht/CMeshCache.cpp
source/Irrlicht/CMeshManipulator.cpp
source/Irrlicht/CMeshSceneNode.cpp
source/Irrlicht/CMetaTriangleSelector.cpp
source/Irrlicht/CMountPointReader.cpp
source/Irrlicht/CNullDriver.cpp
source/Irrlicht/COctreeSceneNode.cpp
source/Irrlicht/COctreeTriangleSelector.cpp
source/Irrlicht/COGLES2Driver.cpp
source/Irrlicht/COGLES2ExtensionHandler.cpp
source/Irrlicht/COGLES2FixedPipelineRenderer.cpp
source/Irrlicht/COGLES2MaterialRenderer.cpp
source/Irrlicht/COGLES2NormalMapRenderer.cpp
source/Irrlicht/COGLES2ParallaxMapRenderer.cpp
source/Irrlicht/COGLES2Renderer2D.cpp
source/Irrlicht/COGLES2Texture.cpp
source/Irrlicht/COpenGLDriver.cpp
source/Irrlicht/COpenGLExtensionHandler.cpp
source/Irrlicht/COpenGLParallaxMapRenderer.cpp
source/Irrlicht/COpenGLShaderMaterialRenderer.cpp
source/Irrlicht/COpenGLSLMaterialRenderer.cpp
source/Irrlicht/COpenGLTexture.cpp
source/Irrlicht/COSOperator.cpp
source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.cpp
source/Irrlicht/CParticleAttractionAffector.cpp
source/Irrlicht/CParticleBoxEmitter.cpp
source/Irrlicht/CParticleCylinderEmitter.cpp
source/Irrlicht/CParticleFadeOutAffector.cpp
source/Irrlicht/CParticleGravityAffector.cpp
source/Irrlicht/CParticleMeshEmitter.cpp
source/Irrlicht/CParticlePointEmitter.cpp
source/Irrlicht/CParticleRingEmitter.cpp
source/Irrlicht/CParticleRotationAffector.cpp
source/Irrlicht/CParticleScaleAffector.cpp
source/Irrlicht/CParticleSphereEmitter.cpp
source/Irrlicht/CParticleSystemSceneNode.cpp
source/Irrlicht/CReadFile.cpp
source/Irrlicht/CSceneCollisionManager.cpp
source/Irrlicht/CSceneManager.cpp
source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp
source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp
source/Irrlicht/CSceneNodeAnimatorCollisionResponse.cpp
source/Irrlicht/CSceneNodeAnimatorDelete.cpp
source/Irrlicht/CSceneNodeAnimatorFlyCircle.cpp
source/Irrlicht/CSceneNodeAnimatorFlyStraight.cpp
source/Irrlicht/CSceneNodeAnimatorFollowSpline.cpp
source/Irrlicht/CSceneNodeAnimatorRotation.cpp
source/Irrlicht/glext.h
source/Irrlicht/CB3DMeshFileLoader.h
source/Irrlicht/CIrrDeviceLinux.h
source/Irrlicht/CMeshCache.h
source/Irrlicht/CSceneNodeAnimatorTexture.cpp
source/Irrlicht/CSkinnedMesh.cpp
source/Irrlicht/CSkyBoxSceneNode.cpp
source/Irrlicht/CSkyDomeSceneNode.cpp
source/Irrlicht/CSphereSceneNode.cpp
source/Irrlicht/CTarReader.cpp
source/Irrlicht/CTerrainSceneNode.cpp
source/Irrlicht/CTerrainTriangleSelector.cpp
source/Irrlicht/CTextSceneNode.cpp
source/Irrlicht/CTriangleBBSelector.cpp
source/Irrlicht/CTriangleSelector.cpp
source/Irrlicht/CVideoModeList.cpp
source/Irrlicht/CWaterSurfaceSceneNode.cpp
source/Irrlicht/CWriteFile.cpp
source/Irrlicht/CXMLReader.cpp
source/Irrlicht/CXMLWriter.cpp
source/Irrlicht/CZBuffer.cpp
source/Irrlicht/CZipReader.cpp
source/Irrlicht/Irrlicht.cpp
source/Irrlicht/irrXML.cpp
source/Irrlicht/os.cpp
source/Irrlicht/BuiltInFont.h
source/Irrlicht/CAnimatedMeshSceneNode.h
source/Irrlicht/CAttributeImpl.h
source/Irrlicht/CAttributes.h
source/Irrlicht/CB3DMeshFileLoader.h
source/Irrlicht/CBillboardSceneNode.h
source/Irrlicht/CBlit.h
source/Irrlicht/CBoneSceneNode.h
source/Irrlicht/CCameraSceneNode.h
source/Irrlicht/CColorConverter.h
source/Irrlicht/CCubeSceneNode.h
source/Irrlicht/CDefaultGUIElementFactory.h
source/Irrlicht/CDefaultSceneNodeAnimatorFactory.h
source/Irrlicht/CDefaultSceneNodeFactory.h
source/Irrlicht/CDummyTransformationSceneNode.h
source/Irrlicht/CEmptySceneNode.h
source/Irrlicht/CFileList.h
source/Irrlicht/CFileSystem.h
source/Irrlicht/CFPSCounter.h
source/Irrlicht/CGeometryCreator.h
source/Irrlicht/CGUIButton.h
source/Irrlicht/CGUICheckBox.h
source/Irrlicht/CGUIColorSelectDialog.h
source/Irrlicht/CGUIComboBox.h
source/Irrlicht/CGUIContextMenu.h
source/Irrlicht/CGUIEditBox.h
source/Irrlicht/CGUIEnvironment.h
source/Irrlicht/CGUIFileOpenDialog.h
source/Irrlicht/CGUIFont.h
source/Irrlicht/CGUIImage.h
source/Irrlicht/CGUIImageList.h
source/Irrlicht/CGUIInOutFader.h
source/Irrlicht/CGUIListBox.h
source/Irrlicht/CGUIMenu.h
source/Irrlicht/CGUIMeshViewer.h
source/Irrlicht/CGUIMessageBox.h
source/Irrlicht/CGUIModalScreen.h
source/Irrlicht/CGUIScrollBar.h
source/Irrlicht/CGUISkin.h
source/Irrlicht/CGUISpinBox.h
source/Irrlicht/CGUISpriteBank.h
source/Irrlicht/CGUIStaticText.h
source/Irrlicht/CGUITabControl.h
source/Irrlicht/CGUITable.h
source/Irrlicht/CGUIToolBar.h
source/Irrlicht/CGUITreeView.h
source/Irrlicht/CGUIWindow.h
source/Irrlicht/CImage.h
source/Irrlicht/CImageLoaderBMP.h
source/Irrlicht/CImageLoaderJPG.h
source/Irrlicht/CImageLoaderPNG.h
source/Irrlicht/CImageWriterBMP.h
source/Irrlicht/CImageWriterJPG.h
source/Irrlicht/CImageWriterPNG.h
source/Irrlicht/CIrrDeviceConsole.h
source/Irrlicht/CIrrDeviceFB.h
source/Irrlicht/CIrrDeviceLinux.h
source/Irrlicht/CIrrDeviceSDL.h
source/Irrlicht/CIrrDeviceStub.h
source/Irrlicht/CIrrDeviceWin32.h
source/Irrlicht/CLightSceneNode.h
source/Irrlicht/CLimitReadFile.h
source/Irrlicht/CLogger.h
source/Irrlicht/CMemoryFile.h
source/Irrlicht/CMeshCache.h
source/Irrlicht/CMeshManipulator.h
source/Irrlicht/CMeshSceneNode.h
source/Irrlicht/CMetaTriangleSelector.h
source/Irrlicht/CMountPointReader.h
source/Irrlicht/CNullDriver.h
source/Irrlicht/COctreeSceneNode.h
source/Irrlicht/COctreeTriangleSelector.h
source/Irrlicht/COGLES2Driver.h
source/Irrlicht/COGLES2ExtensionHandler.h
source/Irrlicht/COGLES2FixedPipelineRenderer.h
source/Irrlicht/COGLES2MaterialRenderer.h
source/Irrlicht/COGLES2NormalMapRenderer.h
source/Irrlicht/COGLES2ParallaxMapRenderer.h
source/Irrlicht/COGLES2Renderer2D.h
source/Irrlicht/COGLES2Texture.h
source/Irrlicht/COpenGLDriver.h
source/Irrlicht/COpenGLExtensionHandler.h
source/Irrlicht/COpenGLMaterialRenderer.h
source/Irrlicht/COpenGLParallaxMapRenderer.h
source/Irrlicht/COpenGLShaderMaterialRenderer.h
source/Irrlicht/COpenGLSLMaterialRenderer.h
source/Irrlicht/COpenGLTexture.h
source/Irrlicht/COSOperator.h
source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.h
source/Irrlicht/CParticleAttractionAffector.h
source/Irrlicht/CParticleBoxEmitter.h
source/Irrlicht/CParticleCylinderEmitter.h
source/Irrlicht/CParticleFadeOutAffector.h
source/Irrlicht/CParticleGravityAffector.h
source/Irrlicht/CParticleMeshEmitter.h
source/Irrlicht/CParticlePointEmitter.h
source/Irrlicht/CParticleRotationAffector.h
source/Irrlicht/CMountPointReader.h
source/Irrlicht/CIrrDeviceConsole.h
source/Irrlicht/CTerrainSceneNode.h
source/Irrlicht/CSceneNodeAnimatorCollisionResponse.h
source/Irrlicht/CImageLoaderBMP.h
source/Irrlicht/CSkinnedMesh.h
source/Irrlicht/COpenGLParallaxMapRenderer.h
source/Irrlicht/CParticleRingEmitter.h
source/Irrlicht/COpenGLShaderMaterialRenderer.h
source/Irrlicht/CImageLoaderPNG.h
source/Irrlicht/COctreeTriangleSelector.h
source/Irrlicht/COpenGLTexture.h
source/Irrlicht/Octree.h
source/Irrlicht/os.h
source/Irrlicht/CDefaultGUIElementFactory.h
source/Irrlicht/CSceneNodeAnimatorFlyCircle.h
source/Irrlicht/CTriangleBBSelector.h
source/Irrlicht/S2DVertex.h
source/Irrlicht/CDefaultSceneNodeAnimatorFactory.h
source/Irrlicht/CGUIMessageBox.h
source/Irrlicht/CBoneSceneNode.h
source/Irrlicht/CGUITable.h
source/Irrlicht/CGUIColorSelectDialog.h
source/Irrlicht/CCubeSceneNode.h
source/Irrlicht/resource.h
source/Irrlicht/CSceneNodeAnimatorCameraMaya.h
source/Irrlicht/SoftwareDriver2_helper.h
source/Irrlicht/CGUIWindow.h
source/Irrlicht/dmfsupport.h
source/Irrlicht/CGUICheckBox.h
source/Irrlicht/CMeshManipulator.h
source/Irrlicht/IImagePresenter.h
source/Irrlicht/CGUIMeshViewer.h
source/Irrlicht/CMeshSceneNode.h
source/Irrlicht/CGUIImage.h
source/Irrlicht/CCameraSceneNode.h
source/Irrlicht/IZBuffer.h
source/Irrlicht/CAnimatedMeshSceneNode.h
source/Irrlicht/CGUIStaticText.h
source/Irrlicht/wglext.h
source/Irrlicht/CTimer.h
source/Irrlicht/CParticleRotationAffector.h
source/Irrlicht/CParticleScaleAffector.h
source/Irrlicht/CParticleSphereEmitter.h
source/Irrlicht/CParticleSystemSceneNode.h
source/Irrlicht/CReadFile.h
source/Irrlicht/CSceneCollisionManager.h
source/Irrlicht/CSceneManager.h
source/Irrlicht/CSceneNodeAnimatorCameraFPS.h
source/Irrlicht/CParticleFadeOutAffector.h
source/Irrlicht/COpenGLSLMaterialRenderer.h
source/Irrlicht/CParticleAttractionAffector.h
source/Irrlicht/CSceneNodeAnimatorCameraMaya.h
source/Irrlicht/CSceneNodeAnimatorCollisionResponse.h
source/Irrlicht/CSceneNodeAnimatorDelete.h
source/Irrlicht/CSceneNodeAnimatorFlyCircle.h
source/Irrlicht/CSceneNodeAnimatorFlyStraight.h
source/Irrlicht/CSceneNodeAnimatorFollowSpline.h
source/Irrlicht/CSceneNodeAnimatorRotation.h
source/Irrlicht/CSceneNodeAnimatorTexture.h
source/Irrlicht/CSkinnedMesh.h
source/Irrlicht/CSkyBoxSceneNode.h
source/Irrlicht/CSkyDomeSceneNode.h
source/Irrlicht/CSphereSceneNode.h
source/Irrlicht/CTarReader.h
source/Irrlicht/CTerrainSceneNode.h
source/Irrlicht/CTerrainTriangleSelector.h
source/Irrlicht/CTextSceneNode.h
source/Irrlicht/CTimer.h
source/Irrlicht/CTriangleBBSelector.h
source/Irrlicht/CTriangleSelector.h
source/Irrlicht/CVideoModeList.h
source/Irrlicht/CWaterSurfaceSceneNode.h
source/Irrlicht/CWriteFile.h
source/Irrlicht/CXMLReader.h
source/Irrlicht/CXMLReaderImpl.h
source/Irrlicht/CXMLWriter.h
source/Irrlicht/CZBuffer.h
source/Irrlicht/CZipReader.h
source/Irrlicht/dmfsupport.h
source/Irrlicht/gles2-ext.h
source/Irrlicht/glext.h
source/Irrlicht/glxext.h
source/Irrlicht/IAttribute.h
source/Irrlicht/IImagePresenter.h
source/Irrlicht/ISceneNodeAnimatorFinishing.h
source/Irrlicht/ITriangleRenderer.h
source/Irrlicht/IZBuffer.h
source/Irrlicht/MacOSX/AppDelegate.h
source/Irrlicht/MacOSX/CIrrDeviceMacOSX.h
source/Irrlicht/MacOSX/OSXClipboard.h
source/Irrlicht/CSceneManager.h
source/Irrlicht/COpenGLDriver.h
source/Irrlicht/CGUIComboBox.h
source/Irrlicht/CSceneCollisionManager.h
source/Irrlicht/ISceneNodeAnimatorFinishing.h
source/Irrlicht/CGUITabControl.h
source/Irrlicht/CSphereSceneNode.h
source/Irrlicht/CIrrDeviceStub.h
source/Irrlicht/CDummyTransformationSceneNode.h
source/Irrlicht/CParticleBoxEmitter.h
source/Irrlicht/COctreeSceneNode.h
source/Irrlicht/CReadFile.h
source/Irrlicht/COSOperator.h
source/Irrlicht/CLightSceneNode.h
source/Irrlicht/CParticleSphereEmitter.h
source/Irrlicht/CZBuffer.h
source/Irrlicht/CImage.h
source/Irrlicht/CIrrDeviceWin32.h
source/Irrlicht/CGUIEditBox.h
source/Irrlicht/CGUISpriteBank.h
source/Irrlicht/CSceneNodeAnimatorFlyStraight.h
source/Irrlicht/COpenGLExtensionHandler.h
source/Irrlicht/CGUIScrollBar.h
source/Irrlicht/CTriangleSelector.h
source/Irrlicht/CParticleGravityAffector.h
source/Irrlicht/CGUIModalScreen.h
source/Irrlicht/CDefaultSceneNodeFactory.h
source/Irrlicht/CXMLReaderImpl.h
source/Irrlicht/COpenGLMaterialRenderer.h
source/Irrlicht/CVideoModeList.h
source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.h
source/Irrlicht/CColorConverter.h
source/Irrlicht/CWaterSurfaceSceneNode.h
source/Irrlicht/SoftwareDriver2_compile_config.h
source/Irrlicht/CSceneNodeAnimatorTexture.h
source/Irrlicht/CXMLReader.h
source/Irrlicht/CEmptySceneNode.h
source/Irrlicht/CParticleSystemSceneNode.h
source/Irrlicht/CImageWriterPNG.h
source/Irrlicht/CParticleScaleAffector.h
source/Irrlicht/CImageLoaderJPG.h
source/Irrlicht/CBillboardSceneNode.h
source/Irrlicht/CIrrDeviceSDL.h
source/Irrlicht/CSkyDomeSceneNode.h
source/Irrlicht/CGUIInOutFader.h
source/Irrlicht/CGUIFont.h
source/Irrlicht/CGUIImageList.h
source/Irrlicht/CFileSystem.h
source/Irrlicht/CSceneNodeAnimatorRotation.h
source/Irrlicht/CGUISkin.h
source/Irrlicht/Octree.h
source/Irrlicht/os.h
source/Irrlicht/resource.h
source/Irrlicht/S2DVertex.h
source/Irrlicht/S4DVertex.h
source/Irrlicht/CGUIMenu.h
source/Irrlicht/CBlit.h
source/Irrlicht/CZipReader.h
source/Irrlicht/CGUIToolBar.h
source/Irrlicht/CImageWriterJPG.h
source/Irrlicht/IAttribute.h
source/Irrlicht/CNullDriver.h
source/Irrlicht/CWriteFile.h
source/Irrlicht/CSceneNodeAnimatorFollowSpline.h
source/Irrlicht/glxext.h
source/Irrlicht/CMetaTriangleSelector.h
source/Irrlicht/CTarReader.h
source/Irrlicht/CXMLWriter.h
source/Irrlicht/CParticleCylinderEmitter.h
source/Irrlicht/ITriangleRenderer.h
source/Irrlicht/CSceneNodeAnimatorDelete.h
source/Irrlicht/CIrrDeviceFB.h
source/Irrlicht/CGUIEnvironment.h
source/Irrlicht/CTerrainTriangleSelector.h
source/Irrlicht/CAttributeImpl.h
source/Irrlicht/CGeometryCreator.h
source/Irrlicht/CSkyBoxSceneNode.h
source/Irrlicht/CImageWriterBMP.h
source/Irrlicht/BuiltInFont.h
source/Irrlicht/CMemoryFile.h
source/Irrlicht/CFPSCounter.h
source/Irrlicht/CGUITreeView.h
source/Irrlicht/CGUIContextMenu.h
source/Irrlicht/CFileList.h
source/Irrlicht/CLimitReadFile.h
source/Irrlicht/CGUISpinBox.h
source/Irrlicht/CGUIButton.h
source/Irrlicht/CGUIListBox.h
source/Irrlicht/CGUIFileOpenDialog.h
source/Irrlicht/CTextSceneNode.h
source/Irrlicht/SoftwareDriver2_compile_config.h
source/Irrlicht/SoftwareDriver2_helper.h
source/Irrlicht/wglext.h
include/ESceneNodeAnimatorTypes.h
include/IParticleGravityAffector.h
include/IGUIFontBitmap.h
include/IEventReceiver.h
include/EMessageBoxFlags.h
include/IParticleSphereEmitter.h
include/IParticleFadeOutAffector.h
include/IGeometryCreator.h
include/IGUIEnvironment.h
include/irrunpack.h
include/IParticleRingEmitter.h
include/IGUIElement.h
include/IMaterialRenderer.h
include/SVertexIndex.h
include/SMaterialLayer.h
include/irrMap.h
include/EMaterialTypes.h
include/IAnimatedMeshSceneNode.h
include/IParticleCylinderEmitter.h
include/IAttributeExchangingObject.h
include/IVertexBuffer.h
include/ISkinnedMesh.h
include/irrList.h
include/SAnimatedMesh.h
include/IGUITreeView.h
include/IGUIFont.h
include/IGUIElementFactory.h
include/IParticleSystemSceneNode.h
include/ITerrainSceneNode.h
include/SMeshBuffer.h
include/IGUIEditBox.h
include/ILogger.h
include/ILightManager.h
include/IMeshBuffer.h
include/irrlicht.h
include/ITimer.h
include/IImage.h
include/position2d.h
include/IGUIToolbar.h
include/IGUISpinBox.h
include/IGUITabControl.h
include/IBillboardTextSceneNode.h
include/IGUIInOutFader.h
include/path.h
include/IMetaTriangleSelector.h
include/ISceneUserDataSerializer.h
include/irrArray.h
include/irrString.h
include/IMesh.h
include/line3d.h
include/IMeshLoader.h
include/aabbox3d.h
include/CMeshBuffer.h
include/ETerrainElements.h
include/EDebugSceneTypes.h
include/driverChoice.h
include/IParticleAttractionAffector.h
include/IGUISpriteBank.h
include/IGUISkin.h
include/irrAllocator.h
include/IDummyTransformationSceneNode.h
include/SSkinMeshBuffer.h
include/ISceneLoader.h
include/IrrlichtDevice.h
include/IMaterialRendererServices.h
include/SColor.h
include/IXMLWriter.h
include/CDynamicMeshBuffer.h
include/IFileArchive.h
include/IGUIContextMenu.h
include/IVideoDriver.h
include/irrMath.h
include/ISceneNode.h
include/line2d.h
include/irrpack.h
include/plane3d.h
include/ISceneManager.h
include/IImageWriter.h
include/EGUIElementTypes.h
include/IParticleMeshEmitter.h
include/IGUIColorSelectDialog.h
include/IGUIImage.h
include/IGUIListBox.h
include/vector2d.h
include/CIndexBuffer.h
include/IAnimatedMesh.h
include/SMaterial.h
include/rect.h
include/EDriverFeatures.h
include/IVideoModeList.h
include/fast_atof.h
include/IGUICheckBox.h
include/ISceneNodeAnimatorFactory.h
include/SVertexManipulator.h
include/ITextSceneNode.h
include/IDynamicMeshBuffer.h
include/SExposedVideoData.h
include/IReferenceCounted.h
include/irrXML.h
include/SKeyMap.h
include/ECullingTypes.h
include/IBillboardSceneNode.h
include/ITriangleSelector.h
include/CMeshBuffer.h
include/coreutil.h
include/SMeshBufferTangents.h
include/ILightSceneNode.h
include/dimension2d.h
include/ISceneCollisionManager.h
include/heapsort.h
include/IGUIComboBox.h
include/Keycodes.h
include/SParticle.h
include/EDriverTypes.h
include/IFileSystem.h
include/SMesh.h
include/IParticleAffector.h
include/IGUIImageList.h
include/EShaderTypes.h
include/SceneParameters.h
include/IGUIScrollBar.h
include/IImageLoader.h
include/IParticleBoxEmitter.h
include/ICursorControl.h
include/ICameraSceneNode.h
include/ISceneNodeAnimatorCameraMaya.h
include/IMeshManipulator.h
include/CVertexBuffer.h
include/SSharedMeshBuffer.h
include/vector3d.h
include/ISceneNodeAnimatorCameraFPS.h
include/IGUIMeshViewer.h
include/triangle3d.h
include/matrix4.h
include/IGUIStaticText.h
include/IMeshWriter.h
include/IMeshSceneNode.h
include/IParticleAnimatedMeshSceneNodeEmitter.h
include/IMeshCache.h
include/EMeshWriterEnums.h
include/EPrimitiveTypes.h
include/SViewFrustum.h
include/IXMLReader.h
include/EHardwareBufferFlags.h
include/IOSOperator.h
include/IGPUProgrammingServices.h
include/IrrCompileConfig.h
include/ISceneNodeFactory.h
include/IGUITable.h
include/IGUIButton.h
include/EMaterialFlags.h
include/EDeviceTypes.h
include/IGUIWindow.h
include/dimension2d.h
include/driverChoice.h
include/EAttributes.h
include/S3DVertex.h
include/ISceneNodeAnimatorCollisionResponse.h
include/IWriteFile.h
include/irrTypes.h
include/IParticleEmitter.h
include/quaternion.h
include/SLight.h
include/IReadFile.h
include/ESceneNodeTypes.h
include/IIndexBuffer.h
include/ECullingTypes.h
include/EDebugSceneTypes.h
include/EDeviceTypes.h
include/EDriverFeatures.h
include/EDriverTypes.h
include/EGUIAlignment.h
include/SIrrCreationParameters.h
include/IFileList.h
include/SMeshBufferLightMap.h
include/IRandomizer.h
include/ISceneNodeAnimator.h
include/EGUIElementTypes.h
include/EHardwareBufferFlags.h
include/EMaterialFlags.h
include/EMaterialTypes.h
include/EMeshWriterEnums.h
include/EMessageBoxFlags.h
include/EPrimitiveTypes.h
include/ESceneNodeAnimatorTypes.h
include/ESceneNodeTypes.h
include/EShaderTypes.h
include/ETerrainElements.h
include/EVertexAttributes.h
include/fast_atof.h
include/heapsort.h
include/IAnimatedMesh.h
include/IAnimatedMeshSceneNode.h
include/IAttributeExchangingObject.h
include/IAttributes.h
include/IParticleRotationAffector.h
include/IGUIFileOpenDialog.h
include/IBillboardSceneNode.h
include/IBillboardTextSceneNode.h
include/IBoneSceneNode.h
include/ICameraSceneNode.h
include/ICursorControl.h
include/IDummyTransformationSceneNode.h
include/IDynamicMeshBuffer.h
include/IEventReceiver.h
include/IFileArchive.h
include/IFileList.h
include/IFileSystem.h
include/IGeometryCreator.h
include/IGPUProgrammingServices.h
include/IGUIButton.h
include/IGUICheckBox.h
include/IGUIColorSelectDialog.h
include/IGUIComboBox.h
include/IGUIContextMenu.h
include/IGUIEditBox.h
include/IGUIElementFactory.h
include/IGUIElement.h
include/IGUIEnvironment.h
include/IGUIFileOpenDialog.h
include/IGUIFontBitmap.h
include/IGUIFont.h
include/IGUIImage.h
include/IGUIImageList.h
include/IGUIInOutFader.h
include/IGUIListBox.h
include/IGUIMeshViewer.h
include/IGUIScrollBar.h
include/IGUISkin.h
include/IGUISpinBox.h
include/IGUISpriteBank.h
include/IGUIStaticText.h
include/IGUITabControl.h
include/IGUITable.h
include/IGUIToolbar.h
include/IGUITreeView.h
include/IGUIWindow.h
include/IImage.h
include/IImageLoader.h
include/IImageWriter.h
include/IIndexBuffer.h
include/ILightManager.h
include/ILightSceneNode.h
include/ILogger.h
include/IMaterialRenderer.h
include/IMaterialRendererServices.h
include/IMeshBuffer.h
include/IMeshCache.h
include/IMesh.h
include/IMeshLoader.h
include/IMeshManipulator.h
include/IMeshSceneNode.h
include/IMeshWriter.h
include/IMetaTriangleSelector.h
include/IOSOperator.h
include/IParticleAffector.h
include/IParticleAnimatedMeshSceneNodeEmitter.h
include/IParticleAttractionAffector.h
include/IParticleBoxEmitter.h
include/IParticleCylinderEmitter.h
include/IParticleEmitter.h
include/IParticleFadeOutAffector.h
include/IParticleGravityAffector.h
include/IParticleMeshEmitter.h
include/IParticleRingEmitter.h
include/IParticleRotationAffector.h
include/IParticleSphereEmitter.h
include/IParticleSystemSceneNode.h
include/IRandomizer.h
include/IReadFile.h
include/IReferenceCounted.h
include/irrAllocator.h
include/irrArray.h
include/IrrCompileConfig.h
include/IrrlichtDevice.h
include/irrlicht.h
include/irrList.h
include/irrMap.h
include/irrMath.h
include/irrpack.h
include/irrString.h
include/irrTypes.h
include/irrunpack.h
include/irrXML.h
include/ISceneCollisionManager.h
include/ISceneLoader.h
include/ISceneManager.h
include/ISceneNodeAnimatorCameraFPS.h
include/ISceneNodeAnimatorCameraMaya.h
include/ISceneNodeAnimatorCollisionResponse.h
include/ISceneNodeAnimatorFactory.h
include/ISceneNodeAnimator.h
include/ISceneNodeFactory.h
include/ISceneNode.h
include/ISceneUserDataSerializer.h
include/IShaderConstantSetCallBack.h
include/ISkinnedMesh.h
include/ITerrainSceneNode.h
include/ITextSceneNode.h
include/ITexture.h
include/ITimer.h
include/ITriangleSelector.h
include/IVertexBuffer.h
include/IVideoDriver.h
include/IVideoModeList.h
include/IWriteFile.h
include/IXMLReader.h
include/IXMLWriter.h
include/Keycodes.h
include/line2d.h
include/line3d.h
include/matrix4.h
include/path.h
include/plane3d.h
include/position2d.h
include/quaternion.h
include/rect.h
include/S3DVertex.h
include/SAnimatedMesh.h
include/SceneParameters.h
include/SColor.h
include/SExposedVideoData.h
include/SIrrCreationParameters.h
include/SKeyMap.h
include/SLight.h
include/SMaterial.h
include/SMaterialLayer.h
include/SMeshBuffer.h
include/SMeshBufferLightMap.h
include/SMeshBufferTangents.h
include/SMesh.h
include/SParticle.h
include/SSharedMeshBuffer.h
include/SSkinMeshBuffer.h
include/SVertexIndex.h
include/SVertexManipulator.h
include/SViewFrustum.h
include/triangle3d.h
include/utfwrapping.h
include/vector2d.h
include/vector3d.h
)
if(APPLE)
set(IRRLICHT_SOURCES
${IRRLICHT_SOURCES}

View File

@ -28,6 +28,10 @@ namespace irr
//! A device native to Mac OSX
/** This device uses Apple's Cocoa API and works in Mac OSX 10.2 and above. */
EIDT_OSX,
//! A device native to the IPhone/IPod touch
/** This device should be used with the OpenGL-ES driver. */
EIDT_IPHONE,
//! A device which uses Simple DirectMedia Layer
/** The SDL device works under all platforms supported by SDL but first must be compiled
@ -51,7 +55,13 @@ namespace irr
to your operating system. If this is unavailable then the X11, SDL and then console device
will be tried. This ensures that Irrlicht will run even if your platform is unsupported,
although it may not be able to render anything. */
EIDT_BEST
EIDT_BEST,
//! A device for Android platforms
/** Best used with embedded devices and mobile systems.
Does not need X11 or other graphical subsystems.
May support hw-acceleration via OpenGL-ES */
EIDT_ANDROID,
};
} // end namespace irr

View File

@ -118,8 +118,8 @@ namespace video
//! Support for texture coord transformation via texture matrix
EVDF_TEXTURE_MATRIX,
//! Support for NVidia's CG shader language
EVDF_CG,
//! Support for DXTn compressed textures.
EVDF_TEXTURE_COMPRESSED_DXT,
//! Only used for counting the elements of this enum
EVDF_COUNT

View File

@ -51,6 +51,13 @@ namespace video
/** Performs hardware accelerated rendering of 3D and 2D
primitives. */
EDT_OPENGL,
//! OpenGL-ES 1.x driver, for embedded and mobile systems
EDT_OGLES1,
//! OpenGL-ES 2.x driver, for embedded and mobile systems
/** Supports shaders etc. */
EDT_OGLES2,
//! No driver, just for counting the elements
EDT_COUNT

View File

@ -10,15 +10,6 @@ namespace irr
namespace video
{
//! Flag for mesh (mainly karts in STK) to use specific render type
enum E_RENDER_TYPE
{
ERT_DEFAULT = 0,
ERT_TRANSPARENT,
ERT_RED,
ERT_BLUE
};
//! Abstracted and easy to use fixed function/programmable pipeline material modes.
enum E_MATERIAL_TYPE
{

View File

@ -0,0 +1,38 @@
#ifndef __E_VERTEX_ATTRIBUTES_H_INCLUDED__
#define __E_VERTEX_ATTRIBUTES_H_INCLUDED__
namespace irr
{
namespace video
{
//! Enumeration for all vertex attibutes there are.
enum E_VERTEX_ATTRIBUTES
{
EVA_POSITION = 0,
EVA_NORMAL,
EVA_COLOR,
EVA_TCOORD0,
EVA_TCOORD1,
EVA_TANGENT,
EVA_BINORMAL,
EVA_COUNT
};
//! Array holding the built in vertex attribute names
const char* const sBuiltInVertexAttributeNames[] =
{
"inVertexPosition",
"inVertexNormal",
"inVertexColor",
"inTexCoord0",
"inTexCoord1",
"inVertexTangent",
"inVertexBinormal",
0
};
} // end namespace video
} // end namespace irr
#endif //__E_VERTEX_ATTRIBUTES_H_INCLUDED__

View File

@ -33,6 +33,18 @@ namespace irr
/** Like mouse events, keyboard events are created by the device and passed to
IrrlichtDevice::postEventFromUser. They take the same path as mouse events. */
EET_KEY_INPUT_EVENT,
//! A multi touch event.
EET_MULTI_TOUCH_EVENT,
//! A accelerometer event.
EET_ACCELEROMETER_EVENT,
//! A gyroscope event.
EET_GYROSCOPE_EVENT,
//! A device motion event.
EET_DEVICE_MOTION_EVENT,
//! A joystick (joypad, gamepad) input event.
/** Joystick events are created by polling all connected joysticks once per
@ -163,6 +175,25 @@ namespace irr
EIME_FORCE_32_BIT = 0x7fffffff
};
#endif
//! Enumeration for all touch input events
enum EMULTI_TOUCH_INPUT_EVENT
{
//! Max multi touch count
NUMBER_OF_MULTI_TOUCHES = 10,
//! Touch was pressed down.
EMTIE_PRESSED_DOWN = 0,
//! Touch was left up.
EMTIE_LEFT_UP,
//! The touch changed its position.
EMTIE_MOVED,
//! No real event. Just for convenience to get number of events
EMTIE_COUNT
};
namespace gui
{
@ -352,6 +383,97 @@ struct SEvent
//! True if ctrl was also pressed
bool Control:1;
};
//! Any kind of multi touch event.
struct SMultiTouchInput
{
//! A helper function to check if a button is pressed.
u32 touchedCount() const
{
u32 count = 0;
for (u16 i = 0; i < NUMBER_OF_MULTI_TOUCHES; ++i)
{
if (Touched[i])
count++;
}
return count;
}
//! Reset variables.
void clear()
{
for (u16 i = 0; i < NUMBER_OF_MULTI_TOUCHES; ++i)
{
Touched[i] = 0;
X[i] = 0;
Y[i] = 0;
PrevX[i] = 0;
PrevY[i] = 0;
}
}
// Status of simple touch.
u8 Touched[NUMBER_OF_MULTI_TOUCHES];
// X position of simple touch.
s32 X[NUMBER_OF_MULTI_TOUCHES];
// Y position of simple touch.
s32 Y[NUMBER_OF_MULTI_TOUCHES];
// Previous X position of simple touch.
s32 PrevX[NUMBER_OF_MULTI_TOUCHES];
// Previous Y position of simple touch.
s32 PrevY[NUMBER_OF_MULTI_TOUCHES];
//! Type of multi touch event
EMULTI_TOUCH_INPUT_EVENT Event;
};
//! Any kind of accelerometer event.
struct SAccelerometerEvent
{
// X acceleration.
f64 X;
// Y acceleration.
f64 Y;
// Z acceleration.
f64 Z;
};
//! Any kind of gyroscope event.
struct SGyroscopeEvent
{
// X rotation.
f64 X;
// Y rotation.
f64 Y;
// Z rotation.
f64 Z;
};
//! Any kind of device motion event.
struct SDeviceMotionEvent
{
// X angle - roll.
f64 X;
// Y angle - pitch.
f64 Y;
// Z angle - yaw.
f64 Z;
};
//! A joystick event.
/** Unlike other events, joystick events represent the result of polling
@ -412,7 +534,6 @@ struct SEvent
}
};
//! Any kind of log event.
struct SLogEvent
{
@ -447,12 +568,17 @@ struct SEvent
};
#endif
EEVENT_TYPE EventType;
union
{
struct SGUIEvent GUIEvent;
struct SMouseInput MouseInput;
struct SKeyInput KeyInput;
struct SMultiTouchInput MultiTouchInput;
struct SAccelerometerEvent AccelerometerEvent;
struct SGyroscopeEvent GyroscopeEvent;
struct SDeviceMotionEvent DeviceMotionEvent;
struct SJoystickEvent JoystickEvent;
struct SLogEvent LogEvent;
struct SUserEvent UserEvent;

View File

@ -45,6 +45,9 @@ enum E_FILE_ARCHIVE_TYPE
//! A wad Archive, Quake2, Halflife
EFAT_WAD = MAKE_IRR_ID('W','A','D', 0),
//! An Android asset file archive
EFAT_ANDROID_ASSET = MAKE_IRR_ID('A','S','S','E'),
//! The type of this archive is unknown
EFAT_UNKNOWN = MAKE_IRR_ID('u','n','k','n')
};

View File

@ -37,6 +37,11 @@ public:
virtual void setBasicRenderStates(const SMaterial& material,
const SMaterial& lastMaterial,
bool resetAllRenderstates) = 0;
#ifdef _IRR_COMPILE_WITH_OGLES2_
//! Return an index constant for the vertex shader based on a name.
virtual s32 getVertexShaderConstantID(const c8* name) = 0;
#endif
//! Sets a constant for the vertex shader based on a name.
/** This can be used if you used a high level shader language like GLSL
@ -63,13 +68,23 @@ public:
\param count Amount of floats in array.
\return True if successful.
*/
#ifdef _IRR_COMPILE_WITH_OGLES2_
virtual bool setVertexShaderConstant(s32 index, const f32* floats, int count) = 0;
#else
virtual bool setVertexShaderConstant(const c8* name, const f32* floats, int count) = 0;
#endif
//! Bool interface for the above.
#ifndef _IRR_COMPILE_WITH_OGLES2_
virtual bool setVertexShaderConstant(const c8* name, const bool* bools, int count) = 0;
#endif
//! Int interface for the above.
#ifdef _IRR_COMPILE_WITH_OGLES2_
virtual bool setVertexShaderConstant(s32 index, const s32* ints, int count) = 0;
#else
virtual bool setVertexShaderConstant(const c8* name, const s32* ints, int count) = 0;
#endif
//! Sets a vertex shader constant.
/** Can be used if you created a shader using pixel/vertex shader
@ -78,6 +93,11 @@ public:
\param startRegister: First register to be set
\param constantAmount: Amount of registers to be set. One register consists of 4 floats. */
virtual void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) = 0;
#ifdef _IRR_COMPILE_WITH_OGLES2_
//! Return an index constant for the pixel shader based on a name.
virtual s32 getPixelShaderConstantID(const c8* name) = 0;
#endif
//! Sets a constant for the pixel shader based on a name.
/** This can be used if you used a high level shader language like GLSL
@ -87,13 +107,23 @@ public:
\param floats Pointer to array of floats
\param count Amount of floats in array.
\return True if successful. */
#ifdef _IRR_COMPILE_WITH_OGLES2_
virtual bool setPixelShaderConstant(s32 index, const f32* floats, int count) = 0;
#else
virtual bool setPixelShaderConstant(const c8* name, const f32* floats, int count) = 0;
#endif
//! Bool interface for the above.
#ifndef _IRR_COMPILE_WITH_OGLES2_
virtual bool setPixelShaderConstant(const c8* name, const bool* bools, int count) = 0;
#endif
//! Int interface for the above.
#ifdef _IRR_COMPILE_WITH_OGLES2_
virtual bool setPixelShaderConstant(s32 index, const s32* ints, int count) = 0;
#else
virtual bool setPixelShaderConstant(const c8* name, const s32* ints, int count) = 0;
#endif
//! Sets a pixel shader constant.
/** Can be used if you created a shader using pixel/vertex shader
@ -102,6 +132,32 @@ public:
\param startRegister First register to be set.
\param constantAmount Amount of registers to be set. One register consists of 4 floats. */
virtual void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) = 0;
#ifdef _IRR_COMPILE_WITH_OGLES2_
//! \deprecated. This method may be removed by Irrlicht 2.0
_IRR_DEPRECATED_ bool setVertexShaderConstant(const c8* name, const f32* floats, int count)
{
return setVertexShaderConstant(getVertexShaderConstantID(name), floats, count);
}
//! \deprecated. This method may be removed by Irrlicht 2.0
_IRR_DEPRECATED_ bool setVertexShaderConstant(const c8* name, const s32* ints, int count)
{
return setVertexShaderConstant(getVertexShaderConstantID(name), ints, count);
}
//! \deprecated. This method may be removed by Irrlicht 2.0
_IRR_DEPRECATED_ bool setPixelShaderConstant(const c8* name, const f32* floats, int count)
{
return setPixelShaderConstant(getPixelShaderConstantID(name), floats, count);
}
//! \deprecated. This method may be removed by Irrlicht 2.0
_IRR_DEPRECATED_ bool setPixelShaderConstant(const c8* name, const s32* ints, int count)
{
return setPixelShaderConstant(getPixelShaderConstantID(name), ints, count);
}
#endif
//! Get pointer to the IVideoDriver interface
/** \return Pointer to the IVideoDriver interface */

View File

@ -23,9 +23,6 @@ namespace scene
class IMesh : public virtual IReferenceCounted
{
public:
IMesh() : m_rt(video::ERT_DEFAULT) {}
virtual ~IMesh() {}
//! Get the amount of mesh buffers.
/** \return Amount of mesh buffers (IMeshBuffer) in this mesh. */
@ -69,15 +66,6 @@ namespace scene
indices have changed. Otherwise, changes won't be updated
on the GPU in the next render cycle. */
virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0;
//! Set the mesh to use a specific render type (mainly karts in STK)
/** \param t New render type for the mesh. */
void setRenderType(video::E_RENDER_TYPE t) { m_rt = t; }
//! Get the specific render type for the mesh (mainly karts in STK)
video::E_RENDER_TYPE getRenderType() const { return m_rt; }
private:
video::E_RENDER_TYPE m_rt;
};
} // end namespace scene

View File

@ -135,15 +135,6 @@ namespace irr
return ReferenceCounter;
}
//! Sets the reference count.
/** Use with extreme caution, since using it incorrectly results in memory
corruption or memory leaks. This method is only implemented for 'hollow'
copies of ScalableFont (an STK extention). */
void setReferenceCount(s32 n)
{
ReferenceCounter = n;
}
//! Returns the debug name of the object.
/** The Debugname may only be set and changed by the object
itself. This method should only be used in Debug mode.

View File

@ -24,6 +24,8 @@
//! _IRR_LINUX_PLATFORM_ for Linux (it is defined here if no other os is defined)
//! _IRR_SOLARIS_PLATFORM_ for Solaris
//! _IRR_OSX_PLATFORM_ for Apple systems running OSX
//! _IRR_IPHONE_PLATFORM_ for Apple devices running iOS
//! _IRR_ANDROID_PLATFORM_ for devices running Android
//! _IRR_POSIX_API_ for Posix compatible systems
//! Note: PLATFORM defines the OS specific layer, API can group several platforms
@ -93,11 +95,29 @@
#if !defined(MACOSX)
#define MACOSX // legacy support
#endif
#define _IRR_OSX_PLATFORM_
#define _IRR_OSX_PLATFORM_ // we only support OSX on these systems
#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) || defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
#define _IRR_IPHONE_PLATFORM_
#define _IRR_COMPILE_WITH_IPHONE_DEVICE_
#define _IRR_COMPILE_WITH_OGLES2_
#else
#define _IRR_COMPILE_WITH_OSX_DEVICE_
#endif
#endif
#if !defined(_IRR_WINDOWS_API_) && !defined(_IRR_OSX_PLATFORM_)
#if defined(ANDROID)
#define _IRR_ANDROID_PLATFORM_
#define _IRR_POSIX_API_
#endif
#if defined(_IRR_ANDROID_PLATFORM_)
#define _IRR_COMPILE_WITH_ANDROID_DEVICE_
#define _IRR_COMPILE_WITH_OGLES2_
#define _IRR_COMPILE_ANDROID_ASSET_READER_
#endif
#if !defined(_IRR_WINDOWS_API_) && !defined(_IRR_OSX_PLATFORM_) && !defined(_IRR_ANDROID_PLATFORM_)
#ifndef _IRR_SOLARIS_PLATFORM_
#if !defined(__linux__) && !defined(__FreeBSD__)
#define _IRR_LINUX_PLATFORM_
@ -152,11 +172,34 @@ If not defined, Windows Multimedia library is used, which offers also broad supp
//! Define _IRR_COMPILE_WITH_OPENGL_ to compile the Irrlicht engine with OpenGL.
/** If you do not wish the engine to be compiled with OpenGL, comment this
define out. */
#if !defined(_IRR_IPHONE_PLATFORM_) && !defined(_IRR_ANDROID_PLATFORM_)
#define _IRR_COMPILE_WITH_OPENGL_
#endif
#ifdef NO_IRR_COMPILE_WITH_OPENGL_
#undef _IRR_COMPILE_WITH_OPENGL_
#endif
//! Define _IRR_COMPILE_WITH_OGLES2_ to compile the Irrlicht engine with OpenGL-ES 2.x.
/** If you do not wish the engine to be compiled with OpenGL-ES 2.x, comment
this define out.
You should only use this define if you really need the OpenGL-ES driver, and
it should be usually the only HW accelerated one. OpenGL is currently disabled
if using this driver, to avoid problems with the ogl-es emulators.
*/
// #define _IRR_COMPILE_WITH_OGLES2_
#ifdef NO_IRR_COMPILE_WITH_OGLES2_
#undef _IRR_COMPILE_WITH_OGLES2_
#endif
#ifndef IRR_OGLES2_SHADER_PATH
#ifdef _IRR_COMPILE_WITH_IPHONE_DEVICE_
#define IRR_OGLES2_SHADER_PATH ""
#elif defined(_IRR_COMPILE_WITH_ANDROID_DEVICE_)
#define IRR_OGLES2_SHADER_PATH "media/Shaders/"
#else
#define IRR_OGLES2_SHADER_PATH "data/shaders/irrlicht/"
#endif
#endif
//! Define _IRR_COMPILE_WITH_X11_ to compile the Irrlicht engine with X11 support.
/** If you do not wish the engine to be compiled with X11, comment this
define out. */
@ -169,9 +212,21 @@ define out. */
//! Define _IRR_OPENGL_USE_EXTPOINTER_ if the OpenGL renderer should use OpenGL extensions via function pointers.
/** On some systems there is no support for the dynamic extension of OpenGL
via function pointers such that this has to be undef'ed. */
#ifdef _IRR_COMPILE_WITH_OPENGL_
#if !defined(_IRR_OSX_PLATFORM_) && !defined(_IRR_SOLARIS_PLATFORM_)
#define _IRR_OPENGL_USE_EXTPOINTER_
#endif
#endif
//! Define _IRR_OGLES2_USE_EXTPOINTER_ if the OpenGL-ES 2.x driver should use extensions via function pointers.
/** This should usually be enabled, but also depends on the specific
architecture. You can simply uncomment the define and recompile.
*/
#ifdef _IRR_COMPILE_WITH_OGLES2_
#if !defined(_IRR_IPHONE_PLATFORM_)
#define _IRR_OGLES2_USE_EXTPOINTER_
#endif
#endif
//! On some Linux systems the XF86 vidmode extension or X11 RandR are missing. Use these flags
//! to remove the dependencies such that Irrlicht will compile on those systems, too.

View File

@ -9,6 +9,7 @@
#include "EDeviceTypes.h"
#include "dimension2d.h"
#include "ILogger.h"
#include "irrString.h"
namespace irr
{
@ -48,6 +49,7 @@ namespace irr
DriverMultithreaded(false),
UsePerformanceTimer(true),
ForceLegacyDevice(false),
ShadersPath(""),
SDK_version_do_not_use(IRRLICHT_SDK_VERSION)
{
}
@ -81,6 +83,8 @@ namespace irr
DisplayAdapter = other.DisplayAdapter;
UsePerformanceTimer = other.UsePerformanceTimer;
ForceLegacyDevice = other.ForceLegacyDevice;
ShadersPath = other.ShadersPath;
PrivateData = other.PrivateData;
return *this;
}
@ -295,11 +299,23 @@ namespace irr
/** opengl 3 context is available.
*/
bool ForceLegacyDevice;
//! Specifies custom path for shaders directory.
/** Allows to overwrite IRR_OGLES2_SHADER_PATH constant
*/
core::stringc ShadersPath;
//! Don't use or change this parameter.
/** Always set it to IRRLICHT_SDK_VERSION, which is done by default.
This is needed for sdk version checks. */
const c8* const SDK_version_do_not_use;
//! Define some private data storage.
/** Used when platform devices need access to OS specific data structures etc.
This is only used for Android at th emoment in order to access the native
Java RE. */
void *PrivateData;
};

View File

@ -358,6 +358,18 @@ void CColorConverter::convert_A1R5G5B5toB8G8R8(const void* sP, s32 sN, void* dP)
}
}
void CColorConverter::convert_A1R5G5B5toR5G5B5A1(const void* sP, s32 sN, void* dP)
{
const u16* sB = (const u16*)sP;
u16* dB = (u16*)dP;
for (s32 x = 0; x < sN; ++x)
{
*dB = (*sB<<1)|(*sB>>15);
++sB; ++dB;
}
}
void CColorConverter::convert_A1R5G5B5toA8R8G8B8(const void* sP, s32 sN, void* dP)
{
u16* sB = (u16*)sP;
@ -516,6 +528,30 @@ void CColorConverter::convert_B8G8R8toA8R8G8B8(const void* sP, s32 sN, void* dP)
}
}
void CColorConverter::convert_A8R8G8B8toR8G8B8A8(const void* sP, s32 sN, void* dP)
{
const u32* sB = (const u32*)sP;
u32* dB = (u32*)dP;
for (s32 x = 0; x < sN; ++x)
{
*dB++ = (*sB<<8) | (*sB>>24);
++sB;
}
}
void CColorConverter::convert_A8R8G8B8toA8B8G8R8(const void* sP, s32 sN, void* dP)
{
const u32* sB = (const u32*)sP;
u32* dB = (u32*)dP;
for (s32 x = 0; x < sN; ++x)
{
*dB++ = (*sB&0xff00ff00)|((*sB&0x00ff0000)>>16)|((*sB&0x000000ff)<<16);
++sB;
}
}
void CColorConverter::convert_B8G8R8A8toA8R8G8B8(const void* sP, s32 sN, void* dP)
{
u8* sB = (u8*)sP;
@ -534,6 +570,22 @@ void CColorConverter::convert_B8G8R8A8toA8R8G8B8(const void* sP, s32 sN, void* d
}
void CColorConverter::convert_R8G8B8toB8G8R8(const void* sP, s32 sN, void* dP)
{
u8* sB = (u8*)sP;
u8* dB = (u8*)dP;
for (s32 x = 0; x < sN; ++x)
{
dB[2] = sB[0];
dB[1] = sB[1];
dB[0] = sB[2];
sB += 3;
dB += 3;
}
}
void CColorConverter::convert_R8G8B8toR5G6B5(const void* sP, s32 sN, void* dP)
{
u8 * sB = (u8 *)sP;

View File

@ -59,6 +59,7 @@ public:
static void convert_A1R5G5B5toB8G8R8(const void* sP, s32 sN, void* dP);
static void convert_A1R5G5B5toA8R8G8B8(const void* sP, s32 sN, void* dP);
static void convert_A1R5G5B5toA1R5G5B5(const void* sP, s32 sN, void* dP);
static void convert_A1R5G5B5toR5G5B5A1(const void* sP, s32 sN, void* dP);
static void convert_A1R5G5B5toR5G6B5(const void* sP, s32 sN, void* dP);
static void convert_A8R8G8B8toR8G8B8(const void* sP, s32 sN, void* dP);
@ -71,9 +72,12 @@ public:
static void convert_R8G8B8toR8G8B8(const void* sP, s32 sN, void* dP);
static void convert_R8G8B8toA8R8G8B8(const void* sP, s32 sN, void* dP);
static void convert_R8G8B8toA1R5G5B5(const void* sP, s32 sN, void* dP);
static void convert_R8G8B8toB8G8R8(const void* sP, s32 sN, void* dP);
static void convert_R8G8B8toR5G6B5(const void* sP, s32 sN, void* dP);
static void convert_B8G8R8toA8R8G8B8(const void* sP, s32 sN, void* dP);
static void convert_B8G8R8A8toA8R8G8B8(const void* sP, s32 sN, void* dP);
static void convert_A8R8G8B8toR8G8B8A8(const void* sP, s32 sN, void* dP);
static void convert_A8R8G8B8toA8B8G8R8(const void* sP, s32 sN, void* dP);
static void convert_R5G6B5toR5G6B5(const void* sP, s32 sN, void* dP);
static void convert_R5G6B5toR8G8B8(const void* sP, s32 sN, void* dP);

View File

@ -66,7 +66,7 @@ void CImageLoaderJPG::init_source (j_decompress_ptr cinfo)
boolean CImageLoaderJPG::fill_input_buffer (j_decompress_ptr cinfo)
{
// DO NOTHING
return 1;
return TRUE;
}

View File

@ -63,6 +63,8 @@ namespace irr
extern bool useCoreContext;
IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params,
io::IFileSystem* io, CIrrDeviceLinux* device);
IVideoDriver* createOGLES2Driver(const SIrrlichtCreationParameters& params,
video::SExposedVideoData& data, io::IFileSystem* io);
}
} // end namespace irr
@ -506,6 +508,7 @@ void IrrPrintXGrabError(int grabResult, const c8 * grabCommand )
}
#endif
#ifdef _IRR_COMPILE_WITH_OPENGL_
static GLXContext getMeAGLContext(Display *display, GLXFBConfig glxFBConfig, bool force_legacy_context)
{
GLXContext Context;
@ -590,6 +593,7 @@ static GLXContext getMeAGLContext(Display *display, GLXFBConfig glxFBConfig, boo
Context = glXCreateNewContext(display, glxFBConfig, GLX_RGBA_TYPE, NULL, True);
return Context;
}
#endif
bool CIrrDeviceLinux::createWindow()
{
@ -1138,6 +1142,19 @@ void CIrrDeviceLinux::createDriver()
#endif
break;
case video::EDT_OGLES2:
{
#ifdef _IRR_COMPILE_WITH_OGLES2_
video::SExposedVideoData data;
data.OpenGLLinux.X11Window = window;
data.OpenGLLinux.X11Display = display;
VideoDriver = video::createOGLES2Driver(CreationParams, data, FileSystem);
#else
os::Printer::log("No OpenGL ES 2.0 support compiled in.", ELL_ERROR);
#endif
break;
}
case video::EDT_DIRECT3D8:
case video::EDT_DIRECT3D9:
os::Printer::log("This driver is not available in Linux. Try OpenGL or Software renderer.",

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,556 @@
// Copyright (C) 2013 Patryk Nadrowski
// Heavily based on the OpenGL driver implemented by Nikolaus Gebhardt
// OpenGL ES driver implemented by Christian Stehno and first OpenGL ES 2.0
// driver implemented by Amundis.
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
#ifndef __C_OGLES2_DRIVER_H_INCLUDED__
#define __C_OGLES2_DRIVER_H_INCLUDED__
#include "IrrCompileConfig.h"
#if defined(_IRR_WINDOWS_API_)
// include windows headers for HWND
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#elif defined(_IRR_COMPILE_WITH_OSX_DEVICE_)
#include "MacOSX/CIrrDeviceMacOSX.h"
#elif defined(_IRR_COMPILE_WITH_IPHONE_DEVICE_)
#include "iOS/CIrrDeviceiOS.h"
#endif
#include "SIrrCreationParameters.h"
#ifdef _IRR_COMPILE_WITH_OGLES2_
#if defined(_IRR_COMPILE_WITH_IPHONE_DEVICE_)
#include <OpenGLES/ES2/gl.h>
#include <OpenGLES/ES2/glext.h>
#elif defined(_IRR_COMPILE_WITH_ANDROID_DEVICE_)
#include <EGL/egl.h>
#include <GLES2/gl2.h>
#include "android_native_app_glue.h"
#else
#include <EGL/eglplatform.h>
#endif
#include "CNullDriver.h"
#include "IMaterialRendererServices.h"
#include "EDriverFeatures.h"
#include "fast_atof.h"
#ifdef _MSC_VER
#pragma comment(lib, "libEGL.lib")
#pragma comment(lib, "libGLESv2.lib")
#endif
#include "COGLES2ExtensionHandler.h"
namespace irr
{
namespace video
{
class COGLES2CallBridge;
class COGLES2Texture;
class COGLES2FixedPipelineRenderer;
class COGLES2Renderer2D;
class COGLES2NormalMapRenderer;
class COGLES2ParallaxMapRenderer;
class COGLES2Driver : public CNullDriver, public IMaterialRendererServices, public COGLES2ExtensionHandler
{
friend class COGLES2CallBridge;
friend class COGLES2Texture;
public:
#if defined(_IRR_COMPILE_WITH_X11_DEVICE_) || defined(_IRR_COMPILE_WITH_SDL_DEVICE_) || defined(_IRR_WINDOWS_API_) || defined(_IRR_COMPILE_WITH_CONSOLE_DEVICE_)
COGLES2Driver(const SIrrlichtCreationParameters& params,
const SExposedVideoData& data,
io::IFileSystem* io);
#endif
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
COGLES2Driver(const SIrrlichtCreationParameters& params,
io::IFileSystem* io, CIrrDeviceMacOSX *device);
#endif
#if defined(_IRR_COMPILE_WITH_IPHONE_DEVICE_)
COGLES2Driver(const SIrrlichtCreationParameters& params,
const SExposedVideoData& data,
io::IFileSystem* io, CIrrDeviceIPhone* device);
#endif
//! destructor
virtual ~COGLES2Driver();
//! clears the zbuffer
virtual bool beginScene(bool backBuffer=true, bool zBuffer=true,
SColor color=SColor(255, 0, 0, 0),
const SExposedVideoData& videoData=SExposedVideoData(),
core::rect<s32>* sourceRect=0);
//! presents the rendered scene on the screen, returns false if failed
virtual bool endScene();
//! sets transformation
virtual void setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat);
struct SHWBufferLink_opengl : public SHWBufferLink
{
SHWBufferLink_opengl(const scene::IMeshBuffer *meshBuffer): SHWBufferLink(meshBuffer), vbo_verticesID(0), vbo_indicesID(0) {}
u32 vbo_verticesID; //tmp
u32 vbo_indicesID; //tmp
u32 vbo_verticesSize; //tmp
u32 vbo_indicesSize; //tmp
};
bool updateVertexHardwareBuffer(SHWBufferLink_opengl *HWBuffer);
bool updateIndexHardwareBuffer(SHWBufferLink_opengl *HWBuffer);
//! updates hardware buffer if needed
virtual bool updateHardwareBuffer(SHWBufferLink *HWBuffer);
//! Create hardware buffer from mesh
virtual SHWBufferLink *createHardwareBuffer(const scene::IMeshBuffer* mb);
//! Delete hardware buffer (only some drivers can)
virtual void deleteHardwareBuffer(SHWBufferLink *HWBuffer);
//! Draw hardware buffer
virtual void drawHardwareBuffer(SHWBufferLink *HWBuffer);
//! draws a vertex primitive list
virtual void drawVertexPrimitiveList(const void* vertices, u32 vertexCount,
const void* indexList, u32 primitiveCount,
E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType);
void drawVertexPrimitiveList2d3d(const void* vertices, u32 vertexCount,
const void* indexList, u32 primitiveCount,
E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType,
E_INDEX_TYPE iType = EIT_16BIT, bool threed = true);
//! queries the features of the driver, returns true if feature is available
virtual bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const
{
return FeatureEnabled[feature] && COGLES2ExtensionHandler::queryFeature(feature);
}
//! Sets a material.
virtual void setMaterial(const SMaterial& material);
//! draws an 2d image, using a color (if color is other then Color(255,255,255,255)) and the alpha channel of the texture if wanted.
virtual void draw2DImage(const video::ITexture* texture,
const core::position2d<s32>& destPos,
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0,
SColor color = SColor(255, 255, 255, 255), bool useAlphaChannelOfTexture = false);
//! draws a set of 2d images
virtual void draw2DImageBatch(const video::ITexture* texture,
const core::position2d<s32>& pos,
const core::array<core::rect<s32> >& sourceRects,
const core::array<s32>& indices, s32 kerningWidth = 0,
const core::rect<s32>* clipRect = 0,
SColor color = SColor(255, 255, 255, 255),
bool useAlphaChannelOfTexture = false);
//! Draws a part of the texture into the rectangle.
virtual void draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect,
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0,
const video::SColor* const colors = 0, bool useAlphaChannelOfTexture = false);
void draw2DImageBatch(const video::ITexture* texture,
const core::array<core::position2d<s32> >& positions,
const core::array<core::rect<s32> >& sourceRects,
const core::rect<s32>* clipRect,
SColor color,
bool useAlphaChannelOfTexture);
//! draw an 2d rectangle
virtual void draw2DRectangle(SColor color, const core::rect<s32>& pos,
const core::rect<s32>* clip = 0);
//!Draws an 2d rectangle with a gradient.
virtual void draw2DRectangle(const core::rect<s32>& pos,
SColor colorLeftUp, SColor colorRightUp, SColor colorLeftDown, SColor colorRightDown,
const core::rect<s32>* clip = 0);
//! Draws a 2d line.
virtual void draw2DLine(const core::position2d<s32>& start,
const core::position2d<s32>& end,
SColor color = SColor(255, 255, 255, 255));
//! Draws a single pixel
virtual void drawPixel(u32 x, u32 y, const SColor & color);
//! Draws a 3d line.
virtual void draw3DLine(const core::vector3df& start,
const core::vector3df& end,
SColor color = SColor(255, 255, 255, 255));
//! Draws a pixel
// virtual void drawPixel(u32 x, u32 y, const SColor & color);
//! Returns the name of the video driver.
virtual const wchar_t* getName() const;
//! deletes all dynamic lights there are
virtual void deleteAllDynamicLights();
//! adds a dynamic light
virtual s32 addDynamicLight(const SLight& light);
//! Turns a dynamic light on or off
/** \param lightIndex: the index returned by addDynamicLight
\param turnOn: true to turn the light on, false to turn it off */
virtual void turnLightOn(s32 lightIndex, bool turnOn);
//! returns the maximal amount of dynamic lights the device can handle
virtual u32 getMaximalDynamicLightAmount() const;
//! Sets the dynamic ambient light color.
virtual void setAmbientLight(const SColorf& color);
//! return the dynamic ambient light color.
const SColorf& getAmbientLight() const;
//! Returns the maximum texture size supported.
virtual core::dimension2du getMaxTextureSize() const;
//! Draws a shadow volume into the stencil buffer.
virtual void drawStencilShadowVolume(const core::vector3df* triangles, s32 count, bool zfail);
//! Fills the stencil shadow with color.
virtual void drawStencilShadow(bool clearStencilBuffer = false,
video::SColor leftUpEdge = video::SColor(0, 0, 0, 0),
video::SColor rightUpEdge = video::SColor(0, 0, 0, 0),
video::SColor leftDownEdge = video::SColor(0, 0, 0, 0),
video::SColor rightDownEdge = video::SColor(0, 0, 0, 0));
//! sets a viewport
virtual void setViewPort(const core::rect<s32>& area);
//! Only used internally by the engine
virtual void OnResize(const core::dimension2d<u32>& size);
//! Returns type of video driver
virtual E_DRIVER_TYPE getDriverType() const;
//! get color format of the current color buffer
virtual ECOLOR_FORMAT getColorFormat() const;
//! Returns the transformation set by setTransform
virtual const core::matrix4& getTransform(E_TRANSFORMATION_STATE state) const;
//! Can be called by an IMaterialRenderer to make its work easier.
virtual void setBasicRenderStates(const SMaterial& material, const SMaterial& lastmaterial, bool resetAllRenderstates);
//! Compare in SMaterial doesn't check texture parameters, so we should call this on each OnRender call.
virtual void setTextureRenderStates(const SMaterial& material, bool resetAllRenderstates);
//! Get a vertex shader constant index.
virtual s32 getVertexShaderConstantID(const c8* name);
//! Get a pixel shader constant index.
virtual s32 getPixelShaderConstantID(const c8* name);
//! Sets a vertex shader constant.
virtual void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount = 1);
//! Sets a pixel shader constant.
virtual void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount = 1);
//! Sets a constant for the vertex shader based on an index.
virtual bool setVertexShaderConstant(s32 index, const f32* floats, int count);
//! Int interface for the above.
virtual bool setVertexShaderConstant(s32 index, const s32* ints, int count);
//! Sets a constant for the pixel shader based on an index.
virtual bool setPixelShaderConstant(s32 index, const f32* floats, int count);
//! Int interface for the above.
virtual bool setPixelShaderConstant(s32 index, const s32* ints, int count);
//! sets the current Texture
bool setActiveTexture(u32 stage, const video::ITexture* texture);
//! check if active texture is not equal null.
bool isActiveTexture(u32 stage);
//! disables all textures beginning with fromStage.
bool disableTextures(u32 fromStage = 0);
//! Adds a new material renderer to the VideoDriver
virtual s32 addShaderMaterial(const c8* vertexShaderProgram, const c8* pixelShaderProgram,
IShaderConstantSetCallBack* callback, E_MATERIAL_TYPE baseMaterial, s32 userData);
//! Adds a new material renderer to the VideoDriver
virtual s32 addHighLevelShaderMaterial(
const c8* vertexShaderProgram,
const c8* vertexShaderEntryPointName = 0,
E_VERTEX_SHADER_TYPE vsCompileTarget = EVST_VS_1_1,
const c8* pixelShaderProgram = 0,
const c8* pixelShaderEntryPointName = 0,
E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1,
const c8* geometryShaderProgram = 0,
const c8* geometryShaderEntryPointName = "main",
E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0,
scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES,
scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP,
u32 verticesOut = 0,
IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData=0,
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT);
//! Returns pointer to the IGPUProgrammingServices interface.
virtual IGPUProgrammingServices* getGPUProgrammingServices();
//! Returns a pointer to the IVideoDriver interface.
virtual IVideoDriver* getVideoDriver();
//! Returns the maximum amount of primitives
virtual u32 getMaximalPrimitiveCount() const;
virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size,
const io::path& name, const ECOLOR_FORMAT format = ECF_UNKNOWN);
virtual bool setRenderTarget(video::ITexture* texture, bool clearBackBuffer,
bool clearZBuffer, SColor color);
//! set or reset special render targets
// virtual bool setRenderTarget(video::E_RENDER_TARGET target, bool clearTarget,
// bool clearZBuffer, SColor color);
//! Sets multiple render targets
// virtual bool setRenderTarget(const core::array<video::IRenderTarget>& texture,
// bool clearBackBuffer=true, bool clearZBuffer=true, SColor color=SColor(0,0,0,0));
//! Clears the ZBuffer.
virtual void clearZBuffer();
//! Returns an image created from the last rendered frame.
virtual IImage* createScreenShot(video::ECOLOR_FORMAT format=video::ECF_UNKNOWN, video::E_RENDER_TARGET target=video::ERT_FRAME_BUFFER);
//! checks if an OpenGL error has happend and prints it
bool testGLError();
//! checks if an OGLES1 error has happend and prints it
bool testEGLError();
//! Set/unset a clipping plane.
virtual bool setClipPlane(u32 index, const core::plane3df& plane, bool enable = false);
//! returns the current amount of user clip planes set.
u32 getClipPlaneCount() const;
//! returns the 0 indexed Plane
const core::plane3df& getClipPlane(u32 index) const;
//! Enable/disable a clipping plane.
virtual void enableClipPlane(u32 index, bool enable);
//! Returns the graphics card vendor name.
virtual core::stringc getVendorInfo()
{
return vendorName;
};
ITexture* createDepthTexture(ITexture* texture, bool shared = true);
void removeDepthTexture(ITexture* texture);
void deleteFramebuffers(s32 n, const u32 *framebuffers);
void deleteRenderbuffers(s32 n, const u32 *renderbuffers);
// returns the current size of the screen or rendertarget
virtual const core::dimension2d<u32>& getCurrentRenderTargetSize() const;
//! Convert E_BLEND_FACTOR to OpenGL equivalent
GLenum getGLBlend(E_BLEND_FACTOR factor) const;
//! Get ZBuffer bits.
GLenum getZBufferBits() const;
//! Get current material.
const SMaterial& getCurrentMaterial() const;
//! Get bridge calls.
COGLES2CallBridge* getBridgeCalls() const;
private:
// Bridge calls.
COGLES2CallBridge* BridgeCalls;
void uploadClipPlane(u32 index);
//! inits the opengl-es driver
bool genericDriverInit(const core::dimension2d<u32>& screenSize, bool stencilBuffer);
//! returns a device dependent texture from a software surface (IImage)
virtual video::ITexture* createDeviceDependentTexture(IImage* surface, const io::path& name, void* mipmapData);
//! creates a transposed matrix in supplied GLfloat array to pass to OGLES1
inline void createGLMatrix(float gl_matrix[16], const core::matrix4& m);
inline void createGLTextureMatrix(float gl_matrix[16], const core::matrix4& m);
//! Map Irrlicht wrap mode to OpenGL enum
GLint getTextureWrapMode(u8 clamp) const;
//! sets the needed renderstates
void setRenderStates3DMode();
//! sets the needed renderstates
void setRenderStates2DMode(bool alpha, bool texture, bool alphaChannel);
void createMaterialRenderers();
core::stringw Name;
core::matrix4 Matrices[ETS_COUNT];
//! enumeration for rendering modes such as 2d and 3d for minizing the switching of renderStates.
enum E_RENDER_MODE
{
ERM_NONE = 0, // no render state has been set yet.
ERM_2D, // 2d drawing rendermode
ERM_3D // 3d rendering mode
};
E_RENDER_MODE CurrentRenderMode;
//! bool to make all renderstates reset if set to true.
bool ResetRenderStates;
bool Transformation3DChanged;
u8 AntiAlias;
SMaterial Material, LastMaterial;
COGLES2Texture* RenderTargetTexture;
const ITexture* CurrentTexture[MATERIAL_MAX_TEXTURES];
core::array<ITexture*> DepthTextures;
struct SUserClipPlane
{
core::plane3df Plane;
bool Enabled;
};
core::array<SUserClipPlane> UserClipPlane;
core::dimension2d<u32> CurrentRendertargetSize;
core::stringc vendorName;
core::matrix4 TextureFlipMatrix;
//! Color buffer format
ECOLOR_FORMAT ColorFormat;
//! All the lights that have been requested; a hardware limited
//! number of them will be used at once.
struct RequestedLight
{
RequestedLight(SLight const & lightData)
: LightData(lightData), DesireToBeOn(true) { }
SLight LightData;
bool DesireToBeOn;
};
core::array<RequestedLight> RequestedLights;
SColorf AmbientLight;
COGLES2Renderer2D* MaterialRenderer2D;
#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_
HDC HDc;
#endif
#if defined(_IRR_COMPILE_WITH_IPHONE_DEVICE_)
CIrrDeviceIPhone* Device;
GLuint ViewFramebuffer;
GLuint ViewRenderbuffer;
GLuint ViewDepthRenderbuffer;
#else
NativeWindowType EglWindow;
void* EglDisplay;
void* EglSurface;
void* EglContext;
#endif
SIrrlichtCreationParameters Params;
};
//! This bridge between Irlicht pseudo OpenGL calls
//! and true OpenGL calls.
class COGLES2CallBridge
{
public:
COGLES2CallBridge(COGLES2Driver* driver);
// Blending calls.
void setBlendFunc(GLenum source, GLenum destination);
void setBlend(bool enable);
// Cull face calls.
void setCullFaceFunc(GLenum mode);
void setCullFace(bool enable);
// Depth calls.
void setDepthFunc(GLenum mode);
void setDepthMask(bool enable);
void setDepthTest(bool enable);
// Program calls.
void setProgram(GLuint program);
// Texture calls.
void setActiveTexture(GLenum texture);
void setTexture(u32 stage);
// Viewport calls.
void setViewport(const core::rect<s32>& viewport);
private:
COGLES2Driver* Driver;
GLenum BlendSource;
GLenum BlendDestination;
bool Blend;
GLenum CullFaceMode;
bool CullFace;
GLenum DepthFunc;
bool DepthMask;
bool DepthTest;
GLuint Program;
GLenum ActiveTexture;
const ITexture* Texture[MATERIAL_MAX_TEXTURES];
core::rect<s32> Viewport;
};
} // end namespace video
} // end namespace irr
#endif // _IRR_COMPILE_WITH_OPENGL_
#endif

Some files were not shown because too many files have changed in this diff Show More