mirror of
https://github.com/minetest/irrlicht.git
synced 2025-07-04 01:00:26 +02:00
Compare commits
44 Commits
Author | SHA1 | Date | |
---|---|---|---|
275e152523 | |||
4ca90e3dfd | |||
679dfd3343 | |||
f9d7a632f5 | |||
dc43583a2c | |||
03fd4ff533 | |||
b7292226b4 | |||
7298b46504 | |||
af20d9ff86 | |||
00dd1f8ef3 | |||
364cb37698 | |||
7ce9169d8d | |||
ebdb2e410b | |||
a28b8f9e91 | |||
6cd27d5dca | |||
04ab99f218 | |||
d753c8b782 | |||
6a3ed6428f | |||
3492fd0d2d | |||
c6b06533f3 | |||
e609f5f263 | |||
ddecc0fae2 | |||
dd3a34d674 | |||
0735220f86 | |||
0740d055ac | |||
1d4672bd92 | |||
ef3bab610d | |||
d98dc90b38 | |||
c311d01c07 | |||
d7f75ae882 | |||
e0d4d7d8b4 | |||
fb7a0e4298 | |||
a994c31ccf | |||
c40045a40a | |||
c0ef1092c0 | |||
5ececc7d29 | |||
9e0189019e | |||
b249e4523d | |||
041377c24c | |||
83699a835d | |||
98589d2fd2 | |||
8c856408f5 | |||
cbc7aeb302 | |||
09af5ac00d |
57
.github/workflows/build.yml
vendored
57
.github/workflows/build.yml
vendored
@ -137,49 +137,37 @@ jobs:
|
|||||||
cd bin/Linux
|
cd bin/Linux
|
||||||
LIBGL_ALWAYS_SOFTWARE=true xvfb-run ./AutomatedTest ogles2
|
LIBGL_ALWAYS_SOFTWARE=true xvfb-run ./AutomatedTest ogles2
|
||||||
|
|
||||||
win32:
|
mingw:
|
||||||
|
name: "MinGW ${{matrix.config.variant}}${{matrix.config.extras}}"
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
config:
|
||||||
|
- {variant: win32, arch: i686}
|
||||||
|
- {variant: win64, arch: x86_64}
|
||||||
|
- {variant: win32, arch: i686, extras: "-sdl"}
|
||||||
|
- {variant: win64, arch: x86_64, extras: "-sdl"}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Install compiler
|
- name: Install compiler
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update && sudo apt-get install cmake -qyy
|
sudo apt-get update && sudo apt-get install cmake -qyy
|
||||||
wget http://minetest.kitsunemimi.pw/mingw-w64-i686_11.2.0_ubuntu20.04.tar.xz -O mingw.tar.xz
|
wget http://minetest.kitsunemimi.pw/mingw-w64-${{matrix.config.arch}}_11.2.0_ubuntu20.04.tar.xz -O mingw.tar.xz
|
||||||
sudo tar -xaf mingw.tar.xz -C /usr
|
sudo tar -xaf mingw.tar.xz -C /usr
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
./scripts/ci-build-mingw.sh package
|
./scripts/ci-build-mingw.sh package
|
||||||
env:
|
env:
|
||||||
CC: i686-w64-mingw32-gcc
|
CC: ${{matrix.config.arch}}-w64-mingw32-gcc
|
||||||
CXX: i686-w64-mingw32-g++
|
CXX: ${{matrix.config.arch}}-w64-mingw32-g++
|
||||||
|
extras: ${{matrix.config.extras}}
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: irrlicht-win32
|
name: irrlicht-${{matrix.config.variant}}${{matrix.config.extras}}
|
||||||
path: ./irrlicht-win32.zip
|
path: ./irrlicht-${{matrix.config.variant}}${{matrix.config.extras}}.zip
|
||||||
|
|
||||||
win64:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Install compiler
|
|
||||||
run: |
|
|
||||||
sudo apt-get update && sudo apt-get install cmake -qyy
|
|
||||||
wget http://minetest.kitsunemimi.pw/mingw-w64-x86_64_11.2.0_ubuntu20.04.tar.xz -O mingw.tar.xz
|
|
||||||
sudo tar -xaf mingw.tar.xz -C /usr
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: |
|
|
||||||
./scripts/ci-build-mingw.sh package
|
|
||||||
env:
|
|
||||||
CC: x86_64-w64-mingw32-gcc
|
|
||||||
CXX: x86_64-w64-mingw32-g++
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: irrlicht-win64
|
|
||||||
path: ./irrlicht-win64.zip
|
|
||||||
|
|
||||||
macos:
|
macos:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
@ -200,7 +188,7 @@ jobs:
|
|||||||
./bin/OSX/AutomatedTest null
|
./bin/OSX/AutomatedTest null
|
||||||
|
|
||||||
msvc:
|
msvc:
|
||||||
name: VS 2019 ${{ matrix.config.arch }}
|
name: VS 2019 ${{ matrix.config.arch }} ${{ matrix.sdl.label }}
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
env:
|
env:
|
||||||
VCPKG_VERSION: 14e7bb4ae24616ec54ff6b2f6ef4e8659434ea44
|
VCPKG_VERSION: 14e7bb4ae24616ec54ff6b2f6ef4e8659434ea44
|
||||||
@ -218,6 +206,14 @@ jobs:
|
|||||||
arch: x64
|
arch: x64
|
||||||
generator: "-G'Visual Studio 16 2019' -A x64"
|
generator: "-G'Visual Studio 16 2019' -A x64"
|
||||||
vcpkg_triplet: x64-windows
|
vcpkg_triplet: x64-windows
|
||||||
|
sdl:
|
||||||
|
-
|
||||||
|
use: FALSE
|
||||||
|
label: '(no SDL)'
|
||||||
|
-
|
||||||
|
use: TRUE
|
||||||
|
label: '(with SDL)'
|
||||||
|
vcpkg_packages: sdl2
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@ -226,7 +222,7 @@ jobs:
|
|||||||
- name: Restore from cache and run vcpkg
|
- name: Restore from cache and run vcpkg
|
||||||
uses: lukka/run-vcpkg@v7
|
uses: lukka/run-vcpkg@v7
|
||||||
with:
|
with:
|
||||||
vcpkgArguments: ${{env.vcpkg_packages}}
|
vcpkgArguments: ${{env.vcpkg_packages}} ${{matrix.sdl.vcpkg_packages}}
|
||||||
vcpkgDirectory: '${{ github.workspace }}\vcpkg'
|
vcpkgDirectory: '${{ github.workspace }}\vcpkg'
|
||||||
appendedCacheKey: ${{ matrix.config.vcpkg_triplet }}
|
appendedCacheKey: ${{ matrix.config.vcpkg_triplet }}
|
||||||
vcpkgGitCommitId: ${{ env.VCPKG_VERSION }}
|
vcpkgGitCommitId: ${{ env.VCPKG_VERSION }}
|
||||||
@ -235,6 +231,7 @@ jobs:
|
|||||||
- name: CMake
|
- name: CMake
|
||||||
run: |
|
run: |
|
||||||
cmake ${{matrix.config.generator}} `
|
cmake ${{matrix.config.generator}} `
|
||||||
|
-DUSE_SDL2=${{matrix.sdl.use}} `
|
||||||
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" `
|
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" `
|
||||||
-DCMAKE_BUILD_TYPE=Release .
|
-DCMAKE_BUILD_TYPE=Release .
|
||||||
|
|
||||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -19,3 +19,6 @@ scripts/glext.h
|
|||||||
*.dir/
|
*.dir/
|
||||||
*.sln
|
*.sln
|
||||||
*visualstudio/
|
*visualstudio/
|
||||||
|
|
||||||
|
# vscode cmake plugin
|
||||||
|
build/*
|
@ -7,7 +7,7 @@ else()
|
|||||||
cmake_policy(VERSION 3.11)
|
cmake_policy(VERSION 3.11)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(IRRLICHTMT_REVISION 11)
|
set(IRRLICHTMT_REVISION 12)
|
||||||
|
|
||||||
project(Irrlicht
|
project(Irrlicht
|
||||||
VERSION 1.9.0.${IRRLICHTMT_REVISION}
|
VERSION 1.9.0.${IRRLICHTMT_REVISION}
|
||||||
|
27
build.sh
Executable file
27
build.sh
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
args=(-DBUILD_EXAMPLES=ON -DENABLE_OPENGL=OFF -DBUILD_SHARED_LIBS=OFF)
|
||||||
|
|
||||||
|
export CC=afl-clang-fast
|
||||||
|
export CXX=afl-clang-fast++
|
||||||
|
export LD=$CXX
|
||||||
|
unset AFL_USE_ASAN
|
||||||
|
if ! grep -Fq '/afl-' build2/CMakeCache.txt; then
|
||||||
|
rm -rf build2
|
||||||
|
cmake -S . -B build2 "${args[@]}"
|
||||||
|
fi
|
||||||
|
nice make -C build2 clean
|
||||||
|
nice make -C build2 -j10
|
||||||
|
for f in build2/bin/Linux/*; do
|
||||||
|
ln -snfv "../../$f" "bin/Linux/${f##*/}_noasan"
|
||||||
|
done
|
||||||
|
|
||||||
|
export CC=afl-clang-lto
|
||||||
|
export CXX=afl-clang-lto++
|
||||||
|
export LD=$CXX
|
||||||
|
export AFL_USE_ASAN=1
|
||||||
|
if ! grep -Fq '/afl-' CMakeCache.txt; then
|
||||||
|
rm -f CMakeCache.txt
|
||||||
|
cmake . "${args[@]}"
|
||||||
|
fi
|
||||||
|
nice make clean
|
||||||
|
nice make -j10
|
@ -100,10 +100,12 @@ int main(int argc, char *argv[])
|
|||||||
scene::IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode(mesh);
|
scene::IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode(mesh);
|
||||||
if (node)
|
if (node)
|
||||||
{
|
{
|
||||||
node->setMaterialFlag(video::EMF_LIGHTING, false);
|
node->forEachMaterial([tex] (video::SMaterial &mat) {
|
||||||
|
mat.Lighting = false;
|
||||||
|
mat.setTexture(0, tex);
|
||||||
|
});
|
||||||
node->setFrameLoop(0, 29);
|
node->setFrameLoop(0, 29);
|
||||||
node->setAnimationSpeed(30);
|
node->setAnimationSpeed(30);
|
||||||
node->setMaterialTexture(0, tex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
set(IRREXAMPLES
|
set(IRREXAMPLES
|
||||||
# removed
|
LoadTexture
|
||||||
|
LoadMesh
|
||||||
)
|
)
|
||||||
if(UNIX)
|
if(FALSE)
|
||||||
list(APPEND IRREXAMPLES AutomatedTest)
|
list(APPEND IRREXAMPLES AutomatedTest)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
44
examples/LoadMesh/main.cpp
Normal file
44
examples/LoadMesh/main.cpp
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
#include <irrlicht.h>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
using namespace irr;
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
if (argc < 2)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
SIrrlichtCreationParameters p;
|
||||||
|
p.DriverType = video::EDT_NULL;
|
||||||
|
p.WindowSize = core::dimension2du(640, 480);
|
||||||
|
p.LoggingLevel = ELL_DEBUG;
|
||||||
|
|
||||||
|
auto *device = createDeviceEx(p);
|
||||||
|
if (!device)
|
||||||
|
return 1;
|
||||||
|
auto *smgr = device->getSceneManager();
|
||||||
|
|
||||||
|
while (__AFL_LOOP(10000)) {
|
||||||
|
auto *mfile = device->getFileSystem()->createAndOpenFile(argv[1]);
|
||||||
|
if (!mfile)
|
||||||
|
continue;
|
||||||
|
scene::IAnimatedMesh *mesh;
|
||||||
|
// Irrlicht matches on file extension so we have to do this by hand
|
||||||
|
for (u32 i = 0; i < smgr->getMeshLoaderCount(); i++) {
|
||||||
|
mfile->seek(0);
|
||||||
|
mesh = smgr->getMeshLoader(i)->createMesh(mfile);
|
||||||
|
if (mesh) {
|
||||||
|
core::stringc msg("Loaded using loader #");
|
||||||
|
msg += core::stringc(i);
|
||||||
|
device->getLogger()->log(msg.c_str(), ELL_DEBUG);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (mesh)
|
||||||
|
mesh->drop();
|
||||||
|
mfile->drop();
|
||||||
|
}
|
||||||
|
|
||||||
|
device->drop();
|
||||||
|
return 0;
|
||||||
|
}
|
29
examples/LoadTexture/main.cpp
Normal file
29
examples/LoadTexture/main.cpp
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#include <irrlicht.h>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
using namespace irr;
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
if (argc < 2)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
SIrrlichtCreationParameters p;
|
||||||
|
p.DriverType = video::EDT_NULL;
|
||||||
|
p.WindowSize = core::dimension2du(640, 480);
|
||||||
|
p.LoggingLevel = ELL_DEBUG;
|
||||||
|
|
||||||
|
auto *device = createDeviceEx(p);
|
||||||
|
if (!device)
|
||||||
|
return 1;
|
||||||
|
auto *driver = device->getVideoDriver();
|
||||||
|
|
||||||
|
while (__AFL_LOOP(10000)) {
|
||||||
|
auto *tex = driver->getTexture(argv[1]);
|
||||||
|
if (tex)
|
||||||
|
driver->removeTexture(tex);
|
||||||
|
}
|
||||||
|
|
||||||
|
device->drop();
|
||||||
|
return 0;
|
||||||
|
}
|
@ -28,9 +28,6 @@ namespace scene
|
|||||||
//! Overlays Mesh Wireframe
|
//! Overlays Mesh Wireframe
|
||||||
EDS_MESH_WIRE_OVERLAY = 8,
|
EDS_MESH_WIRE_OVERLAY = 8,
|
||||||
|
|
||||||
//! Temporary use transparency Material Type
|
|
||||||
EDS_HALF_TRANSPARENCY = 16,
|
|
||||||
|
|
||||||
//! Show Bounding Boxes of all MeshBuffers
|
//! Show Bounding Boxes of all MeshBuffers
|
||||||
EDS_BBOX_BUFFERS = 32,
|
EDS_BBOX_BUFFERS = 32,
|
||||||
|
|
||||||
|
@ -20,13 +20,6 @@ namespace video
|
|||||||
render and display any graphics. */
|
render and display any graphics. */
|
||||||
EDT_NULL,
|
EDT_NULL,
|
||||||
|
|
||||||
// obsolete constants to make some code happy
|
|
||||||
// TODO delete
|
|
||||||
EDT_SOFTWARE,
|
|
||||||
EDT_BURNINGSVIDEO,
|
|
||||||
DEPRECATED_EDT_DIRECT3D8_NO_LONGER_EXISTS,
|
|
||||||
EDT_DIRECT3D9,
|
|
||||||
|
|
||||||
//! OpenGL device, available on most platforms.
|
//! OpenGL device, available on most platforms.
|
||||||
/** Performs hardware accelerated rendering of 3D and 2D
|
/** Performs hardware accelerated rendering of 3D and 2D
|
||||||
primitives. */
|
primitives. */
|
||||||
|
@ -1,101 +0,0 @@
|
|||||||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
|
||||||
// This file is part of the "Irrlicht Engine".
|
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
|
||||||
|
|
||||||
#ifndef __E_MATERIAL_FLAGS_H_INCLUDED__
|
|
||||||
#define __E_MATERIAL_FLAGS_H_INCLUDED__
|
|
||||||
|
|
||||||
namespace irr
|
|
||||||
{
|
|
||||||
namespace video
|
|
||||||
{
|
|
||||||
|
|
||||||
//! Material flags
|
|
||||||
enum E_MATERIAL_FLAG
|
|
||||||
{
|
|
||||||
//! Draw as wireframe or filled triangles? Default: false
|
|
||||||
EMF_WIREFRAME = 0x1,
|
|
||||||
|
|
||||||
//! Draw as point cloud or filled triangles? Default: false
|
|
||||||
EMF_POINTCLOUD = 0x2,
|
|
||||||
|
|
||||||
//! Flat or Gouraud shading? Default: true
|
|
||||||
EMF_GOURAUD_SHADING = 0x4,
|
|
||||||
|
|
||||||
//! Will this material be lighted? Default: true
|
|
||||||
EMF_LIGHTING = 0x8,
|
|
||||||
|
|
||||||
//! Is the ZBuffer enabled? Default: true
|
|
||||||
EMF_ZBUFFER = 0x10,
|
|
||||||
|
|
||||||
//! May be written to the zbuffer or is it readonly. Default: true
|
|
||||||
/** This flag is ignored, if the material type is a transparent type. */
|
|
||||||
EMF_ZWRITE_ENABLE = 0x20,
|
|
||||||
|
|
||||||
//! Is backface culling enabled? Default: true
|
|
||||||
EMF_BACK_FACE_CULLING = 0x40,
|
|
||||||
|
|
||||||
//! Is frontface culling enabled? Default: false
|
|
||||||
/** Overrides EMF_BACK_FACE_CULLING if both are enabled. */
|
|
||||||
EMF_FRONT_FACE_CULLING = 0x80,
|
|
||||||
|
|
||||||
//! Is bilinear filtering enabled? Default: true
|
|
||||||
EMF_BILINEAR_FILTER = 0x100,
|
|
||||||
|
|
||||||
//! Is trilinear filtering enabled? Default: false
|
|
||||||
/** If the trilinear filter flag is enabled,
|
|
||||||
the bilinear filtering flag is ignored. */
|
|
||||||
EMF_TRILINEAR_FILTER = 0x200,
|
|
||||||
|
|
||||||
//! Is anisotropic filtering? Default: false
|
|
||||||
/** In Irrlicht you can use anisotropic texture filtering in
|
|
||||||
conjunction with bilinear or trilinear texture filtering
|
|
||||||
to improve rendering results. Primitives will look less
|
|
||||||
blurry with this flag switched on. */
|
|
||||||
EMF_ANISOTROPIC_FILTER = 0x400,
|
|
||||||
|
|
||||||
//! Is fog enabled? Default: false
|
|
||||||
EMF_FOG_ENABLE = 0x800,
|
|
||||||
|
|
||||||
//! Normalizes normals. Default: false
|
|
||||||
/** You can enable this if you need to scale a dynamic lighted
|
|
||||||
model. Usually, its normals will get scaled too then and it
|
|
||||||
will get darker. If you enable the EMF_NORMALIZE_NORMALS flag,
|
|
||||||
the normals will be normalized again, and the model will look
|
|
||||||
as bright as it should. */
|
|
||||||
EMF_NORMALIZE_NORMALS = 0x1000,
|
|
||||||
|
|
||||||
//! Access to all layers texture wrap settings. Overwrites separate layer settings.
|
|
||||||
/** Note that if you want to change TextureWrapU, TextureWrapV, TextureWrapW
|
|
||||||
independently, then you can't work with this flag, but will have to set the variables
|
|
||||||
directly. */
|
|
||||||
EMF_TEXTURE_WRAP = 0x2000,
|
|
||||||
|
|
||||||
//! AntiAliasing mode
|
|
||||||
EMF_ANTI_ALIASING = 0x4000,
|
|
||||||
|
|
||||||
//! ColorMask bits, for enabling the color planes
|
|
||||||
EMF_COLOR_MASK = 0x8000,
|
|
||||||
|
|
||||||
//! ColorMaterial enum for vertex color interpretation
|
|
||||||
EMF_COLOR_MATERIAL = 0x10000,
|
|
||||||
|
|
||||||
//! Flag for enabling/disabling mipmap usage
|
|
||||||
EMF_USE_MIP_MAPS = 0x20000,
|
|
||||||
|
|
||||||
//! Flag for blend operation
|
|
||||||
EMF_BLEND_OPERATION = 0x40000,
|
|
||||||
|
|
||||||
//! Flag for polygon offset
|
|
||||||
EMF_POLYGON_OFFSET = 0x80000,
|
|
||||||
|
|
||||||
//! Flag for blend factor
|
|
||||||
EMF_BLEND_FACTOR = 0x160000
|
|
||||||
};
|
|
||||||
|
|
||||||
} // end namespace video
|
|
||||||
} // end namespace irr
|
|
||||||
|
|
||||||
|
|
||||||
#endif // __E_MATERIAL_FLAGS_H_INCLUDED__
|
|
||||||
|
|
87
include/EMaterialProps.h
Normal file
87
include/EMaterialProps.h
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||||
|
// This file is part of the "Irrlicht Engine".
|
||||||
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
|
#ifndef __E_MATERIAL_PROPS_H_INCLUDED__
|
||||||
|
#define __E_MATERIAL_PROPS_H_INCLUDED__
|
||||||
|
|
||||||
|
namespace irr
|
||||||
|
{
|
||||||
|
namespace video
|
||||||
|
{
|
||||||
|
|
||||||
|
//! Material properties
|
||||||
|
enum E_MATERIAL_PROP
|
||||||
|
{
|
||||||
|
//! Corresponds to SMaterial::Wireframe.
|
||||||
|
EMP_WIREFRAME = 0x1,
|
||||||
|
|
||||||
|
//! Corresponds to SMaterial::PointCloud.
|
||||||
|
EMP_POINTCLOUD = 0x2,
|
||||||
|
|
||||||
|
//! Corresponds to SMaterial::GouraudShading.
|
||||||
|
EMP_GOURAUD_SHADING = 0x4,
|
||||||
|
|
||||||
|
//! Corresponds to SMaterial::Lighting.
|
||||||
|
EMP_LIGHTING = 0x8,
|
||||||
|
|
||||||
|
//! Corresponds to SMaterial::ZBuffer.
|
||||||
|
EMP_ZBUFFER = 0x10,
|
||||||
|
|
||||||
|
//! Corresponds to SMaterial::ZWriteEnable.
|
||||||
|
EMP_ZWRITE_ENABLE = 0x20,
|
||||||
|
|
||||||
|
//! Corresponds to SMaterial::BackfaceCulling.
|
||||||
|
EMP_BACK_FACE_CULLING = 0x40,
|
||||||
|
|
||||||
|
//! Corresponds to SMaterial::FrontfaceCulling.
|
||||||
|
EMP_FRONT_FACE_CULLING = 0x80,
|
||||||
|
|
||||||
|
//! Corresponds to SMaterialLayer::MinFilter.
|
||||||
|
EMP_MIN_FILTER = 0x100,
|
||||||
|
|
||||||
|
//! Corresponds to SMaterialLayer::MagFilter.
|
||||||
|
EMP_MAG_FILTER = 0x200,
|
||||||
|
|
||||||
|
//! Corresponds to SMaterialLayer::AnisotropicFilter.
|
||||||
|
EMP_ANISOTROPIC_FILTER = 0x400,
|
||||||
|
|
||||||
|
//! Corresponds to SMaterial::FogEnable.
|
||||||
|
EMP_FOG_ENABLE = 0x800,
|
||||||
|
|
||||||
|
//! Corresponds to SMaterial::NormalizeNormals.
|
||||||
|
EMP_NORMALIZE_NORMALS = 0x1000,
|
||||||
|
|
||||||
|
//! Corresponds to SMaterialLayer::TextureWrapU, TextureWrapV and
|
||||||
|
//! TextureWrapW.
|
||||||
|
EMP_TEXTURE_WRAP = 0x2000,
|
||||||
|
|
||||||
|
//! Corresponds to SMaterial::AntiAliasing.
|
||||||
|
EMP_ANTI_ALIASING = 0x4000,
|
||||||
|
|
||||||
|
//! Corresponds to SMaterial::ColorMask.
|
||||||
|
EMP_COLOR_MASK = 0x8000,
|
||||||
|
|
||||||
|
//! Corresponds to SMaterial::ColorMaterial.
|
||||||
|
EMP_COLOR_MATERIAL = 0x10000,
|
||||||
|
|
||||||
|
//! Corresponds to SMaterial::UseMipMaps.
|
||||||
|
EMP_USE_MIP_MAPS = 0x20000,
|
||||||
|
|
||||||
|
//! Corresponds to SMaterial::BlendOperation.
|
||||||
|
EMP_BLEND_OPERATION = 0x40000,
|
||||||
|
|
||||||
|
//! Corresponds to SMaterial::PolygonOffsetFactor, PolygonOffsetDirection,
|
||||||
|
//! PolygonOffsetDepthBias and PolygonOffsetSlopeScale.
|
||||||
|
EMP_POLYGON_OFFSET = 0x80000,
|
||||||
|
|
||||||
|
//! Corresponds to SMaterial::BlendFactor.
|
||||||
|
EMP_BLEND_FACTOR = 0x100000,
|
||||||
|
};
|
||||||
|
|
||||||
|
} // end namespace video
|
||||||
|
} // end namespace irr
|
||||||
|
|
||||||
|
|
||||||
|
#endif // __E_MATERIAL_PROPS_H_INCLUDED__
|
||||||
|
|
@ -18,75 +18,6 @@ namespace video
|
|||||||
diffuse material. */
|
diffuse material. */
|
||||||
EMT_SOLID = 0,
|
EMT_SOLID = 0,
|
||||||
|
|
||||||
//! Solid material with 2 texture layers.
|
|
||||||
/** The second is blended onto the first using the alpha value
|
|
||||||
of the vertex colors. This material is currently not implemented in OpenGL.
|
|
||||||
*/
|
|
||||||
EMT_SOLID_2_LAYER,
|
|
||||||
|
|
||||||
//! Material type with standard lightmap technique
|
|
||||||
/** There should be 2 textures: The first texture layer is a
|
|
||||||
diffuse map, the second is a light map. Dynamic light is
|
|
||||||
ignored. */
|
|
||||||
EMT_LIGHTMAP,
|
|
||||||
|
|
||||||
//! Material type with lightmap technique like EMT_LIGHTMAP.
|
|
||||||
/** But lightmap and diffuse texture are added instead of modulated. */
|
|
||||||
EMT_LIGHTMAP_ADD,
|
|
||||||
|
|
||||||
//! Material type with standard lightmap technique
|
|
||||||
/** There should be 2 textures: The first texture layer is a
|
|
||||||
diffuse map, the second is a light map. Dynamic light is
|
|
||||||
ignored. The texture colors are effectively multiplied by 2
|
|
||||||
for brightening. Like known in DirectX as D3DTOP_MODULATE2X. */
|
|
||||||
EMT_LIGHTMAP_M2,
|
|
||||||
|
|
||||||
//! Material type with standard lightmap technique
|
|
||||||
/** There should be 2 textures: The first texture layer is a
|
|
||||||
diffuse map, the second is a light map. Dynamic light is
|
|
||||||
ignored. The texture colors are effectively multiplied by 4
|
|
||||||
for brightening. Like known in DirectX as D3DTOP_MODULATE4X. */
|
|
||||||
EMT_LIGHTMAP_M4,
|
|
||||||
|
|
||||||
//! Like EMT_LIGHTMAP, but also supports dynamic lighting.
|
|
||||||
EMT_LIGHTMAP_LIGHTING,
|
|
||||||
|
|
||||||
//! Like EMT_LIGHTMAP_M2, but also supports dynamic lighting.
|
|
||||||
EMT_LIGHTMAP_LIGHTING_M2,
|
|
||||||
|
|
||||||
//! Like EMT_LIGHTMAP_M4, but also supports dynamic lighting.
|
|
||||||
EMT_LIGHTMAP_LIGHTING_M4,
|
|
||||||
|
|
||||||
//! Detail mapped material.
|
|
||||||
/** The first texture is diffuse color map, the second is added
|
|
||||||
to this and usually displayed with a bigger scale value so that
|
|
||||||
it adds more detail. The detail map is added to the diffuse map
|
|
||||||
using ADD_SIGNED, so that it is possible to add and subtract
|
|
||||||
color from the diffuse map. For example a value of
|
|
||||||
(127,127,127) will not change the appearance of the diffuse map
|
|
||||||
at all. Often used for terrain rendering. */
|
|
||||||
EMT_DETAIL_MAP,
|
|
||||||
|
|
||||||
//! Look like a reflection of the environment around it.
|
|
||||||
/** To make this possible, a texture called 'sphere map' is
|
|
||||||
used, which must be set as the first texture. */
|
|
||||||
EMT_SPHERE_MAP,
|
|
||||||
|
|
||||||
//! A reflecting material with an optional non reflecting texture layer.
|
|
||||||
/** The reflection map should be set as first texture. */
|
|
||||||
EMT_REFLECTION_2_LAYER,
|
|
||||||
|
|
||||||
//! A transparent material.
|
|
||||||
/** Only the first texture is used. The new color is calculated
|
|
||||||
by simply adding the source color and the dest color. This
|
|
||||||
means if for example a billboard using a texture with black
|
|
||||||
background and a red circle on it is drawn with this material,
|
|
||||||
the result is that only the red circle will be drawn a little
|
|
||||||
bit transparent, and everything which was black is 100%
|
|
||||||
transparent and not visible. This material type is useful for
|
|
||||||
particle effects. */
|
|
||||||
EMT_TRANSPARENT_ADD_COLOR,
|
|
||||||
|
|
||||||
//! Makes the material transparent based on the texture alpha channel.
|
//! Makes the material transparent based on the texture alpha channel.
|
||||||
/** The final color is blended together from the destination
|
/** The final color is blended together from the destination
|
||||||
color and the texture color, using the alpha channel value as
|
color and the texture color, using the alpha channel value as
|
||||||
@ -115,12 +46,6 @@ namespace video
|
|||||||
//! Makes the material transparent based on the vertex alpha value.
|
//! Makes the material transparent based on the vertex alpha value.
|
||||||
EMT_TRANSPARENT_VERTEX_ALPHA,
|
EMT_TRANSPARENT_VERTEX_ALPHA,
|
||||||
|
|
||||||
//! A transparent reflecting material with an optional additional non reflecting texture layer.
|
|
||||||
/** The reflection map should be set as first texture. The
|
|
||||||
transparency depends on the alpha value in the vertex colors. A
|
|
||||||
texture which will not reflect can be set as second texture.*/
|
|
||||||
EMT_TRANSPARENT_REFLECTION_2_LAYER,
|
|
||||||
|
|
||||||
//! BlendFunc = source * sourceFactor + dest * destFactor ( E_BLEND_FUNC )
|
//! BlendFunc = source * sourceFactor + dest * destFactor ( E_BLEND_FUNC )
|
||||||
/** Using only first texture. Generic blending method.
|
/** Using only first texture. Generic blending method.
|
||||||
The blend function is set to SMaterial::MaterialTypeParam with
|
The blend function is set to SMaterial::MaterialTypeParam with
|
||||||
@ -135,22 +60,9 @@ namespace video
|
|||||||
const char* const sBuiltInMaterialTypeNames[] =
|
const char* const sBuiltInMaterialTypeNames[] =
|
||||||
{
|
{
|
||||||
"solid",
|
"solid",
|
||||||
"solid_2layer",
|
|
||||||
"lightmap",
|
|
||||||
"lightmap_add",
|
|
||||||
"lightmap_m2",
|
|
||||||
"lightmap_m4",
|
|
||||||
"lightmap_light",
|
|
||||||
"lightmap_light_m2",
|
|
||||||
"lightmap_light_m4",
|
|
||||||
"detail_map",
|
|
||||||
"sphere_map",
|
|
||||||
"reflection_2layer",
|
|
||||||
"trans_add",
|
|
||||||
"trans_alphach",
|
"trans_alphach",
|
||||||
"trans_alphach_ref",
|
"trans_alphach_ref",
|
||||||
"trans_vertex_alpha",
|
"trans_vertex_alpha",
|
||||||
"trans_reflection_2layer",
|
|
||||||
"onetexture_blend",
|
"onetexture_blend",
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
@ -36,20 +36,6 @@ namespace scene
|
|||||||
//! Explicitly set all vertices for each triangle.
|
//! Explicitly set all vertices for each triangle.
|
||||||
EPT_TRIANGLES,
|
EPT_TRIANGLES,
|
||||||
|
|
||||||
//! After the first two vertices each further two vertices create a quad with the preceding two.
|
|
||||||
//! Not supported by Direct3D
|
|
||||||
EPT_QUAD_STRIP,
|
|
||||||
|
|
||||||
//! Every four vertices create a quad.
|
|
||||||
//! Not supported by Direct3D
|
|
||||||
//! Deprecated with newer OpenGL drivers
|
|
||||||
EPT_QUADS,
|
|
||||||
|
|
||||||
//! Just as LINE_LOOP, but filled.
|
|
||||||
//! Not supported by Direct3D
|
|
||||||
//! Deprecated with newer OpenGL drivers
|
|
||||||
EPT_POLYGON,
|
|
||||||
|
|
||||||
//! The single vertices are expanded to quad billboards on the GPU.
|
//! The single vertices are expanded to quad billboards on the GPU.
|
||||||
EPT_POINT_SPRITES
|
EPT_POINT_SPRITES
|
||||||
};
|
};
|
||||||
|
@ -59,10 +59,6 @@ namespace scene
|
|||||||
IBoneSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id=-1) :
|
IBoneSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id=-1) :
|
||||||
ISceneNode(parent, mgr, id),positionHint(-1),scaleHint(-1),rotationHint(-1) { }
|
ISceneNode(parent, mgr, id),positionHint(-1),scaleHint(-1),rotationHint(-1) { }
|
||||||
|
|
||||||
//! Get the name of the bone
|
|
||||||
/** \deprecated Use getName instead. This method may be removed by Irrlicht 1.9 */
|
|
||||||
_IRR_DEPRECATED_ virtual const c8* getBoneName() const { return getName(); }
|
|
||||||
|
|
||||||
//! Get the index of the bone
|
//! Get the index of the bone
|
||||||
virtual u32 getBoneIndex() const = 0;
|
virtual u32 getBoneIndex() const = 0;
|
||||||
|
|
||||||
|
@ -210,58 +210,6 @@ public:
|
|||||||
\return A pointer to the specified loader, 0 if the index is incorrect. */
|
\return A pointer to the specified loader, 0 if the index is incorrect. */
|
||||||
virtual IArchiveLoader* getArchiveLoader(u32 index) const = 0;
|
virtual IArchiveLoader* getArchiveLoader(u32 index) const = 0;
|
||||||
|
|
||||||
//! Adds a zip archive to the file system.
|
|
||||||
/** \deprecated This function is provided for compatibility
|
|
||||||
with older versions of Irrlicht and may be removed in Irrlicht 1.9,
|
|
||||||
you should use addFileArchive instead.
|
|
||||||
After calling this, the Irrlicht Engine will search and open files directly from this archive too.
|
|
||||||
This is useful for hiding data from the end user, speeding up file access and making it possible to
|
|
||||||
access for example Quake3 .pk3 files, which are no different than .zip files.
|
|
||||||
\param filename: Filename of the zip archive to add to the file system.
|
|
||||||
\param ignoreCase: If set to true, files in the archive can be accessed without
|
|
||||||
writing all letters in the right case.
|
|
||||||
\param ignorePaths: If set to true, files in the added archive can be accessed
|
|
||||||
without its complete path.
|
|
||||||
\return True if the archive was added successfully, false if not. */
|
|
||||||
_IRR_DEPRECATED_ virtual bool addZipFileArchive(const c8* filename, bool ignoreCase=true, bool ignorePaths=true)
|
|
||||||
{
|
|
||||||
return addFileArchive(filename, ignoreCase, ignorePaths, EFAT_ZIP);
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Adds an unzipped archive (or basedirectory with subdirectories..) to the file system.
|
|
||||||
/** \deprecated This function is provided for compatibility
|
|
||||||
with older versions of Irrlicht and may be removed in Irrlicht 1.9,
|
|
||||||
you should use addFileArchive instead.
|
|
||||||
Useful for handling data which will be in a zip file
|
|
||||||
\param filename: Filename of the unzipped zip archive base directory to add to the file system.
|
|
||||||
\param ignoreCase: If set to true, files in the archive can be accessed without
|
|
||||||
writing all letters in the right case.
|
|
||||||
\param ignorePaths: If set to true, files in the added archive can be accessed
|
|
||||||
without its complete path.
|
|
||||||
\return True if the archive was added successful, false if not. */
|
|
||||||
_IRR_DEPRECATED_ virtual bool addFolderFileArchive(const c8* filename, bool ignoreCase=true, bool ignorePaths=true)
|
|
||||||
{
|
|
||||||
return addFileArchive(filename, ignoreCase, ignorePaths, EFAT_FOLDER);
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Adds a pak archive to the file system.
|
|
||||||
/** \deprecated This function is provided for compatibility
|
|
||||||
with older versions of Irrlicht and may be removed in Irrlicht 1.9,
|
|
||||||
you should use addFileArchive instead.
|
|
||||||
After calling this, the Irrlicht Engine will search and open files directly from this archive too.
|
|
||||||
This is useful for hiding data from the end user, speeding up file access and making it possible to
|
|
||||||
access for example Quake2/KingPin/Hexen2 .pak files
|
|
||||||
\param filename: Filename of the pak archive to add to the file system.
|
|
||||||
\param ignoreCase: If set to true, files in the archive can be accessed without
|
|
||||||
writing all letters in the right case.
|
|
||||||
\param ignorePaths: If set to true, files in the added archive can be accessed
|
|
||||||
without its complete path.(should not use with Quake2 paks
|
|
||||||
\return True if the archive was added successful, false if not. */
|
|
||||||
_IRR_DEPRECATED_ virtual bool addPakFileArchive(const c8* filename, bool ignoreCase=true, bool ignorePaths=true)
|
|
||||||
{
|
|
||||||
return addFileArchive(filename, ignoreCase, ignorePaths, EFAT_PAK);
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Get the current working directory.
|
//! Get the current working directory.
|
||||||
/** \return Current working directory as a string. */
|
/** \return Current working directory as a string. */
|
||||||
virtual const path& getWorkingDirectory() =0;
|
virtual const path& getWorkingDirectory() =0;
|
||||||
|
@ -129,15 +129,6 @@ namespace gui
|
|||||||
IGUITab(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
|
IGUITab(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
|
||||||
: IGUIElement(EGUIET_TAB, environment, parent, id, rectangle) {}
|
: IGUIElement(EGUIET_TAB, environment, parent, id, rectangle) {}
|
||||||
|
|
||||||
//! Returns zero based index of tab if in tabcontrol.
|
|
||||||
/** \deprecated Deprecated in 1.9, use IGUITabControl::getTabIndex instead*/
|
|
||||||
_IRR_DEPRECATED_ virtual s32 getNumber() const
|
|
||||||
{
|
|
||||||
if (Parent && Parent->getType() == EGUIET_TAB_CONTROL)
|
|
||||||
return static_cast<IGUITabControl*>(Parent)->getTabIndex(this);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! sets if the tab should draw its background
|
//! sets if the tab should draw its background
|
||||||
virtual void setDrawBackground(bool draw=true) = 0;
|
virtual void setDrawBackground(bool draw=true) = 0;
|
||||||
|
|
||||||
|
@ -183,24 +183,6 @@ public:
|
|||||||
return Data;
|
return Data;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Lock function. Use this to get a pointer to the image data.
|
|
||||||
/** Use getData instead.
|
|
||||||
\return Pointer to the image data. What type of data is pointed to
|
|
||||||
depends on the color format of the image. For example if the color
|
|
||||||
format is ECF_A8R8G8B8, it is of u32. Be sure to call unlock() after
|
|
||||||
you don't need the pointer any more. */
|
|
||||||
_IRR_DEPRECATED_ void* lock()
|
|
||||||
{
|
|
||||||
return getData();
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Unlock function.
|
|
||||||
/** Should be called after the pointer received by lock() is not
|
|
||||||
needed anymore. */
|
|
||||||
_IRR_DEPRECATED_ void unlock()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Get the mipmap size for this image for a certain mipmap level
|
//! Get the mipmap size for this image for a certain mipmap level
|
||||||
/** level 0 will be full image size. Every further level is half the size.
|
/** level 0 will be full image size. Every further level is half the size.
|
||||||
Doesn't care if the image actually has mipmaps, just which size would be needed. */
|
Doesn't care if the image actually has mipmaps, just which size would be needed. */
|
||||||
@ -367,19 +349,6 @@ public:
|
|||||||
//! fills the surface with given color
|
//! fills the surface with given color
|
||||||
virtual void fill(const SColor &color) =0;
|
virtual void fill(const SColor &color) =0;
|
||||||
|
|
||||||
//! Inform whether the image is compressed
|
|
||||||
_IRR_DEPRECATED_ bool isCompressed() const
|
|
||||||
{
|
|
||||||
return IImage::isCompressedFormat(Format);
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Check whether the image has MipMaps
|
|
||||||
/** \return True if image has MipMaps, else false. */
|
|
||||||
_IRR_DEPRECATED_ bool hasMipMaps() const
|
|
||||||
{
|
|
||||||
return (getMipMapsData() != 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
//! get the amount of Bits per Pixel of the given color format
|
//! get the amount of Bits per Pixel of the given color format
|
||||||
static u32 getBitsPerPixelFromFormat(const ECOLOR_FORMAT format)
|
static u32 getBitsPerPixelFromFormat(const ECOLOR_FORMAT format)
|
||||||
{
|
{
|
||||||
|
@ -115,30 +115,6 @@ public:
|
|||||||
\param constantAmount Amount of registers to be set. One register consists of 4 floats. */
|
\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;
|
virtual void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) = 0;
|
||||||
|
|
||||||
//! \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);
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Get pointer to the IVideoDriver interface
|
//! Get pointer to the IVideoDriver interface
|
||||||
/** \return Pointer to the IVideoDriver interface */
|
/** \return Pointer to the IVideoDriver interface */
|
||||||
virtual IVideoDriver* getVideoDriver() = 0;
|
virtual IVideoDriver* getVideoDriver() = 0;
|
||||||
|
@ -97,11 +97,6 @@ namespace scene
|
|||||||
/** \param box New bounding box to use for the mesh. */
|
/** \param box New bounding box to use for the mesh. */
|
||||||
virtual void setBoundingBox( const core::aabbox3df& box) = 0;
|
virtual void setBoundingBox( const core::aabbox3df& box) = 0;
|
||||||
|
|
||||||
//! Sets a flag of all contained materials to a new value.
|
|
||||||
/** \param flag: Flag to set in all materials.
|
|
||||||
\param newvalue: New value to set in all materials. */
|
|
||||||
virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) = 0;
|
|
||||||
|
|
||||||
//! Set the hardware mapping hint
|
//! Set the hardware mapping hint
|
||||||
/** This methods allows to define optimization hints for the
|
/** This methods allows to define optimization hints for the
|
||||||
hardware. This enables, e.g., the use of hardware buffers on
|
hardware. This enables, e.g., the use of hardware buffers on
|
||||||
|
@ -172,9 +172,6 @@ namespace scene
|
|||||||
case scene::EPT_TRIANGLE_STRIP: return (indexCount-2);
|
case scene::EPT_TRIANGLE_STRIP: return (indexCount-2);
|
||||||
case scene::EPT_TRIANGLE_FAN: return (indexCount-2);
|
case scene::EPT_TRIANGLE_FAN: return (indexCount-2);
|
||||||
case scene::EPT_TRIANGLES: return indexCount/3;
|
case scene::EPT_TRIANGLES: return indexCount/3;
|
||||||
case scene::EPT_QUAD_STRIP: return (indexCount-2)/2;
|
|
||||||
case scene::EPT_QUADS: return indexCount/4;
|
|
||||||
case scene::EPT_POLYGON: return indexCount; // (not really primitives, that would be 1, works like line_strip)
|
|
||||||
case scene::EPT_POINT_SPRITES: return indexCount;
|
case scene::EPT_POINT_SPRITES: return indexCount;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -78,46 +78,6 @@ namespace scene
|
|||||||
number. */
|
number. */
|
||||||
virtual IAnimatedMesh* getMeshByIndex(u32 index) = 0;
|
virtual IAnimatedMesh* getMeshByIndex(u32 index) = 0;
|
||||||
|
|
||||||
//! Returns a mesh based on its name (often a filename).
|
|
||||||
/** \deprecated Use getMeshByName() instead. This method may be removed by
|
|
||||||
Irrlicht 1.9 */
|
|
||||||
_IRR_DEPRECATED_ IAnimatedMesh* getMeshByFilename(const io::path& filename)
|
|
||||||
{
|
|
||||||
return getMeshByName(filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Get the name of a loaded mesh, based on its index. (Name is often identical to the filename).
|
|
||||||
/** \deprecated Use getMeshName() instead. This method may be removed by
|
|
||||||
Irrlicht 1.9 */
|
|
||||||
_IRR_DEPRECATED_ const io::path& getMeshFilename(u32 index) const
|
|
||||||
{
|
|
||||||
return getMeshName(index).getInternalName();
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Get the name of a loaded mesh, if there is any. (Name is often identical to the filename).
|
|
||||||
/** \deprecated Use getMeshName() instead. This method may be removed by
|
|
||||||
Irrlicht 1.9 */
|
|
||||||
_IRR_DEPRECATED_ const io::path& getMeshFilename(const IMesh* const mesh) const
|
|
||||||
{
|
|
||||||
return getMeshName(mesh).getInternalName();
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Renames a loaded mesh.
|
|
||||||
/** \deprecated Use renameMesh() instead. This method may be removed by
|
|
||||||
Irrlicht 1.9 */
|
|
||||||
_IRR_DEPRECATED_ bool setMeshFilename(u32 index, const io::path& filename)
|
|
||||||
{
|
|
||||||
return renameMesh(index, filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Renames a loaded mesh.
|
|
||||||
/** \deprecated Use renameMesh() instead. This method may be removed by
|
|
||||||
Irrlicht 1.9 */
|
|
||||||
_IRR_DEPRECATED_ bool setMeshFilename(const IMesh* const mesh, const io::path& filename)
|
|
||||||
{
|
|
||||||
return renameMesh(mesh, filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Returns a mesh based on its name.
|
//! Returns a mesh based on its name.
|
||||||
/** \param name Name of the mesh. Usually a filename.
|
/** \param name Name of the mesh. Usually a filename.
|
||||||
\return Pointer to the mesh or 0 if there is none with this number. */
|
\return Pointer to the mesh or 0 if there is none with this number. */
|
||||||
|
@ -18,13 +18,6 @@ public:
|
|||||||
//! Get the current operation system version as string.
|
//! Get the current operation system version as string.
|
||||||
virtual const core::stringc& getOperatingSystemVersion() const = 0;
|
virtual const core::stringc& getOperatingSystemVersion() const = 0;
|
||||||
|
|
||||||
//! Get the current operation system version as string.
|
|
||||||
/** \deprecated Use getOperatingSystemVersion instead. This method will be removed in Irrlicht 1.9. */
|
|
||||||
_IRR_DEPRECATED_ const wchar_t* getOperationSystemVersion() const
|
|
||||||
{
|
|
||||||
return core::stringw(getOperatingSystemVersion()).c_str();
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Copies text to the clipboard
|
//! Copies text to the clipboard
|
||||||
//! \param text: text in utf-8
|
//! \param text: text in utf-8
|
||||||
virtual void copyToClipboard(const c8* text) const = 0;
|
virtual void copyToClipboard(const c8* text) const = 0;
|
||||||
|
@ -352,38 +352,14 @@ namespace scene
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//! Sets all material flags at once to a new value.
|
//! Execute a function on all materials of this scene node.
|
||||||
/** Useful, for example, if you want the whole mesh to be
|
/** Useful for setting material properties, e.g. if you want the whole
|
||||||
affected by light.
|
mesh to be affected by light. */
|
||||||
\param flag Which flag of all materials to be set.
|
template <typename F>
|
||||||
\param newvalue New value of that flag. */
|
void forEachMaterial(F &&fn) {
|
||||||
void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)
|
for (u32 i = 0; i < getMaterialCount(); i++) {
|
||||||
{
|
fn(getMaterial(i));
|
||||||
for (u32 i=0; i<getMaterialCount(); ++i)
|
|
||||||
getMaterial(i).setFlag(flag, newvalue);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//! Sets the texture of the specified layer in all materials of this scene node to the new texture.
|
|
||||||
/** \param textureLayer Layer of texture to be set. Must be a
|
|
||||||
value smaller than MATERIAL_MAX_TEXTURES.
|
|
||||||
\param texture New texture to be used. */
|
|
||||||
void setMaterialTexture(u32 textureLayer, video::ITexture* texture)
|
|
||||||
{
|
|
||||||
if (textureLayer >= video::MATERIAL_MAX_TEXTURES)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (u32 i=0; i<getMaterialCount(); ++i)
|
|
||||||
getMaterial(i).setTexture(textureLayer, texture);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//! Sets the material type of all materials in this scene node to a new material type.
|
|
||||||
/** \param newType New type of material to be set. */
|
|
||||||
void setMaterialType(video::E_MATERIAL_TYPE newType)
|
|
||||||
{
|
|
||||||
for (u32 i=0; i<getMaterialCount(); ++i)
|
|
||||||
getMaterial(i).MaterialType = newType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -97,14 +97,6 @@ enum E_TEXTURE_CREATION_FLAG
|
|||||||
*/
|
*/
|
||||||
ETCF_AUTO_GENERATE_MIP_MAPS = 0x00000100,
|
ETCF_AUTO_GENERATE_MIP_MAPS = 0x00000100,
|
||||||
|
|
||||||
//! Enable support for vertex shader texture sampling on some drivers
|
|
||||||
/** Default is false.
|
|
||||||
This adds a small costs to all texture switches.
|
|
||||||
Currently only affects D3D9.
|
|
||||||
On OpenGL vertex shaders use the same texture unit as pixel shaders, so support there only depends on GL version and not on this flag
|
|
||||||
*/
|
|
||||||
ETCF_SUPPORT_VERTEXT_TEXTURE = 0x00000200,
|
|
||||||
|
|
||||||
/** This flag is never used, it only forces the compiler to compile
|
/** This flag is never used, it only forces the compiler to compile
|
||||||
these enumeration values to 32 bit. */
|
these enumeration values to 32 bit. */
|
||||||
ETCF_FORCE_32_BIT_DO_NOT_USE = 0x7fffffff
|
ETCF_FORCE_32_BIT_DO_NOT_USE = 0x7fffffff
|
||||||
|
@ -21,41 +21,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual u32 getRealTime() const = 0;
|
virtual u32 getRealTime() const = 0;
|
||||||
|
|
||||||
enum EWeekday
|
|
||||||
{
|
|
||||||
EWD_SUNDAY=0,
|
|
||||||
EWD_MONDAY,
|
|
||||||
EWD_TUESDAY,
|
|
||||||
EWD_WEDNESDAY,
|
|
||||||
EWD_THURSDAY,
|
|
||||||
EWD_FRIDAY,
|
|
||||||
EWD_SATURDAY
|
|
||||||
};
|
|
||||||
|
|
||||||
struct RealTimeDate
|
|
||||||
{
|
|
||||||
// Hour of the day, from 0 to 23
|
|
||||||
u32 Hour;
|
|
||||||
// Minute of the hour, from 0 to 59
|
|
||||||
u32 Minute;
|
|
||||||
// Second of the minute, due to extra seconds from 0 to 61
|
|
||||||
u32 Second;
|
|
||||||
// Year of the Gregorian calender
|
|
||||||
s32 Year;
|
|
||||||
// Month of the year, from 1 to 12
|
|
||||||
u32 Month;
|
|
||||||
// Day of the month, from 1 to 31
|
|
||||||
u32 Day;
|
|
||||||
// Weekday for the current day
|
|
||||||
EWeekday Weekday;
|
|
||||||
// Day of the year, from 1 to 366
|
|
||||||
u32 Yearday;
|
|
||||||
// Whether daylight saving is on
|
|
||||||
bool IsDST;
|
|
||||||
};
|
|
||||||
|
|
||||||
virtual RealTimeDate getRealTimeAndDate() const = 0;
|
|
||||||
|
|
||||||
//! Returns current virtual time in milliseconds.
|
//! Returns current virtual time in milliseconds.
|
||||||
/** This value starts with 0 and can be manipulated using setTime(),
|
/** This value starts with 0 and can be manipulated using setTime(),
|
||||||
stopTimer(), startTimer(), etc. This value depends on the set speed of
|
stopTimer(), startTimer(), etc. This value depends on the set speed of
|
||||||
|
@ -265,24 +265,10 @@ namespace video
|
|||||||
IReferenceCounted::drop() for more information. */
|
IReferenceCounted::drop() for more information. */
|
||||||
virtual ITexture* getTexture(io::IReadFile* file) =0;
|
virtual ITexture* getTexture(io::IReadFile* file) =0;
|
||||||
|
|
||||||
//! Returns a texture by index
|
|
||||||
/** \param index: Index of the texture, must be smaller than
|
|
||||||
getTextureCount() Please note that this index might change when
|
|
||||||
adding or removing textures
|
|
||||||
\return Pointer to the texture, or 0 if the texture was not
|
|
||||||
set or index is out of bounds. This pointer should not be
|
|
||||||
dropped. See IReferenceCounted::drop() for more information. */
|
|
||||||
virtual ITexture* getTextureByIndex(u32 index) =0;
|
|
||||||
|
|
||||||
//! Returns amount of textures currently loaded
|
//! Returns amount of textures currently loaded
|
||||||
/** \return Amount of textures currently loaded */
|
/** \return Amount of textures currently loaded */
|
||||||
virtual u32 getTextureCount() const = 0;
|
virtual u32 getTextureCount() const = 0;
|
||||||
|
|
||||||
//! Renames a texture
|
|
||||||
/** \param texture Pointer to the texture to rename.
|
|
||||||
\param newName New name for the texture. This should be a unique name. */
|
|
||||||
virtual void renameTexture(ITexture* texture, const io::path& newName) = 0;
|
|
||||||
|
|
||||||
//! Creates an empty texture of specified size.
|
//! Creates an empty texture of specified size.
|
||||||
/** \param size: Size of the texture.
|
/** \param size: Size of the texture.
|
||||||
\param name A name for the texture. Later calls to
|
\param name A name for the texture. Later calls to
|
||||||
@ -297,24 +283,6 @@ namespace video
|
|||||||
virtual ITexture* addTexture(const core::dimension2d<u32>& size,
|
virtual ITexture* addTexture(const core::dimension2d<u32>& size,
|
||||||
const io::path& name, ECOLOR_FORMAT format = ECF_A8R8G8B8) = 0;
|
const io::path& name, ECOLOR_FORMAT format = ECF_A8R8G8B8) = 0;
|
||||||
|
|
||||||
//! Creates a texture from an IImage.
|
|
||||||
/** \param name A name for the texture. Later calls of
|
|
||||||
getTexture() with this name will return this texture.
|
|
||||||
The name can _not_ be empty.
|
|
||||||
\param image Image the texture is created from.
|
|
||||||
\param mipmapData Optional pointer to a mipmaps data.
|
|
||||||
If this parameter is not given, the mipmaps are derived from image.
|
|
||||||
\return Pointer to the newly created texture. This pointer
|
|
||||||
should not be dropped. See IReferenceCounted::drop() for more
|
|
||||||
information. */
|
|
||||||
_IRR_DEPRECATED_ ITexture* addTexture(const io::path& name, IImage* image, void* mipmapData)
|
|
||||||
{
|
|
||||||
if (image)
|
|
||||||
image->setMipMapsData(mipmapData, false);
|
|
||||||
|
|
||||||
return addTexture(name, image);
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Creates a texture from an IImage.
|
//! Creates a texture from an IImage.
|
||||||
/** \param name A name for the texture. Later calls of
|
/** \param name A name for the texture. Later calls of
|
||||||
getTexture() with this name will return this texture.
|
getTexture() with this name will return this texture.
|
||||||
@ -366,8 +334,7 @@ namespace video
|
|||||||
const io::path& name = "rt", const ECOLOR_FORMAT format = ECF_UNKNOWN) =0;
|
const io::path& name = "rt", const ECOLOR_FORMAT format = ECF_UNKNOWN) =0;
|
||||||
|
|
||||||
//! Adds a new render target texture with 6 sides for a cubemap map to the texture cache.
|
//! Adds a new render target texture with 6 sides for a cubemap map to the texture cache.
|
||||||
/** NOTE: Only supported on D3D9 so far.
|
/** \param sideLen Length of one cubemap side.
|
||||||
\param sideLen Length of one cubemap side.
|
|
||||||
\param name A name for the texture. Later calls of getTexture() with this name will return this texture.
|
\param name A name for the texture. Later calls of getTexture() with this name will return this texture.
|
||||||
The name can _not_ be empty.
|
The name can _not_ be empty.
|
||||||
\param format The color format of the render target. Floating point formats are supported.
|
\param format The color format of the render target. Floating point formats are supported.
|
||||||
@ -459,15 +426,9 @@ namespace video
|
|||||||
color values may not be exactly the same in the engine and for
|
color values may not be exactly the same in the engine and for
|
||||||
example in picture edit programs. To avoid this problem, you
|
example in picture edit programs. To avoid this problem, you
|
||||||
could use the makeColorKeyTexture method, which takes the
|
could use the makeColorKeyTexture method, which takes the
|
||||||
position of a pixel instead a color value.
|
position of a pixel instead a color value. */
|
||||||
\param zeroTexels (deprecated) If set to true, then any texels that match
|
|
||||||
the color key will have their color, as well as their alpha, set to zero
|
|
||||||
(i.e. black). This behavior matches the legacy (buggy) behavior prior
|
|
||||||
to release 1.5 and is provided for backwards compatibility only.
|
|
||||||
This parameter may be removed by Irrlicht 1.9. */
|
|
||||||
virtual void makeColorKeyTexture(video::ITexture* texture,
|
virtual void makeColorKeyTexture(video::ITexture* texture,
|
||||||
video::SColor color,
|
video::SColor color) const =0;
|
||||||
bool zeroTexels = false) const =0;
|
|
||||||
|
|
||||||
//! Sets a boolean alpha channel on the texture based on the color at a position.
|
//! Sets a boolean alpha channel on the texture based on the color at a position.
|
||||||
/** This makes the texture fully transparent at the texels where
|
/** This makes the texture fully transparent at the texels where
|
||||||
@ -476,15 +437,9 @@ namespace video
|
|||||||
\param texture Texture whose alpha channel is modified.
|
\param texture Texture whose alpha channel is modified.
|
||||||
\param colorKeyPixelPos Position of a pixel with the color key
|
\param colorKeyPixelPos Position of a pixel with the color key
|
||||||
color. Every texel with this color will become fully transparent as
|
color. Every texel with this color will become fully transparent as
|
||||||
described above.
|
described above. */
|
||||||
\param zeroTexels (deprecated) If set to true, then any texels that match
|
|
||||||
the color key will have their color, as well as their alpha, set to zero
|
|
||||||
(i.e. black). This behavior matches the legacy (buggy) behavior prior
|
|
||||||
to release 1.5 and is provided for backwards compatibility only.
|
|
||||||
This parameter may be removed by Irrlicht 1.9. */
|
|
||||||
virtual void makeColorKeyTexture(video::ITexture* texture,
|
virtual void makeColorKeyTexture(video::ITexture* texture,
|
||||||
core::position2d<s32> colorKeyPixelPos,
|
core::position2d<s32> colorKeyPixelPos) const =0;
|
||||||
bool zeroTexels = false) const =0;
|
|
||||||
|
|
||||||
//! Set a render target.
|
//! Set a render target.
|
||||||
/** This will only work if the driver supports the
|
/** This will only work if the driver supports the
|
||||||
@ -1032,27 +987,6 @@ namespace video
|
|||||||
See IReferenceCounted::drop() for more information. */
|
See IReferenceCounted::drop() for more information. */
|
||||||
virtual IImage* createImage(ECOLOR_FORMAT format, const core::dimension2d<u32>& size) =0;
|
virtual IImage* createImage(ECOLOR_FORMAT format, const core::dimension2d<u32>& size) =0;
|
||||||
|
|
||||||
//! Creates a software image by converting it to given format from another image.
|
|
||||||
/** \deprecated Create an empty image and use copyTo(). This method may be removed by Irrlicht 1.9.
|
|
||||||
\param format Desired color format of the image.
|
|
||||||
\param imageToCopy Image to copy to the new image.
|
|
||||||
\return The created image.
|
|
||||||
If you no longer need the image, you should call IImage::drop().
|
|
||||||
See IReferenceCounted::drop() for more information. */
|
|
||||||
_IRR_DEPRECATED_ virtual IImage* createImage(ECOLOR_FORMAT format, IImage *imageToCopy) =0;
|
|
||||||
|
|
||||||
//! Creates a software image from a part of another image.
|
|
||||||
/** \deprecated Create an empty image and use copyTo(). This method may be removed by Irrlicht 1.9.
|
|
||||||
\param imageToCopy Image to copy to the new image in part.
|
|
||||||
\param pos Position of rectangle to copy.
|
|
||||||
\param size Extents of rectangle to copy.
|
|
||||||
\return The created image.
|
|
||||||
If you no longer need the image, you should call IImage::drop().
|
|
||||||
See IReferenceCounted::drop() for more information. */
|
|
||||||
_IRR_DEPRECATED_ virtual IImage* createImage(IImage* imageToCopy,
|
|
||||||
const core::position2d<s32>& pos,
|
|
||||||
const core::dimension2d<u32>& size) =0;
|
|
||||||
|
|
||||||
//! Creates a software image from a part of a texture.
|
//! Creates a software image from a part of a texture.
|
||||||
/**
|
/**
|
||||||
\param texture Texture to copy to the new image in part.
|
\param texture Texture to copy to the new image in part.
|
||||||
@ -1156,23 +1090,6 @@ namespace video
|
|||||||
//! Clear the color, depth and/or stencil buffers.
|
//! Clear the color, depth and/or stencil buffers.
|
||||||
virtual void clearBuffers(u16 flag, SColor color = SColor(255,0,0,0), f32 depth = 1.f, u8 stencil = 0) = 0;
|
virtual void clearBuffers(u16 flag, SColor color = SColor(255,0,0,0), f32 depth = 1.f, u8 stencil = 0) = 0;
|
||||||
|
|
||||||
//! Clear the color, depth and/or stencil buffers.
|
|
||||||
_IRR_DEPRECATED_ void clearBuffers(bool backBuffer, bool depthBuffer, bool stencilBuffer, SColor color)
|
|
||||||
{
|
|
||||||
u16 flag = 0;
|
|
||||||
|
|
||||||
if (backBuffer)
|
|
||||||
flag |= ECBF_COLOR;
|
|
||||||
|
|
||||||
if (depthBuffer)
|
|
||||||
flag |= ECBF_DEPTH;
|
|
||||||
|
|
||||||
if (stencilBuffer)
|
|
||||||
flag |= ECBF_STENCIL;
|
|
||||||
|
|
||||||
clearBuffers(flag, color);
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Clears the ZBuffer.
|
//! Clears the ZBuffer.
|
||||||
/** Note that you usually need not to call this method, as it
|
/** Note that you usually need not to call this method, as it
|
||||||
is automatically done in IVideoDriver::beginScene() or
|
is automatically done in IVideoDriver::beginScene() or
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
#define __IRR_COMPILE_CONFIG_H_INCLUDED__
|
#define __IRR_COMPILE_CONFIG_H_INCLUDED__
|
||||||
|
|
||||||
//! Identifies the IrrlichtMt fork customized for the Minetest engine
|
//! Identifies the IrrlichtMt fork customized for the Minetest engine
|
||||||
#define IRRLICHT_VERSION_MT_REVISION 11
|
#define IRRLICHT_VERSION_MT_REVISION 12
|
||||||
#define IRRLICHT_VERSION_MT "mt11"
|
#define IRRLICHT_VERSION_MT "mt12"
|
||||||
|
|
||||||
//! Irrlicht SDK Version
|
//! Irrlicht SDK Version
|
||||||
#define IRRLICHT_VERSION_MAJOR 1
|
#define IRRLICHT_VERSION_MAJOR 1
|
||||||
|
@ -147,13 +147,6 @@ namespace scene
|
|||||||
return Meshes[0]->getMeshBuffer(material);
|
return Meshes[0]->getMeshBuffer(material);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Set a material flag for all meshbuffers of this mesh.
|
|
||||||
void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) override
|
|
||||||
{
|
|
||||||
for (u32 i=0; i<Meshes.size(); ++i)
|
|
||||||
Meshes[i]->setMaterialFlag(flag, newvalue);
|
|
||||||
}
|
|
||||||
|
|
||||||
//! set the hardware mapping hint, for driver
|
//! set the hardware mapping hint, for driver
|
||||||
void setHardwareMappingHint( E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX ) override
|
void setHardwareMappingHint( E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX ) override
|
||||||
{
|
{
|
||||||
|
@ -5,12 +5,6 @@
|
|||||||
#ifndef __S_EXPOSED_VIDEO_DATA_H_INCLUDED__
|
#ifndef __S_EXPOSED_VIDEO_DATA_H_INCLUDED__
|
||||||
#define __S_EXPOSED_VIDEO_DATA_H_INCLUDED__
|
#define __S_EXPOSED_VIDEO_DATA_H_INCLUDED__
|
||||||
|
|
||||||
// forward declarations for internal pointers
|
|
||||||
struct IDirect3D9;
|
|
||||||
struct IDirect3DDevice9;
|
|
||||||
struct IDirect3D8;
|
|
||||||
struct IDirect3DDevice8;
|
|
||||||
|
|
||||||
namespace irr
|
namespace irr
|
||||||
{
|
{
|
||||||
namespace video
|
namespace video
|
||||||
@ -27,19 +21,6 @@ struct SExposedVideoData
|
|||||||
SExposedVideoData() {OpenGLWin32.HDc=0; OpenGLWin32.HRc=0; OpenGLWin32.HWnd=0;}
|
SExposedVideoData() {OpenGLWin32.HDc=0; OpenGLWin32.HRc=0; OpenGLWin32.HWnd=0;}
|
||||||
explicit SExposedVideoData(void* Window) {OpenGLWin32.HDc=0; OpenGLWin32.HRc=0; OpenGLWin32.HWnd=Window;}
|
explicit SExposedVideoData(void* Window) {OpenGLWin32.HDc=0; OpenGLWin32.HRc=0; OpenGLWin32.HWnd=Window;}
|
||||||
|
|
||||||
struct SD3D9
|
|
||||||
{
|
|
||||||
//! Pointer to the IDirect3D9 interface
|
|
||||||
IDirect3D9* D3D9;
|
|
||||||
|
|
||||||
//! Pointer to the IDirect3DDevice9 interface
|
|
||||||
IDirect3DDevice9* D3DDev9;
|
|
||||||
|
|
||||||
//! Window handle.
|
|
||||||
/** Get with for example HWND h = reinterpret_cast<HWND>(exposedData.D3D9.HWnd) */
|
|
||||||
void* HWnd;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct SOpenGLWin32
|
struct SOpenGLWin32
|
||||||
{
|
{
|
||||||
//! Private GDI Device Context.
|
//! Private GDI Device Context.
|
||||||
@ -87,7 +68,6 @@ struct SExposedVideoData
|
|||||||
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
SD3D9 D3D9;
|
|
||||||
SOpenGLWin32 OpenGLWin32;
|
SOpenGLWin32 OpenGLWin32;
|
||||||
SOpenGLLinux OpenGLLinux;
|
SOpenGLLinux OpenGLLinux;
|
||||||
SOpenGLOSX OpenGLOSX;
|
SOpenGLOSX OpenGLOSX;
|
||||||
|
@ -40,7 +40,6 @@ namespace irr
|
|||||||
Doublebuffer(true),
|
Doublebuffer(true),
|
||||||
IgnoreInput(false),
|
IgnoreInput(false),
|
||||||
Stereobuffer(false),
|
Stereobuffer(false),
|
||||||
HighPrecisionFPU(false),
|
|
||||||
EventReceiver(0),
|
EventReceiver(0),
|
||||||
WindowId(0),
|
WindowId(0),
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
@ -48,9 +47,6 @@ namespace irr
|
|||||||
#else
|
#else
|
||||||
LoggingLevel(ELL_INFORMATION),
|
LoggingLevel(ELL_INFORMATION),
|
||||||
#endif
|
#endif
|
||||||
DisplayAdapter(0),
|
|
||||||
DriverMultithreaded(false),
|
|
||||||
UsePerformanceTimer(true),
|
|
||||||
SDK_version_do_not_use(IRRLICHT_SDK_VERSION),
|
SDK_version_do_not_use(IRRLICHT_SDK_VERSION),
|
||||||
PrivateData(0),
|
PrivateData(0),
|
||||||
#ifdef IRR_MOBILE_PATHS
|
#ifdef IRR_MOBILE_PATHS
|
||||||
@ -84,13 +80,9 @@ namespace irr
|
|||||||
Doublebuffer = other.Doublebuffer;
|
Doublebuffer = other.Doublebuffer;
|
||||||
IgnoreInput = other.IgnoreInput;
|
IgnoreInput = other.IgnoreInput;
|
||||||
Stereobuffer = other.Stereobuffer;
|
Stereobuffer = other.Stereobuffer;
|
||||||
HighPrecisionFPU = other.HighPrecisionFPU;
|
|
||||||
EventReceiver = other.EventReceiver;
|
EventReceiver = other.EventReceiver;
|
||||||
WindowId = other.WindowId;
|
WindowId = other.WindowId;
|
||||||
LoggingLevel = other.LoggingLevel;
|
LoggingLevel = other.LoggingLevel;
|
||||||
DisplayAdapter = other.DisplayAdapter;
|
|
||||||
DriverMultithreaded = other.DriverMultithreaded;
|
|
||||||
UsePerformanceTimer = other.UsePerformanceTimer;
|
|
||||||
PrivateData = other.PrivateData;
|
PrivateData = other.PrivateData;
|
||||||
OGLES2ShaderPath = other.OGLES2ShaderPath;
|
OGLES2ShaderPath = other.OGLES2ShaderPath;
|
||||||
return *this;
|
return *this;
|
||||||
@ -108,9 +100,6 @@ namespace irr
|
|||||||
E_DEVICE_TYPE DeviceType;
|
E_DEVICE_TYPE DeviceType;
|
||||||
|
|
||||||
//! Type of video driver used to render graphics.
|
//! Type of video driver used to render graphics.
|
||||||
/** This can currently be video::EDT_NULL, video::EDT_SOFTWARE,
|
|
||||||
video::EDT_BURNINGSVIDEO, video::EDT_DIRECT3D9, and video::EDT_OPENGL.
|
|
||||||
Default: EDT_BURNINGSVIDEO. */
|
|
||||||
video::E_DRIVER_TYPE DriverType;
|
video::E_DRIVER_TYPE DriverType;
|
||||||
|
|
||||||
//! Size of the window or the video mode in fullscreen mode. Default: 800x600
|
//! Size of the window or the video mode in fullscreen mode. Default: 800x600
|
||||||
@ -219,15 +208,6 @@ namespace irr
|
|||||||
Default value: false */
|
Default value: false */
|
||||||
bool Stereobuffer;
|
bool Stereobuffer;
|
||||||
|
|
||||||
//! Specifies if the device should use high precision FPU setting
|
|
||||||
/** This is only relevant for DirectX Devices, which switch to
|
|
||||||
low FPU precision by default for performance reasons. However,
|
|
||||||
this may lead to problems with the other computations of the
|
|
||||||
application. In this case setting this flag to true should help
|
|
||||||
- on the expense of performance loss, though.
|
|
||||||
Default value: false */
|
|
||||||
bool HighPrecisionFPU;
|
|
||||||
|
|
||||||
//! A user created event receiver.
|
//! A user created event receiver.
|
||||||
IEventReceiver* EventReceiver;
|
IEventReceiver* EventReceiver;
|
||||||
|
|
||||||
@ -292,23 +272,6 @@ namespace irr
|
|||||||
*/
|
*/
|
||||||
ELOG_LEVEL LoggingLevel;
|
ELOG_LEVEL LoggingLevel;
|
||||||
|
|
||||||
//! Allows to select which graphic card is used for rendering when more than one card is in the system.
|
|
||||||
/** So far only supported on D3D */
|
|
||||||
u32 DisplayAdapter;
|
|
||||||
|
|
||||||
//! Create the driver multithreaded.
|
|
||||||
/** Default is false. Enabling this can slow down your application.
|
|
||||||
Note that this does _not_ make Irrlicht threadsafe, but only the underlying driver-API for the graphiccard.
|
|
||||||
So far only supported on D3D. */
|
|
||||||
bool DriverMultithreaded;
|
|
||||||
|
|
||||||
//! Enables use of high performance timers on Windows platform.
|
|
||||||
/** When performance timers are not used, standard GetTickCount()
|
|
||||||
is used instead which usually has worse resolution, but also less
|
|
||||||
problems with speed stepping and other techniques.
|
|
||||||
*/
|
|
||||||
bool UsePerformanceTimer;
|
|
||||||
|
|
||||||
//! Don't use or change this parameter.
|
//! Don't use or change this parameter.
|
||||||
/** Always set it to IRRLICHT_SDK_VERSION, which is done by default.
|
/** Always set it to IRRLICHT_SDK_VERSION, which is done by default.
|
||||||
This is needed for sdk version checks. */
|
This is needed for sdk version checks. */
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include "irrArray.h"
|
#include "irrArray.h"
|
||||||
#include "irrMath.h"
|
#include "irrMath.h"
|
||||||
#include "EMaterialTypes.h"
|
#include "EMaterialTypes.h"
|
||||||
#include "EMaterialFlags.h"
|
#include "EMaterialProps.h"
|
||||||
#include "SMaterialLayer.h"
|
#include "SMaterialLayer.h"
|
||||||
#include "IrrCompileConfig.h" // for IRRLICHT_API
|
#include "IrrCompileConfig.h" // for IRRLICHT_API
|
||||||
|
|
||||||
@ -228,19 +228,6 @@ namespace video
|
|||||||
ECM_DIFFUSE_AND_AMBIENT
|
ECM_DIFFUSE_AND_AMBIENT
|
||||||
};
|
};
|
||||||
|
|
||||||
//! DEPRECATED. Will be removed after Irrlicht 1.9.
|
|
||||||
/** Flags for the definition of the polygon offset feature. These flags define whether the offset should be into the screen, or towards the eye. */
|
|
||||||
enum E_POLYGON_OFFSET
|
|
||||||
{
|
|
||||||
//! Push pixel towards the far plane, away from the eye
|
|
||||||
/** This is typically used for rendering inner areas. */
|
|
||||||
EPO_BACK=0,
|
|
||||||
//! Pull pixels towards the camera.
|
|
||||||
/** This is typically used for polygons which should appear on top
|
|
||||||
of other elements, such as decals. */
|
|
||||||
EPO_FRONT=1
|
|
||||||
};
|
|
||||||
|
|
||||||
//! Names for polygon offset direction
|
//! Names for polygon offset direction
|
||||||
const c8* const PolygonOffsetDirectionNames[] =
|
const c8* const PolygonOffsetDirectionNames[] =
|
||||||
{
|
{
|
||||||
@ -256,7 +243,7 @@ namespace video
|
|||||||
EZW_OFF = 0,
|
EZW_OFF = 0,
|
||||||
|
|
||||||
//! This is the default setting for SMaterial and tries to handle things automatically.
|
//! This is the default setting for SMaterial and tries to handle things automatically.
|
||||||
//! This is also the value which is set when SMaterial::setFlag(EMF_ZWRITE_ENABLE) is enabled.
|
//! This is what you want to set to enable zwriting.
|
||||||
//! Usually zwriting is enabled non-transparent materials - as far as Irrlicht can recognize those.
|
//! Usually zwriting is enabled non-transparent materials - as far as Irrlicht can recognize those.
|
||||||
//! Basically Irrlicht tries to handle the zwriting for you and assumes transparent materials don't need it.
|
//! Basically Irrlicht tries to handle the zwriting for you and assumes transparent materials don't need it.
|
||||||
//! This is addionally affected by IVideoDriver::setAllowZWriteOnTransparent
|
//! This is addionally affected by IVideoDriver::setAllowZWriteOnTransparent
|
||||||
@ -289,21 +276,21 @@ namespace video
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! Default constructor. Creates a solid, lit material with white colors
|
//! Default constructor. Creates a solid, lit material with white colors
|
||||||
SMaterial()
|
SMaterial() :
|
||||||
: MaterialType(EMT_SOLID), AmbientColor(255,255,255,255), DiffuseColor(255,255,255,255),
|
MaterialType(EMT_SOLID), AmbientColor(255, 255, 255, 255),
|
||||||
EmissiveColor(0,0,0,0), SpecularColor(255,255,255,255),
|
DiffuseColor(255, 255, 255, 255), EmissiveColor(0, 0, 0, 0),
|
||||||
Shininess(0.0f), MaterialTypeParam(0.0f), MaterialTypeParam2(0.0f), Thickness(1.0f),
|
SpecularColor(255, 255, 255, 255), Shininess(0.0f),
|
||||||
ZBuffer(ECFN_LESSEQUAL), AntiAliasing(EAAM_SIMPLE), ColorMask(ECP_ALL),
|
MaterialTypeParam(0.0f), Thickness(1.0f), ZBuffer(ECFN_LESSEQUAL),
|
||||||
ColorMaterial(ECM_DIFFUSE), BlendOperation(EBO_NONE), BlendFactor(0.0f),
|
AntiAliasing(EAAM_SIMPLE), ColorMask(ECP_ALL), ColorMaterial(ECM_DIFFUSE),
|
||||||
PolygonOffsetFactor(0), PolygonOffsetDirection(EPO_FRONT),
|
BlendOperation(EBO_NONE), BlendFactor(0.0f), PolygonOffsetDepthBias(0.f),
|
||||||
PolygonOffsetDepthBias(0.f), PolygonOffsetSlopeScale(0.f),
|
PolygonOffsetSlopeScale(0.f), Wireframe(false), PointCloud(false),
|
||||||
Wireframe(false), PointCloud(false), GouraudShading(true),
|
GouraudShading(true), Lighting(true), ZWriteEnable(EZW_AUTO),
|
||||||
Lighting(true), ZWriteEnable(EZW_AUTO), BackfaceCulling(true), FrontfaceCulling(false),
|
BackfaceCulling(true), FrontfaceCulling(false), FogEnable(false),
|
||||||
FogEnable(false), NormalizeNormals(false), UseMipMaps(true)
|
NormalizeNormals(false), UseMipMaps(true)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
//! Texture layer array.
|
//! Texture layer array.
|
||||||
SMaterialLayer TextureLayer[MATERIAL_MAX_TEXTURES];
|
SMaterialLayer TextureLayers[MATERIAL_MAX_TEXTURES];
|
||||||
|
|
||||||
//! Type of the material. Specifies how everything is blended together
|
//! Type of the material. Specifies how everything is blended together
|
||||||
E_MATERIAL_TYPE MaterialType;
|
E_MATERIAL_TYPE MaterialType;
|
||||||
@ -350,10 +337,6 @@ namespace video
|
|||||||
EMT_TRANSPARENT_ALPHA_CHANNEL and EMT_ONETEXTURE_BLEND. */
|
EMT_TRANSPARENT_ALPHA_CHANNEL and EMT_ONETEXTURE_BLEND. */
|
||||||
f32 MaterialTypeParam;
|
f32 MaterialTypeParam;
|
||||||
|
|
||||||
//! Second free parameter, dependent on the material type.
|
|
||||||
/** Mostly ignored. */
|
|
||||||
f32 MaterialTypeParam2;
|
|
||||||
|
|
||||||
//! Thickness of non-3dimensional elements such as lines and points.
|
//! Thickness of non-3dimensional elements such as lines and points.
|
||||||
f32 Thickness;
|
f32 Thickness;
|
||||||
|
|
||||||
@ -399,18 +382,6 @@ namespace video
|
|||||||
(setting it to EBO_ADD is probably the most common one value). */
|
(setting it to EBO_ADD is probably the most common one value). */
|
||||||
f32 BlendFactor;
|
f32 BlendFactor;
|
||||||
|
|
||||||
//! DEPRECATED. Will be removed after Irrlicht 1.9. Please use PolygonOffsetDepthBias instead.
|
|
||||||
/** Factor specifying how far the polygon offset should be made.
|
|
||||||
Specifying 0 disables the polygon offset. The direction is specified separately.
|
|
||||||
The factor can be from 0 to 7.
|
|
||||||
Note: This probably never worked on Direct3D9 (was coded for D3D8 which had different value ranges) */
|
|
||||||
u8 PolygonOffsetFactor:3;
|
|
||||||
|
|
||||||
//! DEPRECATED. Will be removed after Irrlicht 1.9.
|
|
||||||
/** Flag defining the direction the polygon offset is applied to.
|
|
||||||
Can be to front or to back, specified by values from E_POLYGON_OFFSET. */
|
|
||||||
E_POLYGON_OFFSET PolygonOffsetDirection:1;
|
|
||||||
|
|
||||||
//! A constant z-buffer offset for a polygon/line/point
|
//! A constant z-buffer offset for a polygon/line/point
|
||||||
/** The range of the value is driver specific.
|
/** The range of the value is driver specific.
|
||||||
On OpenGL you get units which are multiplied by the smallest value that is guaranteed to produce a resolvable offset.
|
On OpenGL you get units which are multiplied by the smallest value that is guaranteed to produce a resolvable offset.
|
||||||
@ -430,9 +401,6 @@ namespace video
|
|||||||
f32 PolygonOffsetSlopeScale;
|
f32 PolygonOffsetSlopeScale;
|
||||||
|
|
||||||
//! Draw as wireframe or filled triangles? Default: false
|
//! Draw as wireframe or filled triangles? Default: false
|
||||||
/** The user can access a material flag using
|
|
||||||
\code material.Wireframe=true \endcode
|
|
||||||
or \code material.setFlag(EMF_WIREFRAME, true); \endcode */
|
|
||||||
bool Wireframe:1;
|
bool Wireframe:1;
|
||||||
|
|
||||||
//! Draw as point cloud or filled triangles? Default: false
|
//! Draw as point cloud or filled triangles? Default: false
|
||||||
@ -466,12 +434,22 @@ namespace video
|
|||||||
/** Sometimes, disabling mipmap usage can be useful. Default: true */
|
/** Sometimes, disabling mipmap usage can be useful. Default: true */
|
||||||
bool UseMipMaps:1;
|
bool UseMipMaps:1;
|
||||||
|
|
||||||
|
//! Execute a function on all texture layers.
|
||||||
|
/** Useful for setting properties which are not per material, but per
|
||||||
|
texture layer, e.g. bilinear filtering. */
|
||||||
|
template <typename F>
|
||||||
|
void forEachTexture(F &&fn) {
|
||||||
|
for (u32 i = 0; i < MATERIAL_MAX_TEXTURES; i++) {
|
||||||
|
fn(TextureLayers[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//! Gets the texture transformation matrix for level i
|
//! Gets the texture transformation matrix for level i
|
||||||
/** \param i The desired level. Must not be larger than MATERIAL_MAX_TEXTURES
|
/** \param i The desired level. Must not be larger than MATERIAL_MAX_TEXTURES
|
||||||
\return Texture matrix for texture level i. */
|
\return Texture matrix for texture level i. */
|
||||||
core::matrix4& getTextureMatrix(u32 i)
|
core::matrix4& getTextureMatrix(u32 i)
|
||||||
{
|
{
|
||||||
return TextureLayer[i].getTextureMatrix();
|
return TextureLayers[i].getTextureMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Gets the immutable texture transformation matrix for level i
|
//! Gets the immutable texture transformation matrix for level i
|
||||||
@ -480,7 +458,7 @@ namespace video
|
|||||||
const core::matrix4& getTextureMatrix(u32 i) const
|
const core::matrix4& getTextureMatrix(u32 i) const
|
||||||
{
|
{
|
||||||
if (i<MATERIAL_MAX_TEXTURES)
|
if (i<MATERIAL_MAX_TEXTURES)
|
||||||
return TextureLayer[i].getTextureMatrix();
|
return TextureLayers[i].getTextureMatrix();
|
||||||
else
|
else
|
||||||
return core::IdentityMatrix;
|
return core::IdentityMatrix;
|
||||||
}
|
}
|
||||||
@ -492,7 +470,7 @@ namespace video
|
|||||||
{
|
{
|
||||||
if (i>=MATERIAL_MAX_TEXTURES)
|
if (i>=MATERIAL_MAX_TEXTURES)
|
||||||
return;
|
return;
|
||||||
TextureLayer[i].setTextureMatrix(mat);
|
TextureLayers[i].setTextureMatrix(mat);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Gets the i-th texture
|
//! Gets the i-th texture
|
||||||
@ -500,7 +478,7 @@ namespace video
|
|||||||
\return Texture for texture level i, if defined, else 0. */
|
\return Texture for texture level i, if defined, else 0. */
|
||||||
ITexture* getTexture(u32 i) const
|
ITexture* getTexture(u32 i) const
|
||||||
{
|
{
|
||||||
return i < MATERIAL_MAX_TEXTURES ? TextureLayer[i].Texture : 0;
|
return i < MATERIAL_MAX_TEXTURES ? TextureLayers[i].Texture : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Sets the i-th texture
|
//! Sets the i-th texture
|
||||||
@ -511,144 +489,7 @@ namespace video
|
|||||||
{
|
{
|
||||||
if (i>=MATERIAL_MAX_TEXTURES)
|
if (i>=MATERIAL_MAX_TEXTURES)
|
||||||
return;
|
return;
|
||||||
TextureLayer[i].Texture = tex;
|
TextureLayers[i].Texture = tex;
|
||||||
}
|
|
||||||
|
|
||||||
//! Sets the Material flag to the given value
|
|
||||||
/** \param flag The flag to be set.
|
|
||||||
\param value The new value for the flag. */
|
|
||||||
void setFlag(E_MATERIAL_FLAG flag, bool value)
|
|
||||||
{
|
|
||||||
switch (flag)
|
|
||||||
{
|
|
||||||
case EMF_WIREFRAME:
|
|
||||||
Wireframe = value; break;
|
|
||||||
case EMF_POINTCLOUD:
|
|
||||||
PointCloud = value; break;
|
|
||||||
case EMF_GOURAUD_SHADING:
|
|
||||||
GouraudShading = value; break;
|
|
||||||
case EMF_LIGHTING:
|
|
||||||
Lighting = value; break;
|
|
||||||
case EMF_ZBUFFER:
|
|
||||||
ZBuffer = value; break;
|
|
||||||
case EMF_ZWRITE_ENABLE:
|
|
||||||
ZWriteEnable = value ? EZW_AUTO : EZW_OFF; break;
|
|
||||||
case EMF_BACK_FACE_CULLING:
|
|
||||||
BackfaceCulling = value; break;
|
|
||||||
case EMF_FRONT_FACE_CULLING:
|
|
||||||
FrontfaceCulling = value; break;
|
|
||||||
case EMF_BILINEAR_FILTER:
|
|
||||||
{
|
|
||||||
for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
|
|
||||||
TextureLayer[i].BilinearFilter = value;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case EMF_TRILINEAR_FILTER:
|
|
||||||
{
|
|
||||||
for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
|
|
||||||
TextureLayer[i].TrilinearFilter = value;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case EMF_ANISOTROPIC_FILTER:
|
|
||||||
{
|
|
||||||
if (value)
|
|
||||||
for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
|
|
||||||
TextureLayer[i].AnisotropicFilter = 0xFF;
|
|
||||||
else
|
|
||||||
for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
|
|
||||||
TextureLayer[i].AnisotropicFilter = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case EMF_FOG_ENABLE:
|
|
||||||
FogEnable = value; break;
|
|
||||||
case EMF_NORMALIZE_NORMALS:
|
|
||||||
NormalizeNormals = value; break;
|
|
||||||
case EMF_TEXTURE_WRAP:
|
|
||||||
{
|
|
||||||
for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
|
|
||||||
{
|
|
||||||
TextureLayer[i].TextureWrapU = (E_TEXTURE_CLAMP)value;
|
|
||||||
TextureLayer[i].TextureWrapV = (E_TEXTURE_CLAMP)value;
|
|
||||||
TextureLayer[i].TextureWrapW = (E_TEXTURE_CLAMP)value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case EMF_ANTI_ALIASING:
|
|
||||||
AntiAliasing = value?EAAM_SIMPLE:EAAM_OFF; break;
|
|
||||||
case EMF_COLOR_MASK:
|
|
||||||
ColorMask = value?ECP_ALL:ECP_NONE; break;
|
|
||||||
case EMF_COLOR_MATERIAL:
|
|
||||||
ColorMaterial = value?ECM_DIFFUSE:ECM_NONE; break;
|
|
||||||
case EMF_USE_MIP_MAPS:
|
|
||||||
UseMipMaps = value; break;
|
|
||||||
case EMF_BLEND_OPERATION:
|
|
||||||
BlendOperation = value?EBO_ADD:EBO_NONE; break;
|
|
||||||
case EMF_BLEND_FACTOR:
|
|
||||||
break;
|
|
||||||
case EMF_POLYGON_OFFSET:
|
|
||||||
PolygonOffsetFactor = value?1:0;
|
|
||||||
PolygonOffsetDirection = EPO_BACK;
|
|
||||||
PolygonOffsetSlopeScale = value?1.f:0.f;
|
|
||||||
PolygonOffsetDepthBias = value?1.f:0.f;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Gets the Material flag
|
|
||||||
/** \param flag The flag to query.
|
|
||||||
\return The current value of the flag. */
|
|
||||||
bool getFlag(E_MATERIAL_FLAG flag) const
|
|
||||||
{
|
|
||||||
switch (flag)
|
|
||||||
{
|
|
||||||
case EMF_WIREFRAME:
|
|
||||||
return Wireframe;
|
|
||||||
case EMF_POINTCLOUD:
|
|
||||||
return PointCloud;
|
|
||||||
case EMF_GOURAUD_SHADING:
|
|
||||||
return GouraudShading;
|
|
||||||
case EMF_LIGHTING:
|
|
||||||
return Lighting;
|
|
||||||
case EMF_ZBUFFER:
|
|
||||||
return ZBuffer!=ECFN_DISABLED;
|
|
||||||
case EMF_ZWRITE_ENABLE:
|
|
||||||
return ZWriteEnable != EZW_OFF;
|
|
||||||
case EMF_BACK_FACE_CULLING:
|
|
||||||
return BackfaceCulling;
|
|
||||||
case EMF_FRONT_FACE_CULLING:
|
|
||||||
return FrontfaceCulling;
|
|
||||||
case EMF_BILINEAR_FILTER:
|
|
||||||
return TextureLayer[0].BilinearFilter;
|
|
||||||
case EMF_TRILINEAR_FILTER:
|
|
||||||
return TextureLayer[0].TrilinearFilter;
|
|
||||||
case EMF_ANISOTROPIC_FILTER:
|
|
||||||
return TextureLayer[0].AnisotropicFilter!=0;
|
|
||||||
case EMF_FOG_ENABLE:
|
|
||||||
return FogEnable;
|
|
||||||
case EMF_NORMALIZE_NORMALS:
|
|
||||||
return NormalizeNormals;
|
|
||||||
case EMF_TEXTURE_WRAP:
|
|
||||||
return !(TextureLayer[0].TextureWrapU ||
|
|
||||||
TextureLayer[0].TextureWrapV ||
|
|
||||||
TextureLayer[0].TextureWrapW);
|
|
||||||
case EMF_ANTI_ALIASING:
|
|
||||||
return (AntiAliasing==1);
|
|
||||||
case EMF_COLOR_MASK:
|
|
||||||
return (ColorMask!=ECP_NONE);
|
|
||||||
case EMF_COLOR_MATERIAL:
|
|
||||||
return (ColorMaterial != ECM_NONE);
|
|
||||||
case EMF_USE_MIP_MAPS:
|
|
||||||
return UseMipMaps;
|
|
||||||
case EMF_BLEND_OPERATION:
|
|
||||||
return BlendOperation != EBO_NONE;
|
|
||||||
case EMF_BLEND_FACTOR:
|
|
||||||
return BlendFactor != 0.f;
|
|
||||||
case EMF_POLYGON_OFFSET:
|
|
||||||
return PolygonOffsetFactor != 0 || PolygonOffsetDepthBias != 0.f;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Inequality operator
|
//! Inequality operator
|
||||||
@ -664,7 +505,6 @@ namespace video
|
|||||||
SpecularColor != b.SpecularColor ||
|
SpecularColor != b.SpecularColor ||
|
||||||
Shininess != b.Shininess ||
|
Shininess != b.Shininess ||
|
||||||
MaterialTypeParam != b.MaterialTypeParam ||
|
MaterialTypeParam != b.MaterialTypeParam ||
|
||||||
MaterialTypeParam2 != b.MaterialTypeParam2 ||
|
|
||||||
Thickness != b.Thickness ||
|
Thickness != b.Thickness ||
|
||||||
Wireframe != b.Wireframe ||
|
Wireframe != b.Wireframe ||
|
||||||
PointCloud != b.PointCloud ||
|
PointCloud != b.PointCloud ||
|
||||||
@ -681,15 +521,13 @@ namespace video
|
|||||||
ColorMaterial != b.ColorMaterial ||
|
ColorMaterial != b.ColorMaterial ||
|
||||||
BlendOperation != b.BlendOperation ||
|
BlendOperation != b.BlendOperation ||
|
||||||
BlendFactor != b.BlendFactor ||
|
BlendFactor != b.BlendFactor ||
|
||||||
PolygonOffsetFactor != b.PolygonOffsetFactor ||
|
|
||||||
PolygonOffsetDirection != b.PolygonOffsetDirection ||
|
|
||||||
PolygonOffsetDepthBias != b.PolygonOffsetDepthBias ||
|
PolygonOffsetDepthBias != b.PolygonOffsetDepthBias ||
|
||||||
PolygonOffsetSlopeScale != b.PolygonOffsetSlopeScale ||
|
PolygonOffsetSlopeScale != b.PolygonOffsetSlopeScale ||
|
||||||
UseMipMaps != b.UseMipMaps
|
UseMipMaps != b.UseMipMaps
|
||||||
;
|
;
|
||||||
for (u32 i=0; (i<MATERIAL_MAX_TEXTURES) && !different; ++i)
|
for (u32 i=0; (i<MATERIAL_MAX_TEXTURES) && !different; ++i)
|
||||||
{
|
{
|
||||||
different |= (TextureLayer[i] != b.TextureLayer[i]);
|
different |= (TextureLayers[i] != b.TextureLayers[i]);
|
||||||
}
|
}
|
||||||
return different;
|
return different;
|
||||||
}
|
}
|
||||||
@ -728,10 +566,8 @@ namespace video
|
|||||||
//! as it asks the material renders directly what they do with the material.
|
//! as it asks the material renders directly what they do with the material.
|
||||||
bool isTransparent() const
|
bool isTransparent() const
|
||||||
{
|
{
|
||||||
if ( MaterialType==EMT_TRANSPARENT_ADD_COLOR ||
|
if ( MaterialType==EMT_TRANSPARENT_ALPHA_CHANNEL ||
|
||||||
MaterialType==EMT_TRANSPARENT_ALPHA_CHANNEL ||
|
MaterialType==EMT_TRANSPARENT_VERTEX_ALPHA )
|
||||||
MaterialType==EMT_TRANSPARENT_VERTEX_ALPHA ||
|
|
||||||
MaterialType==EMT_TRANSPARENT_REFLECTION_2_LAYER )
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -43,6 +43,32 @@ namespace video
|
|||||||
"texture_clamp_mirror_clamp_to_edge",
|
"texture_clamp_mirror_clamp_to_edge",
|
||||||
"texture_clamp_mirror_clamp_to_border", 0};
|
"texture_clamp_mirror_clamp_to_border", 0};
|
||||||
|
|
||||||
|
|
||||||
|
//! Texture minification filter.
|
||||||
|
/** Used when scaling textures down. See the documentation on OpenGL's
|
||||||
|
`GL_TEXTURE_MIN_FILTER` for more information. */
|
||||||
|
enum E_TEXTURE_MIN_FILTER {
|
||||||
|
//! Aka nearest-neighbor.
|
||||||
|
ETMINF_NEAREST_MIPMAP_NEAREST = 0,
|
||||||
|
//! Aka bilinear.
|
||||||
|
ETMINF_LINEAR_MIPMAP_NEAREST,
|
||||||
|
//! Isn't known by any other name.
|
||||||
|
ETMINF_NEAREST_MIPMAP_LINEAR,
|
||||||
|
//! Aka trilinear.
|
||||||
|
ETMINF_LINEAR_MIPMAP_LINEAR,
|
||||||
|
};
|
||||||
|
|
||||||
|
//! Texture magnification filter.
|
||||||
|
/** Used when scaling textures up. See the documentation on OpenGL's
|
||||||
|
`GL_TEXTURE_MAG_FILTER` for more information.
|
||||||
|
Note that mipmaps are only used for minification, not for magnification. */
|
||||||
|
enum E_TEXTURE_MAG_FILTER {
|
||||||
|
//! Aka nearest-neighbor.
|
||||||
|
ETMAGF_NEAREST = 0,
|
||||||
|
//! Aka bilinear.
|
||||||
|
ETMAGF_LINEAR,
|
||||||
|
};
|
||||||
|
|
||||||
//! Struct for holding material parameters which exist per texture layer
|
//! Struct for holding material parameters which exist per texture layer
|
||||||
// Note for implementors: Serialization is in CNullDriver
|
// Note for implementors: Serialization is in CNullDriver
|
||||||
class SMaterialLayer
|
class SMaterialLayer
|
||||||
@ -50,7 +76,7 @@ namespace video
|
|||||||
public:
|
public:
|
||||||
//! Default constructor
|
//! Default constructor
|
||||||
SMaterialLayer() : Texture(0), TextureWrapU(ETC_REPEAT), TextureWrapV(ETC_REPEAT), TextureWrapW(ETC_REPEAT),
|
SMaterialLayer() : Texture(0), TextureWrapU(ETC_REPEAT), TextureWrapV(ETC_REPEAT), TextureWrapW(ETC_REPEAT),
|
||||||
BilinearFilter(true), TrilinearFilter(false), AnisotropicFilter(0), LODBias(0), TextureMatrix(0)
|
MinFilter(ETMINF_LINEAR_MIPMAP_NEAREST), MagFilter(ETMAGF_LINEAR), AnisotropicFilter(0), LODBias(0), TextureMatrix(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,8 +130,8 @@ namespace video
|
|||||||
TextureWrapU = other.TextureWrapU;
|
TextureWrapU = other.TextureWrapU;
|
||||||
TextureWrapV = other.TextureWrapV;
|
TextureWrapV = other.TextureWrapV;
|
||||||
TextureWrapW = other.TextureWrapW;
|
TextureWrapW = other.TextureWrapW;
|
||||||
BilinearFilter = other.BilinearFilter;
|
MinFilter = other.MinFilter;
|
||||||
TrilinearFilter = other.TrilinearFilter;
|
MagFilter = other.MagFilter;
|
||||||
AnisotropicFilter = other.AnisotropicFilter;
|
AnisotropicFilter = other.AnisotropicFilter;
|
||||||
LODBias = other.LODBias;
|
LODBias = other.LODBias;
|
||||||
|
|
||||||
@ -157,8 +183,8 @@ namespace video
|
|||||||
TextureWrapU != b.TextureWrapU ||
|
TextureWrapU != b.TextureWrapU ||
|
||||||
TextureWrapV != b.TextureWrapV ||
|
TextureWrapV != b.TextureWrapV ||
|
||||||
TextureWrapW != b.TextureWrapW ||
|
TextureWrapW != b.TextureWrapW ||
|
||||||
BilinearFilter != b.BilinearFilter ||
|
MinFilter != b.MinFilter ||
|
||||||
TrilinearFilter != b.TrilinearFilter ||
|
MagFilter != b.MagFilter ||
|
||||||
AnisotropicFilter != b.AnisotropicFilter ||
|
AnisotropicFilter != b.AnisotropicFilter ||
|
||||||
LODBias != b.LODBias;
|
LODBias != b.LODBias;
|
||||||
if (different)
|
if (different)
|
||||||
@ -184,13 +210,11 @@ namespace video
|
|||||||
u8 TextureWrapV:4;
|
u8 TextureWrapV:4;
|
||||||
u8 TextureWrapW:4;
|
u8 TextureWrapW:4;
|
||||||
|
|
||||||
//! Is bilinear filtering enabled? Default: true
|
//! Minification (downscaling) filter
|
||||||
bool BilinearFilter:1;
|
E_TEXTURE_MIN_FILTER MinFilter;
|
||||||
|
|
||||||
//! Is trilinear filtering enabled? Default: false
|
//! Magnification (upscaling) filter
|
||||||
/** If the trilinear filter flag is enabled,
|
E_TEXTURE_MAG_FILTER MagFilter;
|
||||||
the bilinear filtering flag is ignored. */
|
|
||||||
bool TrilinearFilter:1;
|
|
||||||
|
|
||||||
//! Is anisotropic filtering enabled? Default: 0, disabled
|
//! Is anisotropic filtering enabled? Default: 0, disabled
|
||||||
/** In Irrlicht you can use anisotropic texture filtering
|
/** In Irrlicht you can use anisotropic texture filtering
|
||||||
|
@ -117,13 +117,6 @@ namespace scene
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//! sets a flag of all contained materials to a new value
|
|
||||||
void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) override
|
|
||||||
{
|
|
||||||
for (u32 i=0; i<MeshBuffers.size(); ++i)
|
|
||||||
MeshBuffers[i]->getMaterial().setFlag(flag, newvalue);
|
|
||||||
}
|
|
||||||
|
|
||||||
//! set the hardware mapping hint, for driver
|
//! set the hardware mapping hint, for driver
|
||||||
void setHardwareMappingHint( E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX ) override
|
void setHardwareMappingHint( E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX ) override
|
||||||
{
|
{
|
||||||
|
@ -18,16 +18,16 @@ namespace video
|
|||||||
SMaterial Material;
|
SMaterial Material;
|
||||||
|
|
||||||
//! Which values are overridden
|
//! Which values are overridden
|
||||||
/** OR'ed values from E_MATERIAL_FLAGS. */
|
/** OR'ed values from E_MATERIAL_PROPS. */
|
||||||
u32 EnableFlags;
|
u32 EnableProps;
|
||||||
|
|
||||||
//! For those flags in EnableFlags which affect layers, set which of the layers are affected
|
//! For those properties in EnableProps which affect layers, set which of the layers are affected
|
||||||
bool EnableLayerFlags[MATERIAL_MAX_TEXTURES];
|
bool EnableLayerProps[MATERIAL_MAX_TEXTURES];
|
||||||
|
|
||||||
//! Which textures are overridden
|
//! Which textures are overridden
|
||||||
bool EnableTextures[MATERIAL_MAX_TEXTURES];
|
bool EnableTextures[MATERIAL_MAX_TEXTURES];
|
||||||
|
|
||||||
//! Overwrite complete layers (settings of EnableLayerFlags and EnableTextures don't matter then for layer data)
|
//! Overwrite complete layers (settings of EnableLayerProps and EnableTextures don't matter then for layer data)
|
||||||
bool EnableLayers[MATERIAL_MAX_TEXTURES];
|
bool EnableLayers[MATERIAL_MAX_TEXTURES];
|
||||||
|
|
||||||
//! Set in which render passes the material override is active.
|
//! Set in which render passes the material override is active.
|
||||||
@ -59,19 +59,19 @@ namespace video
|
|||||||
core::array<SMaterialTypeReplacement> MaterialTypes;
|
core::array<SMaterialTypeReplacement> MaterialTypes;
|
||||||
|
|
||||||
//! Default constructor
|
//! Default constructor
|
||||||
SOverrideMaterial() : EnableFlags(0), EnablePasses(0), Enabled(false)
|
SOverrideMaterial() : EnableProps(0), EnablePasses(0), Enabled(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
//! disable overrides and reset all flags
|
//! disable overrides and reset all properties
|
||||||
void reset()
|
void reset()
|
||||||
{
|
{
|
||||||
EnableFlags = 0;
|
EnableProps = 0;
|
||||||
EnablePasses = 0;
|
EnablePasses = 0;
|
||||||
Enabled = false;
|
Enabled = false;
|
||||||
for (u32 i = 0; i < MATERIAL_MAX_TEXTURES; ++i)
|
for (u32 i = 0; i < MATERIAL_MAX_TEXTURES; ++i)
|
||||||
{
|
{
|
||||||
EnableLayerFlags[i] = true; // doesn't do anything unless EnableFlags is set, just saying by default all texture layers are affected by flags
|
EnableLayerProps[i] = true; // doesn't do anything unless EnableProps is set, just saying by default all texture layers are affected by properties
|
||||||
EnableTextures[i] = false;
|
EnableTextures[i] = false;
|
||||||
EnableLayers[i] = false;
|
EnableLayers[i] = false;
|
||||||
}
|
}
|
||||||
@ -92,67 +92,65 @@ namespace video
|
|||||||
for (u32 f=0; f<32; ++f)
|
for (u32 f=0; f<32; ++f)
|
||||||
{
|
{
|
||||||
const u32 num=(1<<f);
|
const u32 num=(1<<f);
|
||||||
if (EnableFlags & num)
|
if (EnableProps & num)
|
||||||
{
|
{
|
||||||
switch (num)
|
switch (num)
|
||||||
{
|
{
|
||||||
case EMF_WIREFRAME: material.Wireframe = Material.Wireframe; break;
|
case EMP_WIREFRAME: material.Wireframe = Material.Wireframe; break;
|
||||||
case EMF_POINTCLOUD: material.PointCloud = Material.PointCloud; break;
|
case EMP_POINTCLOUD: material.PointCloud = Material.PointCloud; break;
|
||||||
case EMF_GOURAUD_SHADING: material.GouraudShading = Material.GouraudShading; break;
|
case EMP_GOURAUD_SHADING: material.GouraudShading = Material.GouraudShading; break;
|
||||||
case EMF_LIGHTING: material.Lighting = Material.Lighting; break;
|
case EMP_LIGHTING: material.Lighting = Material.Lighting; break;
|
||||||
case EMF_ZBUFFER: material.ZBuffer = Material.ZBuffer; break;
|
case EMP_ZBUFFER: material.ZBuffer = Material.ZBuffer; break;
|
||||||
case EMF_ZWRITE_ENABLE: material.ZWriteEnable = Material.ZWriteEnable; break;
|
case EMP_ZWRITE_ENABLE: material.ZWriteEnable = Material.ZWriteEnable; break;
|
||||||
case EMF_BACK_FACE_CULLING: material.BackfaceCulling = Material.BackfaceCulling; break;
|
case EMP_BACK_FACE_CULLING: material.BackfaceCulling = Material.BackfaceCulling; break;
|
||||||
case EMF_FRONT_FACE_CULLING: material.FrontfaceCulling = Material.FrontfaceCulling; break;
|
case EMP_FRONT_FACE_CULLING: material.FrontfaceCulling = Material.FrontfaceCulling; break;
|
||||||
case EMF_BILINEAR_FILTER:
|
case EMP_MIN_FILTER:
|
||||||
for ( u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
|
for ( u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
|
||||||
{
|
{
|
||||||
if ( EnableLayerFlags[i] )
|
if ( EnableLayerProps[i] )
|
||||||
{
|
{
|
||||||
material.TextureLayer[i].BilinearFilter = Material.TextureLayer[i].BilinearFilter;
|
material.TextureLayers[i].MinFilter = Material.TextureLayers[i].MinFilter;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EMF_TRILINEAR_FILTER:
|
case EMP_MAG_FILTER:
|
||||||
for ( u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
|
for ( u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
|
||||||
{
|
{
|
||||||
if ( EnableLayerFlags[i] )
|
if ( EnableLayerProps[i] )
|
||||||
{
|
{
|
||||||
material.TextureLayer[i].TrilinearFilter = Material.TextureLayer[i].TrilinearFilter;
|
material.TextureLayers[i].MagFilter = Material.TextureLayers[i].MagFilter;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EMF_ANISOTROPIC_FILTER:
|
case EMP_ANISOTROPIC_FILTER:
|
||||||
for ( u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
|
for ( u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
|
||||||
{
|
{
|
||||||
if ( EnableLayerFlags[i] )
|
if ( EnableLayerProps[i] )
|
||||||
{
|
{
|
||||||
material.TextureLayer[i].AnisotropicFilter = Material.TextureLayer[i].AnisotropicFilter;
|
material.TextureLayers[i].AnisotropicFilter = Material.TextureLayers[i].AnisotropicFilter;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EMF_FOG_ENABLE: material.FogEnable = Material.FogEnable; break;
|
case EMP_FOG_ENABLE: material.FogEnable = Material.FogEnable; break;
|
||||||
case EMF_NORMALIZE_NORMALS: material.NormalizeNormals = Material.NormalizeNormals; break;
|
case EMP_NORMALIZE_NORMALS: material.NormalizeNormals = Material.NormalizeNormals; break;
|
||||||
case EMF_TEXTURE_WRAP:
|
case EMP_TEXTURE_WRAP:
|
||||||
for ( u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
|
for ( u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
|
||||||
{
|
{
|
||||||
if ( EnableLayerFlags[i] )
|
if ( EnableLayerProps[i] )
|
||||||
{
|
{
|
||||||
material.TextureLayer[i].TextureWrapU = Material.TextureLayer[i].TextureWrapU;
|
material.TextureLayers[i].TextureWrapU = Material.TextureLayers[i].TextureWrapU;
|
||||||
material.TextureLayer[i].TextureWrapV = Material.TextureLayer[i].TextureWrapV;
|
material.TextureLayers[i].TextureWrapV = Material.TextureLayers[i].TextureWrapV;
|
||||||
material.TextureLayer[i].TextureWrapW = Material.TextureLayer[i].TextureWrapW;
|
material.TextureLayers[i].TextureWrapW = Material.TextureLayers[i].TextureWrapW;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EMF_ANTI_ALIASING: material.AntiAliasing = Material.AntiAliasing; break;
|
case EMP_ANTI_ALIASING: material.AntiAliasing = Material.AntiAliasing; break;
|
||||||
case EMF_COLOR_MASK: material.ColorMask = Material.ColorMask; break;
|
case EMP_COLOR_MASK: material.ColorMask = Material.ColorMask; break;
|
||||||
case EMF_COLOR_MATERIAL: material.ColorMaterial = Material.ColorMaterial; break;
|
case EMP_COLOR_MATERIAL: material.ColorMaterial = Material.ColorMaterial; break;
|
||||||
case EMF_USE_MIP_MAPS: material.UseMipMaps = Material.UseMipMaps; break;
|
case EMP_USE_MIP_MAPS: material.UseMipMaps = Material.UseMipMaps; break;
|
||||||
case EMF_BLEND_OPERATION: material.BlendOperation = Material.BlendOperation; break;
|
case EMP_BLEND_OPERATION: material.BlendOperation = Material.BlendOperation; break;
|
||||||
case EMF_BLEND_FACTOR: material.BlendFactor = Material.BlendFactor; break;
|
case EMP_BLEND_FACTOR: material.BlendFactor = Material.BlendFactor; break;
|
||||||
case EMF_POLYGON_OFFSET:
|
case EMP_POLYGON_OFFSET:
|
||||||
material.PolygonOffsetDirection = Material.PolygonOffsetDirection;
|
|
||||||
material.PolygonOffsetFactor = Material.PolygonOffsetFactor;
|
|
||||||
material.PolygonOffsetDepthBias = Material.PolygonOffsetDepthBias;
|
material.PolygonOffsetDepthBias = Material.PolygonOffsetDepthBias;
|
||||||
material.PolygonOffsetSlopeScale = Material.PolygonOffsetSlopeScale;
|
material.PolygonOffsetSlopeScale = Material.PolygonOffsetSlopeScale;
|
||||||
break;
|
break;
|
||||||
@ -163,11 +161,11 @@ namespace video
|
|||||||
{
|
{
|
||||||
if ( EnableLayers[i] )
|
if ( EnableLayers[i] )
|
||||||
{
|
{
|
||||||
material.TextureLayer[i] = Material.TextureLayer[i];
|
material.TextureLayers[i] = Material.TextureLayers[i];
|
||||||
}
|
}
|
||||||
else if ( EnableTextures[i] )
|
else if ( EnableTextures[i] )
|
||||||
{
|
{
|
||||||
material.TextureLayer[i].Texture = Material.TextureLayer[i].Texture;
|
material.TextureLayers[i].Texture = Material.TextureLayers[i].Texture;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -429,24 +429,19 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//! Iterator to iterate through a UTF-16 string.
|
//! Iterator to iterate through a UTF-16 string.
|
||||||
class _ustring16_const_iterator : public std::iterator<
|
class _ustring16_const_iterator
|
||||||
std::bidirectional_iterator_tag, // iterator_category
|
|
||||||
access, // value_type
|
|
||||||
ptrdiff_t, // difference_type
|
|
||||||
const access, // pointer
|
|
||||||
const access // reference
|
|
||||||
>
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef _ustring16_const_iterator _Iter;
|
typedef _ustring16_const_iterator _Iter;
|
||||||
typedef std::iterator<std::bidirectional_iterator_tag, access, ptrdiff_t, const access, const access> _Base;
|
|
||||||
typedef const access const_pointer;
|
typedef const access const_pointer;
|
||||||
typedef const access const_reference;
|
typedef const access const_reference;
|
||||||
|
typedef ptrdiff_t distance_type;
|
||||||
|
|
||||||
typedef typename _Base::value_type value_type;
|
// stuff for std::iterator_traits
|
||||||
typedef typename _Base::difference_type difference_type;
|
typedef std::bidirectional_iterator_tag iterator_category;
|
||||||
typedef typename _Base::difference_type distance_type;
|
typedef access value_type;
|
||||||
typedef typename _Base::pointer pointer;
|
typedef distance_type difference_type;
|
||||||
|
typedef const access pointer;
|
||||||
typedef const_reference reference;
|
typedef const_reference reference;
|
||||||
|
|
||||||
//! Constructors.
|
//! Constructors.
|
||||||
@ -602,7 +597,7 @@ public:
|
|||||||
return difference_type();
|
return difference_type();
|
||||||
|
|
||||||
_Iter i = iter;
|
_Iter i = iter;
|
||||||
difference_type ret;
|
difference_type ret{};
|
||||||
|
|
||||||
// Walk up.
|
// Walk up.
|
||||||
if (pos > i.pos)
|
if (pos > i.pos)
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
#include "EGUIAlignment.h"
|
#include "EGUIAlignment.h"
|
||||||
#include "EGUIElementTypes.h"
|
#include "EGUIElementTypes.h"
|
||||||
#include "EHardwareBufferFlags.h"
|
#include "EHardwareBufferFlags.h"
|
||||||
#include "EMaterialFlags.h"
|
#include "EMaterialProps.h"
|
||||||
#include "EMaterialTypes.h"
|
#include "EMaterialTypes.h"
|
||||||
#include "EMeshWriterEnums.h"
|
#include "EMeshWriterEnums.h"
|
||||||
#include "ESceneNodeTypes.h"
|
#include "ESceneNodeTypes.h"
|
||||||
@ -255,8 +255,7 @@ namespace irr
|
|||||||
//! Creates an Irrlicht device. The Irrlicht device is the root object for using the engine.
|
//! Creates an Irrlicht device. The Irrlicht device is the root object for using the engine.
|
||||||
/** If you need more parameters to be passed to the creation of the Irrlicht Engine device,
|
/** If you need more parameters to be passed to the creation of the Irrlicht Engine device,
|
||||||
use the createDeviceEx() function.
|
use the createDeviceEx() function.
|
||||||
\param driverType: Type of the video driver to use. This can currently be video::EDT_NULL,
|
\param driverType: Type of the video driver to use.
|
||||||
video::EDT_SOFTWARE, video::EDT_BURNINGSVIDEO, video::EDT_DIRECT3D9 and video::EDT_OPENGL.
|
|
||||||
\param windowSize: Size of the window or the video mode in fullscreen mode.
|
\param windowSize: Size of the window or the video mode in fullscreen mode.
|
||||||
\param bits: Bits per pixel in fullscreen mode. Ignored if windowed mode.
|
\param bits: Bits per pixel in fullscreen mode. Ignored if windowed mode.
|
||||||
\param fullscreen: Should be set to true if the device should run in fullscreen. Otherwise
|
\param fullscreen: Should be set to true if the device should run in fullscreen. Otherwise
|
||||||
@ -280,16 +279,6 @@ namespace irr
|
|||||||
bool vsync = false,
|
bool vsync = false,
|
||||||
IEventReceiver* receiver = 0);
|
IEventReceiver* receiver = 0);
|
||||||
|
|
||||||
//! typedef for Function Pointer
|
|
||||||
typedef IrrlichtDevice* (IRRCALLCONV *funcptr_createDevice )(
|
|
||||||
video::E_DRIVER_TYPE driverType,
|
|
||||||
const core::dimension2d<u32>& windowSize,
|
|
||||||
u32 bits,
|
|
||||||
bool fullscreen,
|
|
||||||
bool stencilbuffer,
|
|
||||||
bool vsync,
|
|
||||||
IEventReceiver* receiver);
|
|
||||||
|
|
||||||
|
|
||||||
//! Creates an Irrlicht device with the option to specify advanced parameters.
|
//! Creates an Irrlicht device with the option to specify advanced parameters.
|
||||||
/** Usually you should used createDevice() for creating an Irrlicht Engine device.
|
/** Usually you should used createDevice() for creating an Irrlicht Engine device.
|
||||||
@ -302,10 +291,6 @@ namespace irr
|
|||||||
extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDeviceEx(
|
extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDeviceEx(
|
||||||
const SIrrlichtCreationParameters& parameters);
|
const SIrrlichtCreationParameters& parameters);
|
||||||
|
|
||||||
//! typedef for Function Pointer
|
|
||||||
typedef IrrlichtDevice* (IRRCALLCONV *funcptr_createDeviceEx )( const SIrrlichtCreationParameters& parameters );
|
|
||||||
|
|
||||||
|
|
||||||
// THE FOLLOWING IS AN EMPTY LIST OF ALL SUB NAMESPACES
|
// THE FOLLOWING IS AN EMPTY LIST OF ALL SUB NAMESPACES
|
||||||
// EXISTING ONLY FOR THE DOCUMENTATION SOFTWARE DOXYGEN.
|
// EXISTING ONLY FOR THE DOCUMENTATION SOFTWARE DOXYGEN.
|
||||||
|
|
||||||
|
@ -278,13 +278,6 @@ namespace core
|
|||||||
void transformPlane( const core::plane3d<f32> &in, core::plane3d<f32> &out) const;
|
void transformPlane( const core::plane3d<f32> &in, core::plane3d<f32> &out) const;
|
||||||
|
|
||||||
//! Transforms a axis aligned bounding box
|
//! Transforms a axis aligned bounding box
|
||||||
/** The result box of this operation may not be accurate at all. For
|
|
||||||
correct results, use transformBoxEx() */
|
|
||||||
void transformBox(core::aabbox3d<f32>& box) const;
|
|
||||||
|
|
||||||
//! Transforms a axis aligned bounding box
|
|
||||||
/** The result box of this operation should be accurate, but this operation
|
|
||||||
is slower than transformBox(). */
|
|
||||||
void transformBoxEx(core::aabbox3d<f32>& box) const;
|
void transformBoxEx(core::aabbox3d<f32>& box) const;
|
||||||
|
|
||||||
//! Multiplies this matrix by a 1x4 matrix
|
//! Multiplies this matrix by a 1x4 matrix
|
||||||
@ -963,7 +956,7 @@ namespace core
|
|||||||
|
|
||||||
// We assume the matrix uses rotations instead of negative scaling 2 axes.
|
// We assume the matrix uses rotations instead of negative scaling 2 axes.
|
||||||
// Otherwise it fails even for some simple cases, like rotating around
|
// Otherwise it fails even for some simple cases, like rotating around
|
||||||
// 2 axes by 180<EFBFBD> which getScale thinks is a negative scaling.
|
// 2 axes by 180° which getScale thinks is a negative scaling.
|
||||||
if (scale.Y<0 && scale.Z<0)
|
if (scale.Y<0 && scale.Z<0)
|
||||||
{
|
{
|
||||||
scale.Y =-scale.Y;
|
scale.Y =-scale.Y;
|
||||||
@ -1278,22 +1271,6 @@ namespace core
|
|||||||
transformPlane( out );
|
transformPlane( out );
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Transforms the edge-points of a bounding box
|
|
||||||
//! Deprecated as it's usually not what people need (regards only 2 corners, but other corners might be outside the box after transformation)
|
|
||||||
//! Use transformBoxEx instead.
|
|
||||||
template <class T>
|
|
||||||
_IRR_DEPRECATED_ inline void CMatrix4<T>::transformBox(core::aabbox3d<f32>& box) const
|
|
||||||
{
|
|
||||||
#if defined ( USE_MATRIX_TEST )
|
|
||||||
if (isIdentity())
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
transformVect(box.MinEdge);
|
|
||||||
transformVect(box.MaxEdge);
|
|
||||||
box.repair();
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Transforms a axis aligned bounding box more accurately than transformBox()
|
//! Transforms a axis aligned bounding box more accurately than transformBox()
|
||||||
template <class T>
|
template <class T>
|
||||||
inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
|
inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
|
||||||
|
@ -100,8 +100,7 @@ namespace core
|
|||||||
//! Check if a point is inside the triangle (border-points count also as inside)
|
//! Check if a point is inside the triangle (border-points count also as inside)
|
||||||
/** This method uses a barycentric coordinate system.
|
/** This method uses a barycentric coordinate system.
|
||||||
It is faster than isPointInside but is more susceptible to floating point rounding
|
It is faster than isPointInside but is more susceptible to floating point rounding
|
||||||
errors. This will especially be noticeable when the FPU is in single precision mode
|
errors.
|
||||||
(which is for example set on default by Direct3D).
|
|
||||||
\param p Point to test. Assumes that this point is already
|
\param p Point to test. Assumes that this point is already
|
||||||
on the plane of the triangle.
|
on the plane of the triangle.
|
||||||
\return True if point is inside the triangle, otherwise false. */
|
\return True if point is inside the triangle, otherwise false. */
|
||||||
|
@ -1,70 +0,0 @@
|
|||||||
precision mediump float;
|
|
||||||
|
|
||||||
/* Uniforms */
|
|
||||||
|
|
||||||
uniform int uTextureUsage0;
|
|
||||||
uniform int uTextureUsage1;
|
|
||||||
uniform sampler2D uTextureUnit0;
|
|
||||||
uniform sampler2D uTextureUnit1;
|
|
||||||
uniform int uFogEnable;
|
|
||||||
uniform int uFogType;
|
|
||||||
uniform vec4 uFogColor;
|
|
||||||
uniform float uFogStart;
|
|
||||||
uniform float uFogEnd;
|
|
||||||
uniform float uFogDensity;
|
|
||||||
|
|
||||||
/* Varyings */
|
|
||||||
|
|
||||||
varying vec2 vTextureCoord0;
|
|
||||||
varying vec2 vTextureCoord1;
|
|
||||||
varying vec4 vVertexColor;
|
|
||||||
varying vec4 vSpecularColor;
|
|
||||||
varying float vFogCoord;
|
|
||||||
|
|
||||||
float computeFog()
|
|
||||||
{
|
|
||||||
const float LOG2 = 1.442695;
|
|
||||||
float FogFactor = 0.0;
|
|
||||||
|
|
||||||
if (uFogType == 0) // Exp
|
|
||||||
{
|
|
||||||
FogFactor = exp2(-uFogDensity * vFogCoord * LOG2);
|
|
||||||
}
|
|
||||||
else if (uFogType == 1) // Linear
|
|
||||||
{
|
|
||||||
float Scale = 1.0 / (uFogEnd - uFogStart);
|
|
||||||
FogFactor = (uFogEnd - vFogCoord) * Scale;
|
|
||||||
}
|
|
||||||
else if (uFogType == 2) // Exp2
|
|
||||||
{
|
|
||||||
FogFactor = exp2(-uFogDensity * uFogDensity * vFogCoord * vFogCoord * LOG2);
|
|
||||||
}
|
|
||||||
|
|
||||||
FogFactor = clamp(FogFactor, 0.0, 1.0);
|
|
||||||
|
|
||||||
return FogFactor;
|
|
||||||
}
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
vec4 Color0 = vec4(1.0, 1.0, 1.0, 1.0);
|
|
||||||
vec4 Color1 = vec4(1.0, 1.0, 1.0, 1.0);
|
|
||||||
|
|
||||||
if (bool(uTextureUsage0))
|
|
||||||
Color0 = texture2D(uTextureUnit0, vTextureCoord0);
|
|
||||||
|
|
||||||
if (bool(uTextureUsage1))
|
|
||||||
Color1 = texture2D(uTextureUnit1, vTextureCoord1);
|
|
||||||
|
|
||||||
vec4 FinalColor = vec4(Color0 + (Color1 - 0.5)) * vVertexColor + vSpecularColor;
|
|
||||||
|
|
||||||
if (bool(uFogEnable))
|
|
||||||
{
|
|
||||||
float FogFactor = computeFog();
|
|
||||||
vec4 FogColor = uFogColor;
|
|
||||||
FogColor.a = 1.0;
|
|
||||||
FinalColor = mix(FogColor, FinalColor, FogFactor);
|
|
||||||
}
|
|
||||||
|
|
||||||
gl_FragColor = FinalColor;
|
|
||||||
}
|
|
@ -1,70 +0,0 @@
|
|||||||
precision mediump float;
|
|
||||||
|
|
||||||
/* Uniforms */
|
|
||||||
|
|
||||||
uniform int uTextureUsage0;
|
|
||||||
uniform int uTextureUsage1;
|
|
||||||
uniform sampler2D uTextureUnit0;
|
|
||||||
uniform sampler2D uTextureUnit1;
|
|
||||||
uniform int uFogEnable;
|
|
||||||
uniform int uFogType;
|
|
||||||
uniform vec4 uFogColor;
|
|
||||||
uniform float uFogStart;
|
|
||||||
uniform float uFogEnd;
|
|
||||||
uniform float uFogDensity;
|
|
||||||
|
|
||||||
/* Varyings */
|
|
||||||
|
|
||||||
varying vec2 vTextureCoord0;
|
|
||||||
varying vec2 vTextureCoord1;
|
|
||||||
varying vec4 vVertexColor;
|
|
||||||
varying vec4 vSpecularColor;
|
|
||||||
varying float vFogCoord;
|
|
||||||
|
|
||||||
float computeFog()
|
|
||||||
{
|
|
||||||
const float LOG2 = 1.442695;
|
|
||||||
float FogFactor = 0.0;
|
|
||||||
|
|
||||||
if (uFogType == 0) // Exp
|
|
||||||
{
|
|
||||||
FogFactor = exp2(-uFogDensity * vFogCoord * LOG2);
|
|
||||||
}
|
|
||||||
else if (uFogType == 1) // Linear
|
|
||||||
{
|
|
||||||
float Scale = 1.0 / (uFogEnd - uFogStart);
|
|
||||||
FogFactor = (uFogEnd - vFogCoord) * Scale;
|
|
||||||
}
|
|
||||||
else if (uFogType == 2) // Exp2
|
|
||||||
{
|
|
||||||
FogFactor = exp2(-uFogDensity * uFogDensity * vFogCoord * vFogCoord * LOG2);
|
|
||||||
}
|
|
||||||
|
|
||||||
FogFactor = clamp(FogFactor, 0.0, 1.0);
|
|
||||||
|
|
||||||
return FogFactor;
|
|
||||||
}
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
vec4 Color0 = vec4(1.0, 1.0, 1.0, 1.0);
|
|
||||||
vec4 Color1 = vec4(1.0, 1.0, 1.0, 1.0);
|
|
||||||
|
|
||||||
if (bool(uTextureUsage0))
|
|
||||||
Color0 = texture2D(uTextureUnit0, vTextureCoord0);
|
|
||||||
|
|
||||||
if (bool(uTextureUsage1))
|
|
||||||
Color1 = texture2D(uTextureUnit1, vTextureCoord1);
|
|
||||||
|
|
||||||
vec4 FinalColor = (Color0 + Color1) * vVertexColor + vSpecularColor;
|
|
||||||
|
|
||||||
if (bool(uFogEnable))
|
|
||||||
{
|
|
||||||
float FogFactor = computeFog();
|
|
||||||
vec4 FogColor = uFogColor;
|
|
||||||
FogColor.a = 1.0;
|
|
||||||
FinalColor = mix(FogColor, FinalColor, FogFactor);
|
|
||||||
}
|
|
||||||
|
|
||||||
gl_FragColor = FinalColor;
|
|
||||||
}
|
|
@ -1,72 +0,0 @@
|
|||||||
precision mediump float;
|
|
||||||
|
|
||||||
/* Uniforms */
|
|
||||||
|
|
||||||
uniform float uModulate;
|
|
||||||
uniform int uTextureUsage0;
|
|
||||||
uniform int uTextureUsage1;
|
|
||||||
uniform sampler2D uTextureUnit0;
|
|
||||||
uniform sampler2D uTextureUnit1;
|
|
||||||
uniform int uFogEnable;
|
|
||||||
uniform int uFogType;
|
|
||||||
uniform vec4 uFogColor;
|
|
||||||
uniform float uFogStart;
|
|
||||||
uniform float uFogEnd;
|
|
||||||
uniform float uFogDensity;
|
|
||||||
|
|
||||||
/* Varyings */
|
|
||||||
|
|
||||||
varying vec2 vTextureCoord0;
|
|
||||||
varying vec2 vTextureCoord1;
|
|
||||||
varying vec4 vVertexColor;
|
|
||||||
varying vec4 vSpecularColor;
|
|
||||||
varying float vFogCoord;
|
|
||||||
|
|
||||||
float computeFog()
|
|
||||||
{
|
|
||||||
const float LOG2 = 1.442695;
|
|
||||||
float FogFactor = 0.0;
|
|
||||||
|
|
||||||
if (uFogType == 0) // Exp
|
|
||||||
{
|
|
||||||
FogFactor = exp2(-uFogDensity * vFogCoord * LOG2);
|
|
||||||
}
|
|
||||||
else if (uFogType == 1) // Linear
|
|
||||||
{
|
|
||||||
float Scale = 1.0 / (uFogEnd - uFogStart);
|
|
||||||
FogFactor = (uFogEnd - vFogCoord) * Scale;
|
|
||||||
}
|
|
||||||
else if (uFogType == 2) // Exp2
|
|
||||||
{
|
|
||||||
FogFactor = exp2(-uFogDensity * uFogDensity * vFogCoord * vFogCoord * LOG2);
|
|
||||||
}
|
|
||||||
|
|
||||||
FogFactor = clamp(FogFactor, 0.0, 1.0);
|
|
||||||
|
|
||||||
return FogFactor;
|
|
||||||
}
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
vec4 Color0 = vec4(1.0, 1.0, 1.0, 1.0);
|
|
||||||
vec4 Color1 = vec4(1.0, 1.0, 1.0, 1.0);
|
|
||||||
|
|
||||||
if (bool(uTextureUsage0))
|
|
||||||
Color0 = texture2D(uTextureUnit0, vTextureCoord0);
|
|
||||||
|
|
||||||
if (bool(uTextureUsage1))
|
|
||||||
Color1 = texture2D(uTextureUnit1, vTextureCoord1);
|
|
||||||
|
|
||||||
vec4 FinalColor = (Color0 * Color1 * uModulate) * vVertexColor;
|
|
||||||
FinalColor += vSpecularColor;
|
|
||||||
|
|
||||||
if (bool(uFogEnable))
|
|
||||||
{
|
|
||||||
float FogFactor = computeFog();
|
|
||||||
vec4 FogColor = uFogColor;
|
|
||||||
FogColor.a = 1.0;
|
|
||||||
FinalColor = mix(FogColor, FinalColor, FogFactor);
|
|
||||||
}
|
|
||||||
|
|
||||||
gl_FragColor = FinalColor;
|
|
||||||
}
|
|
@ -1,70 +0,0 @@
|
|||||||
precision mediump float;
|
|
||||||
|
|
||||||
/* Uniforms */
|
|
||||||
|
|
||||||
uniform int uTextureUsage0;
|
|
||||||
uniform int uTextureUsage1;
|
|
||||||
uniform sampler2D uTextureUnit0;
|
|
||||||
uniform sampler2D uTextureUnit1;
|
|
||||||
uniform int uFogEnable;
|
|
||||||
uniform int uFogType;
|
|
||||||
uniform vec4 uFogColor;
|
|
||||||
uniform float uFogStart;
|
|
||||||
uniform float uFogEnd;
|
|
||||||
uniform float uFogDensity;
|
|
||||||
|
|
||||||
/* Varyings */
|
|
||||||
|
|
||||||
varying vec2 vTextureCoord0;
|
|
||||||
varying vec2 vTextureCoord1;
|
|
||||||
varying vec4 vVertexColor;
|
|
||||||
varying vec4 vSpecularColor;
|
|
||||||
varying float vFogCoord;
|
|
||||||
|
|
||||||
float computeFog()
|
|
||||||
{
|
|
||||||
const float LOG2 = 1.442695;
|
|
||||||
float FogFactor = 0.0;
|
|
||||||
|
|
||||||
if (uFogType == 0) // Exp
|
|
||||||
{
|
|
||||||
FogFactor = exp2(-uFogDensity * vFogCoord * LOG2);
|
|
||||||
}
|
|
||||||
else if (uFogType == 1) // Linear
|
|
||||||
{
|
|
||||||
float Scale = 1.0 / (uFogEnd - uFogStart);
|
|
||||||
FogFactor = (uFogEnd - vFogCoord) * Scale;
|
|
||||||
}
|
|
||||||
else if (uFogType == 2) // Exp2
|
|
||||||
{
|
|
||||||
FogFactor = exp2(-uFogDensity * uFogDensity * vFogCoord * vFogCoord * LOG2);
|
|
||||||
}
|
|
||||||
|
|
||||||
FogFactor = clamp(FogFactor, 0.0, 1.0);
|
|
||||||
|
|
||||||
return FogFactor;
|
|
||||||
}
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
vec4 Color0 = vec4(1.0, 1.0, 1.0, 1.0);
|
|
||||||
vec4 Color1 = vec4(1.0, 1.0, 1.0, 1.0);
|
|
||||||
|
|
||||||
if (bool(uTextureUsage0))
|
|
||||||
Color0 = texture2D(uTextureUnit0, vTextureCoord0);
|
|
||||||
|
|
||||||
if (bool(uTextureUsage1))
|
|
||||||
Color1 = texture2D(uTextureUnit1, vTextureCoord1);
|
|
||||||
|
|
||||||
vec4 FinalColor = (Color0 * Color1) * vVertexColor + vSpecularColor;
|
|
||||||
|
|
||||||
if (bool(uFogEnable))
|
|
||||||
{
|
|
||||||
float FogFactor = computeFog();
|
|
||||||
vec4 FogColor = uFogColor;
|
|
||||||
FogColor.a = 1.0;
|
|
||||||
FinalColor = mix(FogColor, FinalColor, FogFactor);
|
|
||||||
}
|
|
||||||
|
|
||||||
gl_FragColor = FinalColor;
|
|
||||||
}
|
|
@ -1,53 +0,0 @@
|
|||||||
/* Attributes */
|
|
||||||
|
|
||||||
attribute vec3 inVertexPosition;
|
|
||||||
attribute vec3 inVertexNormal;
|
|
||||||
attribute vec4 inVertexColor;
|
|
||||||
attribute vec2 inTexCoord0;
|
|
||||||
attribute vec2 inTexCoord1;
|
|
||||||
|
|
||||||
/* Uniforms */
|
|
||||||
|
|
||||||
uniform mat4 uWVPMatrix;
|
|
||||||
uniform mat4 uWVMatrix;
|
|
||||||
uniform mat4 uNMatrix;
|
|
||||||
uniform mat4 uTMatrix0;
|
|
||||||
|
|
||||||
uniform vec4 uGlobalAmbient;
|
|
||||||
uniform vec4 uMaterialAmbient;
|
|
||||||
uniform vec4 uMaterialDiffuse;
|
|
||||||
uniform vec4 uMaterialEmissive;
|
|
||||||
uniform vec4 uMaterialSpecular;
|
|
||||||
uniform float uMaterialShininess;
|
|
||||||
|
|
||||||
uniform float uThickness;
|
|
||||||
|
|
||||||
/* Varyings */
|
|
||||||
|
|
||||||
varying vec2 vTextureCoord0;
|
|
||||||
varying vec2 vTextureCoord1;
|
|
||||||
varying vec4 vVertexColor;
|
|
||||||
varying vec4 vSpecularColor;
|
|
||||||
varying float vFogCoord;
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
gl_Position = uWVPMatrix * vec4(inVertexPosition, 1.0);
|
|
||||||
gl_PointSize = uThickness;
|
|
||||||
|
|
||||||
vec4 TextureCoord0 = vec4(inTexCoord0.x, inTexCoord0.y, 1.0, 1.0);
|
|
||||||
vTextureCoord0 = vec4(uTMatrix0 * TextureCoord0).xy;
|
|
||||||
|
|
||||||
vec3 Position = (uWVMatrix * vec4(inVertexPosition, 1.0)).xyz;
|
|
||||||
vec3 P = normalize(Position);
|
|
||||||
vec3 N = normalize(vec4(uNMatrix * vec4(inVertexNormal, 0.0)).xyz);
|
|
||||||
vec3 R = reflect(P, N);
|
|
||||||
|
|
||||||
float V = 2.0 * sqrt(R.x*R.x + R.y*R.y + (R.z+1.0)*(R.z+1.0));
|
|
||||||
vTextureCoord1 = vec2(R.x/V + 0.5, R.y/V + 0.5);
|
|
||||||
|
|
||||||
vVertexColor = inVertexColor.bgra;
|
|
||||||
vSpecularColor = vec4(0.0, 0.0, 0.0, 0.0);
|
|
||||||
|
|
||||||
vFogCoord = length(Position);
|
|
||||||
}
|
|
@ -1,51 +0,0 @@
|
|||||||
/* Attributes */
|
|
||||||
|
|
||||||
attribute vec3 inVertexPosition;
|
|
||||||
attribute vec3 inVertexNormal;
|
|
||||||
attribute vec4 inVertexColor;
|
|
||||||
attribute vec2 inTexCoord0;
|
|
||||||
attribute vec2 inTexCoord1;
|
|
||||||
|
|
||||||
/* Uniforms */
|
|
||||||
|
|
||||||
uniform mat4 uWVPMatrix;
|
|
||||||
uniform mat4 uWVMatrix;
|
|
||||||
uniform mat4 uNMatrix;
|
|
||||||
uniform mat4 uTMatrix0;
|
|
||||||
uniform mat4 uTMatrix1;
|
|
||||||
|
|
||||||
uniform vec4 uGlobalAmbient;
|
|
||||||
uniform vec4 uMaterialAmbient;
|
|
||||||
uniform vec4 uMaterialDiffuse;
|
|
||||||
uniform vec4 uMaterialEmissive;
|
|
||||||
uniform vec4 uMaterialSpecular;
|
|
||||||
uniform float uMaterialShininess;
|
|
||||||
|
|
||||||
uniform float uThickness;
|
|
||||||
|
|
||||||
/* Varyings */
|
|
||||||
|
|
||||||
varying vec2 vTextureCoord0;
|
|
||||||
varying vec2 vTextureCoord1;
|
|
||||||
varying vec4 vVertexColor;
|
|
||||||
varying vec4 vSpecularColor;
|
|
||||||
varying float vFogCoord;
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
gl_Position = uWVPMatrix * vec4(inVertexPosition, 1.0);
|
|
||||||
gl_PointSize = uThickness;
|
|
||||||
|
|
||||||
vec4 TextureCoord0 = vec4(inTexCoord0.x, inTexCoord0.y, 1.0, 1.0);
|
|
||||||
vTextureCoord0 = vec4(uTMatrix0 * TextureCoord0).xy;
|
|
||||||
|
|
||||||
vec4 TextureCoord1 = vec4(inTexCoord1.x, inTexCoord1.y, 1.0, 1.0);
|
|
||||||
vTextureCoord1 = vec4(uTMatrix1 * TextureCoord1).xy;
|
|
||||||
|
|
||||||
vVertexColor = inVertexColor.bgra;
|
|
||||||
vSpecularColor = vec4(0.0, 0.0, 0.0, 0.0);
|
|
||||||
|
|
||||||
vec3 Position = (uWVMatrix * vec4(inVertexPosition, 1.0)).xyz;
|
|
||||||
|
|
||||||
vFogCoord = length(Position);
|
|
||||||
}
|
|
@ -1,72 +0,0 @@
|
|||||||
precision mediump float;
|
|
||||||
|
|
||||||
/* Uniforms */
|
|
||||||
|
|
||||||
uniform int uTextureUsage0;
|
|
||||||
uniform int uTextureUsage1;
|
|
||||||
uniform sampler2D uTextureUnit0;
|
|
||||||
uniform sampler2D uTextureUnit1;
|
|
||||||
uniform int uFogEnable;
|
|
||||||
uniform int uFogType;
|
|
||||||
uniform vec4 uFogColor;
|
|
||||||
uniform float uFogStart;
|
|
||||||
uniform float uFogEnd;
|
|
||||||
uniform float uFogDensity;
|
|
||||||
|
|
||||||
/* Varyings */
|
|
||||||
|
|
||||||
varying vec2 vTextureCoord0;
|
|
||||||
varying vec2 vTextureCoord1;
|
|
||||||
varying vec4 vVertexColor;
|
|
||||||
varying vec4 vSpecularColor;
|
|
||||||
varying float vFogCoord;
|
|
||||||
|
|
||||||
float computeFog()
|
|
||||||
{
|
|
||||||
const float LOG2 = 1.442695;
|
|
||||||
float FogFactor = 0.0;
|
|
||||||
|
|
||||||
if (uFogType == 0) // Exp
|
|
||||||
{
|
|
||||||
FogFactor = exp2(-uFogDensity * vFogCoord * LOG2);
|
|
||||||
}
|
|
||||||
else if (uFogType == 1) // Linear
|
|
||||||
{
|
|
||||||
float Scale = 1.0 / (uFogEnd - uFogStart);
|
|
||||||
FogFactor = (uFogEnd - vFogCoord) * Scale;
|
|
||||||
}
|
|
||||||
else if (uFogType == 2) // Exp2
|
|
||||||
{
|
|
||||||
FogFactor = exp2(-uFogDensity * uFogDensity * vFogCoord * vFogCoord * LOG2);
|
|
||||||
}
|
|
||||||
|
|
||||||
FogFactor = clamp(FogFactor, 0.0, 1.0);
|
|
||||||
|
|
||||||
return FogFactor;
|
|
||||||
}
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
vec4 Color0 = vec4(1.0, 1.0, 1.0, 1.0);
|
|
||||||
vec4 Color1 = vec4(1.0, 1.0, 1.0, 1.0);
|
|
||||||
|
|
||||||
if (bool(uTextureUsage0))
|
|
||||||
Color0 = texture2D(uTextureUnit0, vTextureCoord0);
|
|
||||||
|
|
||||||
if (bool(uTextureUsage1))
|
|
||||||
Color1 = texture2D(uTextureUnit1, vTextureCoord1);
|
|
||||||
|
|
||||||
vec4 FinalColor = (Color0 * vVertexColor.a + Color1 * (1.0 - vVertexColor.a)) * vVertexColor;
|
|
||||||
FinalColor += vSpecularColor;
|
|
||||||
|
|
||||||
if (bool(uFogEnable))
|
|
||||||
{
|
|
||||||
float FogFactor = computeFog();
|
|
||||||
vec4 FogColor = uFogColor;
|
|
||||||
FogColor.a = 1.0;
|
|
||||||
FinalColor = mix(FogColor, FinalColor, FogFactor);
|
|
||||||
}
|
|
||||||
|
|
||||||
gl_FragColor = FinalColor;
|
|
||||||
|
|
||||||
}
|
|
@ -1,62 +0,0 @@
|
|||||||
precision mediump float;
|
|
||||||
|
|
||||||
/* Uniforms */
|
|
||||||
|
|
||||||
uniform int uTextureUsage0;
|
|
||||||
uniform sampler2D uTextureUnit0;
|
|
||||||
uniform int uFogEnable;
|
|
||||||
uniform int uFogType;
|
|
||||||
uniform vec4 uFogColor;
|
|
||||||
uniform float uFogStart;
|
|
||||||
uniform float uFogEnd;
|
|
||||||
uniform float uFogDensity;
|
|
||||||
|
|
||||||
/* Varyings */
|
|
||||||
|
|
||||||
varying vec2 vTextureCoord0;
|
|
||||||
varying vec4 vVertexColor;
|
|
||||||
varying vec4 vSpecularColor;
|
|
||||||
varying float vFogCoord;
|
|
||||||
|
|
||||||
float computeFog()
|
|
||||||
{
|
|
||||||
const float LOG2 = 1.442695;
|
|
||||||
float FogFactor = 0.0;
|
|
||||||
|
|
||||||
if (uFogType == 0) // Exp
|
|
||||||
{
|
|
||||||
FogFactor = exp2(-uFogDensity * vFogCoord * LOG2);
|
|
||||||
}
|
|
||||||
else if (uFogType == 1) // Linear
|
|
||||||
{
|
|
||||||
float Scale = 1.0 / (uFogEnd - uFogStart);
|
|
||||||
FogFactor = (uFogEnd - vFogCoord) * Scale;
|
|
||||||
}
|
|
||||||
else if (uFogType == 2) // Exp2
|
|
||||||
{
|
|
||||||
FogFactor = exp2(-uFogDensity * uFogDensity * vFogCoord * vFogCoord * LOG2);
|
|
||||||
}
|
|
||||||
|
|
||||||
FogFactor = clamp(FogFactor, 0.0, 1.0);
|
|
||||||
|
|
||||||
return FogFactor;
|
|
||||||
}
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
vec4 Color = vVertexColor;
|
|
||||||
|
|
||||||
if (bool(uTextureUsage0))
|
|
||||||
Color *= texture2D(uTextureUnit0, vTextureCoord0);
|
|
||||||
Color += vSpecularColor;
|
|
||||||
|
|
||||||
if (bool(uFogEnable))
|
|
||||||
{
|
|
||||||
float FogFactor = computeFog();
|
|
||||||
vec4 FogColor = uFogColor;
|
|
||||||
FogColor.a = 1.0;
|
|
||||||
Color = mix(FogColor, Color, FogFactor);
|
|
||||||
}
|
|
||||||
|
|
||||||
gl_FragColor = Color;
|
|
||||||
}
|
|
@ -1,48 +0,0 @@
|
|||||||
/* Attributes */
|
|
||||||
|
|
||||||
attribute vec3 inVertexPosition;
|
|
||||||
attribute vec3 inVertexNormal;
|
|
||||||
attribute vec4 inVertexColor;
|
|
||||||
attribute vec2 inTexCoord0;
|
|
||||||
attribute vec2 inTexCoord1;
|
|
||||||
|
|
||||||
/* Uniforms */
|
|
||||||
|
|
||||||
uniform mat4 uWVPMatrix;
|
|
||||||
uniform mat4 uWVMatrix;
|
|
||||||
uniform mat4 uNMatrix;
|
|
||||||
|
|
||||||
uniform vec4 uGlobalAmbient;
|
|
||||||
uniform vec4 uMaterialAmbient;
|
|
||||||
uniform vec4 uMaterialDiffuse;
|
|
||||||
uniform vec4 uMaterialEmissive;
|
|
||||||
uniform vec4 uMaterialSpecular;
|
|
||||||
uniform float uMaterialShininess;
|
|
||||||
|
|
||||||
uniform float uThickness;
|
|
||||||
|
|
||||||
/* Varyings */
|
|
||||||
|
|
||||||
varying vec2 vTextureCoord0;
|
|
||||||
varying vec4 vVertexColor;
|
|
||||||
varying vec4 vSpecularColor;
|
|
||||||
varying float vFogCoord;
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
gl_Position = uWVPMatrix * vec4(inVertexPosition, 1.0);
|
|
||||||
gl_PointSize = uThickness;
|
|
||||||
|
|
||||||
vec3 Position = (uWVMatrix * vec4(inVertexPosition, 1.0)).xyz;
|
|
||||||
vec3 P = normalize(Position);
|
|
||||||
vec3 N = normalize(vec4(uNMatrix * vec4(inVertexNormal, 0.0)).xyz);
|
|
||||||
vec3 R = reflect(P, N);
|
|
||||||
|
|
||||||
float V = 2.0 * sqrt(R.x*R.x + R.y*R.y + (R.z+1.0)*(R.z+1.0));
|
|
||||||
vTextureCoord0 = vec2(R.x/V + 0.5, R.y/V + 0.5);
|
|
||||||
|
|
||||||
vVertexColor = inVertexColor.bgra;
|
|
||||||
vSpecularColor = vec4(0.0, 0.0, 0.0, 0.0);
|
|
||||||
|
|
||||||
vFogCoord = length(Position);
|
|
||||||
}
|
|
34
repro.sh
Executable file
34
repro.sh
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
aflout=out/default
|
||||||
|
myout=out_rep
|
||||||
|
exe=./bin/Linux/LoadMesh
|
||||||
|
rm -rf "$myout" && mkdir -p "$myout"
|
||||||
|
find $aflout/crashes -name 'id:*' -print | \
|
||||||
|
while read file; do
|
||||||
|
echo "➤ Testing $file..."
|
||||||
|
short=${file##*/}
|
||||||
|
short=${short%%,*}
|
||||||
|
fout=$myout/$short.txt
|
||||||
|
$exe "$file" >"$fout" 2>&1
|
||||||
|
r=$?
|
||||||
|
if grep -Fq '==ERROR: AddressSanitizer: SEGV on unknown address' "$fout"; then
|
||||||
|
gdb -q --batch -iex 'set confirm off' -ex r -ex bt --args \
|
||||||
|
${exe}_noasan "$file" >"$fout" 2>&1
|
||||||
|
if grep -Eq '^(Thread|Program).*received signal' "$fout"; then
|
||||||
|
cp "$file" "$myout/$short.bin"
|
||||||
|
echo "✔ Reproduced (gdb)"
|
||||||
|
else
|
||||||
|
echo "✗ Not reproduced (gdb)"
|
||||||
|
rm -f "$fout"
|
||||||
|
fi
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
grep -Fq '==ABORTING' "$fout" && r=1
|
||||||
|
if [ $r -eq 0 ]; then
|
||||||
|
echo "✗ Not reproduced (asan)"
|
||||||
|
rm -f "$fout"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
cp "$file" "$myout/$short.bin"
|
||||||
|
echo "✔ Reproduced (asan)"
|
||||||
|
done
|
17
run.sh
Executable file
17
run.sh
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
export AFL_SKIP_CPUFREQ=1
|
||||||
|
export AFL_TMPDIR=/dev/shm
|
||||||
|
exe=./bin/Linux/LoadMesh
|
||||||
|
opts=(
|
||||||
|
-t 100
|
||||||
|
-i sample_u/
|
||||||
|
-o out/
|
||||||
|
)
|
||||||
|
if ! [ -d sample_u ]; then
|
||||||
|
mkdir sample_u
|
||||||
|
afl-cmin.bash -T 4 -i sample/ -o sample_u/ -- $exe @@
|
||||||
|
echo; echo
|
||||||
|
fi
|
||||||
|
exec afl-fuzz \
|
||||||
|
"${opts[@]}" "$@" \
|
||||||
|
-- $exe @@
|
@ -4,9 +4,14 @@
|
|||||||
|
|
||||||
variant=win32
|
variant=win32
|
||||||
[[ "$(basename "$CXX")" == "x86_64-"* ]] && variant=win64
|
[[ "$(basename "$CXX")" == "x86_64-"* ]] && variant=win64
|
||||||
|
with_sdl=0
|
||||||
|
[[ "$extras" == *"-sdl"* ]] && with_sdl=1
|
||||||
|
#with_gl3=0
|
||||||
|
#[[ "$extras" == *"-gl3"* ]] && with_gl3=1
|
||||||
|
|
||||||
libjpeg_version=2.1.5.1
|
libjpeg_version=2.1.5.1
|
||||||
libpng_version=1.6.39
|
libpng_version=1.6.39
|
||||||
|
sdl2_version=2.28.1
|
||||||
zlib_version=1.2.13
|
zlib_version=1.2.13
|
||||||
|
|
||||||
mkdir -p libs
|
mkdir -p libs
|
||||||
@ -16,10 +21,13 @@ libs=$PWD
|
|||||||
wget "http://minetest.kitsunemimi.pw/libjpeg-$libjpeg_version-$variant.zip" -O libjpeg.zip
|
wget "http://minetest.kitsunemimi.pw/libjpeg-$libjpeg_version-$variant.zip" -O libjpeg.zip
|
||||||
[ -e libpng.zip ] || \
|
[ -e libpng.zip ] || \
|
||||||
wget "http://minetest.kitsunemimi.pw/libpng-$libpng_version-$variant.zip" -O libpng.zip
|
wget "http://minetest.kitsunemimi.pw/libpng-$libpng_version-$variant.zip" -O libpng.zip
|
||||||
|
[[ $with_sdl -eq 0 || -e sdl2.zip ]] || \
|
||||||
|
wget "http://minetest.kitsunemimi.pw/sdl2-$sdl2_version-$variant.zip" -O sdl2.zip
|
||||||
[ -e zlib.zip ] || \
|
[ -e zlib.zip ] || \
|
||||||
wget "http://minetest.kitsunemimi.pw/zlib-$zlib_version-$variant.zip" -O zlib.zip
|
wget "http://minetest.kitsunemimi.pw/zlib-$zlib_version-$variant.zip" -O zlib.zip
|
||||||
[ -d libjpeg ] || unzip -o libjpeg.zip -d libjpeg
|
[ -d libjpeg ] || unzip -o libjpeg.zip -d libjpeg
|
||||||
[ -d libpng ] || unzip -o libpng.zip -d libpng
|
[ -d libpng ] || unzip -o libpng.zip -d libpng
|
||||||
|
[[ $with_sdl -eq 0 || -d sdl2 ]] || unzip -o sdl2.zip -d sdl2
|
||||||
[ -d zlib ] || unzip -o zlib.zip -d zlib
|
[ -d zlib ] || unzip -o zlib.zip -d zlib
|
||||||
popd
|
popd
|
||||||
|
|
||||||
@ -32,6 +40,11 @@ tmp=(
|
|||||||
-DZLIB_LIBRARY=$libs/zlib/lib/libz.dll.a \
|
-DZLIB_LIBRARY=$libs/zlib/lib/libz.dll.a \
|
||||||
-DZLIB_INCLUDE_DIR=$libs/zlib/include
|
-DZLIB_INCLUDE_DIR=$libs/zlib/include
|
||||||
)
|
)
|
||||||
|
[ $with_sdl -eq 1 ] && tmp+=(
|
||||||
|
-DUSE_SDL2=ON
|
||||||
|
-DCMAKE_PREFIX_PATH=$libs/sdl2/lib/cmake
|
||||||
|
)
|
||||||
|
#[ $with_gl3 -eq 1 ] && tmp+=(-DENABLE_OPENGL=OFF -DENABLE_OPENGL3=ON)
|
||||||
|
|
||||||
cmake . "${tmp[@]}"
|
cmake . "${tmp[@]}"
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
@ -41,8 +54,9 @@ if [ "$1" = "package" ]; then
|
|||||||
# strip library
|
# strip library
|
||||||
"${CXX%-*}-strip" --strip-unneeded _install/usr/local/lib/*.dll
|
"${CXX%-*}-strip" --strip-unneeded _install/usr/local/lib/*.dll
|
||||||
# bundle the DLLs that are specific to Irrlicht (kind of a hack)
|
# bundle the DLLs that are specific to Irrlicht (kind of a hack)
|
||||||
cp -p $libs/*/bin/lib{jpeg,png}*.dll _install/usr/local/lib/
|
shopt -s nullglob
|
||||||
|
cp -p $libs/*/bin/{libjpeg,libpng,SDL}*.dll _install/usr/local/lib/
|
||||||
# create a ZIP
|
# create a ZIP
|
||||||
(cd _install/usr/local; zip -9r "$OLDPWD"/irrlicht-$variant.zip -- *)
|
(cd _install/usr/local; zip -9r "$OLDPWD/irrlicht-$variant$extras.zip" -- *)
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -2,10 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_ANDROID_ASSET_FILE_ARCHIVE_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_ANDROID_ASSET_FILE_ARCHIVE_H_INCLUDED__
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef _IRR_COMPILE_ANDROID_ASSET_READER_
|
#ifdef _IRR_COMPILE_ANDROID_ASSET_READER_
|
||||||
|
|
||||||
@ -65,5 +62,3 @@ namespace io
|
|||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif // _IRR_COMPILE_ANDROID_ASSET_READER_
|
#endif // _IRR_COMPILE_ANDROID_ASSET_READER_
|
||||||
#endif // __C_ANDROID_ASSET_READER_H_INCLUDED__
|
|
||||||
|
|
||||||
|
@ -2,10 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_ANDROID_ASSET_READER_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_ANDROID_ASSET_READER_H_INCLUDED__
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef _IRR_COMPILE_ANDROID_ASSET_READER_
|
#ifdef _IRR_COMPILE_ANDROID_ASSET_READER_
|
||||||
|
|
||||||
@ -70,5 +67,3 @@ namespace io
|
|||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif // _IRR_COMPILE_ANDROID_ASSET_READER_
|
#endif // _IRR_COMPILE_ANDROID_ASSET_READER_
|
||||||
#endif // __C_ANDROID_ASSET_READER_H_INCLUDED__
|
|
||||||
|
|
||||||
|
@ -535,11 +535,7 @@ void CIrrDeviceAndroid::createDriver()
|
|||||||
case video::EDT_NULL:
|
case video::EDT_NULL:
|
||||||
VideoDriver = video::createNullDriver(FileSystem, CreationParams.WindowSize);
|
VideoDriver = video::createNullDriver(FileSystem, CreationParams.WindowSize);
|
||||||
break;
|
break;
|
||||||
case video::EDT_SOFTWARE:
|
|
||||||
case video::EDT_BURNINGSVIDEO:
|
|
||||||
case video::EDT_OPENGL:
|
case video::EDT_OPENGL:
|
||||||
case video::DEPRECATED_EDT_DIRECT3D8_NO_LONGER_EXISTS:
|
|
||||||
case video::EDT_DIRECT3D9:
|
|
||||||
os::Printer::log("This driver is not available in Android. Try OpenGL ES 1.0 or ES 2.0.", ELL_ERROR);
|
os::Printer::log("This driver is not available in Android. Try OpenGL ES 1.0 or ES 2.0.", ELL_ERROR);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_IRR_DEVICE_ANDROID_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_IRR_DEVICE_ANDROID_H_INCLUDED__
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef _IRR_COMPILE_WITH_ANDROID_DEVICE_
|
#ifdef _IRR_COMPILE_WITH_ANDROID_DEVICE_
|
||||||
@ -100,4 +99,3 @@ namespace irr
|
|||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif // _IRR_COMPILE_WITH_ANDROID_DEVICE_
|
#endif // _IRR_COMPILE_WITH_ANDROID_DEVICE_
|
||||||
#endif // __C_IRR_DEVICE_ANDROID_H_INCLUDED__
|
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_IRR_KEY_EVENT_WRAPPER_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_IRR_KEY_EVENT_WRAPPER_H_INCLUDED__
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef _IRR_COMPILE_WITH_ANDROID_DEVICE_
|
#ifdef _IRR_COMPILE_WITH_ANDROID_DEVICE_
|
||||||
|
|
||||||
@ -39,4 +37,3 @@ private:
|
|||||||
} // namespace irr
|
} // namespace irr
|
||||||
|
|
||||||
#endif // _IRR_COMPILE_WITH_ANDROID_DEVICE_
|
#endif // _IRR_COMPILE_WITH_ANDROID_DEVICE_
|
||||||
#endif // __C_IRR_KEY_EVENT_WRAPPER_H_INCLUDED__
|
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __BUILD_IN_FONT_H_INCLUDED__
|
#pragma once
|
||||||
#define __BUILD_IN_FONT_H_INCLUDED__
|
|
||||||
|
|
||||||
|
|
||||||
// header file generated by Bin2H, copyright 2002 by N.Gebhardt.
|
// header file generated by Bin2H, copyright 2002 by N.Gebhardt.
|
||||||
// Bin2H is Freeware. Download it freely from www.code3d.com.
|
// Bin2H is Freeware. Download it freely from www.code3d.com.
|
||||||
@ -1055,5 +1053,3 @@ const u8 BuiltInFontData[] =
|
|||||||
const u32 BuiltInFontDataSize = sizeof(BuiltInFontData);
|
const u32 BuiltInFontDataSize = sizeof(BuiltInFontData);
|
||||||
} // end namespace gui
|
} // end namespace gui
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -274,36 +274,6 @@ void CAnimatedMeshSceneNode::render()
|
|||||||
|
|
||||||
driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);
|
driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);
|
||||||
|
|
||||||
// for debug purposes only:
|
|
||||||
|
|
||||||
bool renderMeshes = true;
|
|
||||||
video::SMaterial mat;
|
|
||||||
if (DebugDataVisible && PassCount==1)
|
|
||||||
{
|
|
||||||
// overwrite half transparency
|
|
||||||
if (DebugDataVisible & scene::EDS_HALF_TRANSPARENCY)
|
|
||||||
{
|
|
||||||
|
|
||||||
for (u32 i=0; i<m->getMeshBufferCount(); ++i)
|
|
||||||
{
|
|
||||||
scene::IMeshBuffer* mb = m->getMeshBuffer(i);
|
|
||||||
mat = ReadOnlyMaterials ? mb->getMaterial() : Materials[i];
|
|
||||||
mat.MaterialType = video::EMT_TRANSPARENT_ADD_COLOR;
|
|
||||||
if (RenderFromIdentity)
|
|
||||||
driver->setTransform(video::ETS_WORLD, core::IdentityMatrix );
|
|
||||||
else if (Mesh->getMeshType() == EAMT_SKINNED)
|
|
||||||
driver->setTransform(video::ETS_WORLD, AbsoluteTransformation * ((SSkinMeshBuffer*)mb)->Transformation);
|
|
||||||
|
|
||||||
driver->setMaterial(mat);
|
|
||||||
driver->drawMeshBuffer(mb);
|
|
||||||
}
|
|
||||||
renderMeshes = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// render original meshes
|
|
||||||
if (renderMeshes)
|
|
||||||
{
|
|
||||||
for (u32 i=0; i<m->getMeshBufferCount(); ++i)
|
for (u32 i=0; i<m->getMeshBufferCount(); ++i)
|
||||||
{
|
{
|
||||||
const bool transparent = driver->needsTransparentRenderPass(Materials[i]);
|
const bool transparent = driver->needsTransparentRenderPass(Materials[i]);
|
||||||
@ -323,7 +293,6 @@ void CAnimatedMeshSceneNode::render()
|
|||||||
driver->drawMeshBuffer(mb);
|
driver->drawMeshBuffer(mb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);
|
driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);
|
||||||
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IAnimatedMeshSceneNode.h"
|
#include "IAnimatedMeshSceneNode.h"
|
||||||
#include "IAnimatedMesh.h"
|
#include "IAnimatedMesh.h"
|
||||||
@ -180,6 +179,3 @@ namespace scene
|
|||||||
|
|
||||||
} // end namespace scene
|
} // end namespace scene
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_ATTRIBUTES_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_ATTRIBUTES_H_INCLUDED__
|
|
||||||
|
|
||||||
|
|
||||||
#include "IAttributes.h"
|
#include "IAttributes.h"
|
||||||
#include "IAttribute.h"
|
#include "IAttribute.h"
|
||||||
@ -148,5 +146,3 @@ protected:
|
|||||||
} // end namespace io
|
} // end namespace io
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -942,21 +942,10 @@ bool CB3DMeshFileLoader::readChunkBRUS()
|
|||||||
|
|
||||||
//Two textures:
|
//Two textures:
|
||||||
if (B3dMaterial.Textures[1])
|
if (B3dMaterial.Textures[1])
|
||||||
{
|
|
||||||
if (B3dMaterial.alpha==1.f)
|
|
||||||
{
|
|
||||||
if (B3dMaterial.Textures[1]->Blend == 5) //(Multiply 2)
|
|
||||||
B3dMaterial.Material.MaterialType = video::EMT_LIGHTMAP_M2;
|
|
||||||
else
|
|
||||||
B3dMaterial.Material.MaterialType = video::EMT_LIGHTMAP;
|
|
||||||
B3dMaterial.Material.Lighting = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
B3dMaterial.Material.MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA;
|
B3dMaterial.Material.MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA;
|
||||||
B3dMaterial.Material.ZWriteEnable = video::EZW_OFF;
|
B3dMaterial.Material.ZWriteEnable = video::EZW_OFF;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (B3dMaterial.Textures[0]) //One texture:
|
else if (B3dMaterial.Textures[0]) //One texture:
|
||||||
{
|
{
|
||||||
// Flags & 0x1 is usual SOLID, 0x8 is mipmap (handled before)
|
// Flags & 0x1 is usual SOLID, 0x8 is mipmap (handled before)
|
||||||
@ -967,10 +956,6 @@ bool CB3DMeshFileLoader::readChunkBRUS()
|
|||||||
}
|
}
|
||||||
else if (B3dMaterial.Textures[0]->Flags & 0x4) //(Masked)
|
else if (B3dMaterial.Textures[0]->Flags & 0x4) //(Masked)
|
||||||
B3dMaterial.Material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF; // TODO: create color key texture
|
B3dMaterial.Material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF; // TODO: create color key texture
|
||||||
else if (B3dMaterial.Textures[0]->Flags & 0x40)
|
|
||||||
B3dMaterial.Material.MaterialType = video::EMT_SPHERE_MAP;
|
|
||||||
else if (B3dMaterial.Textures[0]->Flags & 0x80)
|
|
||||||
B3dMaterial.Material.MaterialType = video::EMT_SPHERE_MAP; // TODO: Should be cube map
|
|
||||||
else if (B3dMaterial.alpha == 1.f)
|
else if (B3dMaterial.alpha == 1.f)
|
||||||
B3dMaterial.Material.MaterialType = video::EMT_SOLID;
|
B3dMaterial.Material.MaterialType = video::EMT_SOLID;
|
||||||
else
|
else
|
||||||
|
@ -7,8 +7,7 @@
|
|||||||
// declared public domain
|
// declared public domain
|
||||||
|
|
||||||
|
|
||||||
#ifndef __C_B3D_MESH_LOADER_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_B3D_MESH_LOADER_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IMeshLoader.h"
|
#include "IMeshLoader.h"
|
||||||
#include "ISceneManager.h"
|
#include "ISceneManager.h"
|
||||||
@ -82,6 +81,3 @@ private:
|
|||||||
|
|
||||||
} // end namespace scene
|
} // end namespace scene
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif // __C_B3D_MESH_LOADER_H_INCLUDED__
|
|
||||||
|
|
||||||
|
@ -4,8 +4,7 @@
|
|||||||
|
|
||||||
// Modified version with rigging/skinning support
|
// Modified version with rigging/skinning support
|
||||||
|
|
||||||
#ifndef __IRR_B3D_MESH_WRITER_H_INCLUDED__
|
#pragma once
|
||||||
#define __IRR_B3D_MESH_WRITER_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IMeshWriter.h"
|
#include "IMeshWriter.h"
|
||||||
#include "IWriteFile.h"
|
#include "IWriteFile.h"
|
||||||
@ -50,4 +49,3 @@ private:
|
|||||||
} // end namespace
|
} // end namespace
|
||||||
} // end namespace
|
} // end namespace
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_BILLBOARD_SCENE_NODE_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_BILLBOARD_SCENE_NODE_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IBillboardSceneNode.h"
|
#include "IBillboardSceneNode.h"
|
||||||
#include "SMeshBuffer.h"
|
#include "SMeshBuffer.h"
|
||||||
@ -116,5 +115,3 @@ private:
|
|||||||
} // end namespace scene
|
} // end namespace scene
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef _C_BLIT_H_INCLUDED_
|
#pragma once
|
||||||
#define _C_BLIT_H_INCLUDED_
|
|
||||||
|
|
||||||
#include "SoftwareDriver2_helper.h"
|
#include "SoftwareDriver2_helper.h"
|
||||||
|
|
||||||
@ -1058,6 +1057,3 @@ static s32 Blit(eBlitter operation,
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_BONE_SCENE_NODE_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_BONE_SCENE_NODE_H_INCLUDED__
|
|
||||||
|
|
||||||
// Used with SkinnedMesh and IAnimatedMeshSceneNode, for boned meshes
|
// Used with SkinnedMesh and IAnimatedMeshSceneNode, for boned meshes
|
||||||
|
|
||||||
@ -69,5 +68,3 @@ namespace scene
|
|||||||
} // end namespace scene
|
} // end namespace scene
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -19,8 +19,7 @@ CCameraSceneNode::CCameraSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 i
|
|||||||
: ICameraSceneNode(parent, mgr, id, position),
|
: ICameraSceneNode(parent, mgr, id, position),
|
||||||
BoundingBox(core::vector3df(0, 0, 0)), // Camera has no size. Still not sure if FLT_MAX might be the better variant
|
BoundingBox(core::vector3df(0, 0, 0)), // Camera has no size. Still not sure if FLT_MAX might be the better variant
|
||||||
Target(lookat), UpVector(0.0f, 1.0f, 0.0f), ZNear(1.0f), ZFar(3000.0f),
|
Target(lookat), UpVector(0.0f, 1.0f, 0.0f), ZNear(1.0f), ZFar(3000.0f),
|
||||||
InputReceiverEnabled(true), TargetAndRotationAreBound(false),
|
InputReceiverEnabled(true), TargetAndRotationAreBound(false)
|
||||||
HasD3DStyleProjectionMatrix(true)
|
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
setDebugName("CCameraSceneNode");
|
setDebugName("CCameraSceneNode");
|
||||||
@ -36,7 +35,6 @@ CCameraSceneNode::CCameraSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 i
|
|||||||
if ( d->getCurrentRenderTargetSize().Height )
|
if ( d->getCurrentRenderTargetSize().Height )
|
||||||
Aspect = (f32)d->getCurrentRenderTargetSize().Width /
|
Aspect = (f32)d->getCurrentRenderTargetSize().Width /
|
||||||
(f32)d->getCurrentRenderTargetSize().Height;
|
(f32)d->getCurrentRenderTargetSize().Height;
|
||||||
HasD3DStyleProjectionMatrix = d->getDriverType() != video::EDT_OPENGL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewArea.setFarNearDistance(ZFar - ZNear);
|
ViewArea.setFarNearDistance(ZFar - ZNear);
|
||||||
@ -223,7 +221,7 @@ void CCameraSceneNode::setFOV(f32 f)
|
|||||||
|
|
||||||
void CCameraSceneNode::recalculateProjectionMatrix()
|
void CCameraSceneNode::recalculateProjectionMatrix()
|
||||||
{
|
{
|
||||||
ViewArea.getTransform ( video::ETS_PROJECTION ).buildProjectionMatrixPerspectiveFovLH(Fovy, Aspect, ZNear, ZFar, HasD3DStyleProjectionMatrix);
|
ViewArea.getTransform ( video::ETS_PROJECTION ).buildProjectionMatrixPerspectiveFovLH(Fovy, Aspect, ZNear, ZFar, false);
|
||||||
IsOrthogonal = false;
|
IsOrthogonal = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -296,7 +294,7 @@ void CCameraSceneNode::recalculateViewArea()
|
|||||||
core::matrix4 m(core::matrix4::EM4CONST_NOTHING);
|
core::matrix4 m(core::matrix4::EM4CONST_NOTHING);
|
||||||
m.setbyproduct_nocheck(ViewArea.getTransform(video::ETS_PROJECTION),
|
m.setbyproduct_nocheck(ViewArea.getTransform(video::ETS_PROJECTION),
|
||||||
ViewArea.getTransform(video::ETS_VIEW));
|
ViewArea.getTransform(video::ETS_VIEW));
|
||||||
ViewArea.setFrom(m, HasD3DStyleProjectionMatrix);
|
ViewArea.setFrom(m, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_CAMERA_SCENE_NODE_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_CAMERA_SCENE_NODE_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "ICameraSceneNode.h"
|
#include "ICameraSceneNode.h"
|
||||||
#include "SViewFrustum.h"
|
#include "SViewFrustum.h"
|
||||||
@ -162,12 +161,7 @@ namespace scene
|
|||||||
|
|
||||||
bool InputReceiverEnabled;
|
bool InputReceiverEnabled;
|
||||||
bool TargetAndRotationAreBound;
|
bool TargetAndRotationAreBound;
|
||||||
|
|
||||||
bool HasD3DStyleProjectionMatrix; // true: projection from 0 to w; false: -w to w
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace
|
} // end namespace
|
||||||
} // end namespace
|
} // end namespace
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_COLOR_CONVERTER_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_COLOR_CONVERTER_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "irrTypes.h"
|
#include "irrTypes.h"
|
||||||
#include "IImage.h"
|
#include "IImage.h"
|
||||||
@ -97,5 +96,3 @@ public:
|
|||||||
} // end namespace video
|
} // end namespace video
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_DUMMY_TRANSFORMATION_SCENE_NODE_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_DUMMY_TRANSFORMATION_SCENE_NODE_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IDummyTransformationSceneNode.h"
|
#include "IDummyTransformationSceneNode.h"
|
||||||
|
|
||||||
@ -58,5 +57,3 @@ namespace scene
|
|||||||
} // end namespace scene
|
} // end namespace scene
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
#include "CEGLManager.h"
|
#include "CEGLManager.h"
|
||||||
|
|
||||||
#ifdef _IRR_COMPILE_WITH_EGL_MANAGER_
|
|
||||||
|
|
||||||
#include "irrString.h"
|
#include "irrString.h"
|
||||||
#include "irrArray.h"
|
#include "irrArray.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
@ -44,7 +42,7 @@ bool CEGLManager::initialize(const SIrrlichtCreationParameters& params, const SE
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Window is depend on platform.
|
// Window is depend on platform.
|
||||||
#if defined(_IRR_COMPILE_WITH_WINDOWS_DEVICE_)
|
#if defined(_IRR_WINDOWS_API_)
|
||||||
EglWindow = (NativeWindowType)Data.OpenGLWin32.HWnd;
|
EglWindow = (NativeWindowType)Data.OpenGLWin32.HWnd;
|
||||||
Data.OpenGLWin32.HDc = GetDC((HWND)EglWindow);
|
Data.OpenGLWin32.HDc = GetDC((HWND)EglWindow);
|
||||||
EglDisplay = eglGetDisplay((NativeDisplayType)Data.OpenGLWin32.HDc);
|
EglDisplay = eglGetDisplay((NativeDisplayType)Data.OpenGLWin32.HDc);
|
||||||
@ -99,7 +97,7 @@ void CEGLManager::terminate()
|
|||||||
EglDisplay = EGL_NO_DISPLAY;
|
EglDisplay = EGL_NO_DISPLAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(_IRR_COMPILE_WITH_WINDOWS_DEVICE_)
|
#if defined(_IRR_WINDOWS_API_)
|
||||||
if (Data.OpenGLWin32.HDc)
|
if (Data.OpenGLWin32.HDc)
|
||||||
{
|
{
|
||||||
ReleaseDC((HWND)EglWindow, (HDC)Data.OpenGLWin32.HDc);
|
ReleaseDC((HWND)EglWindow, (HDC)Data.OpenGLWin32.HDc);
|
||||||
@ -664,4 +662,3 @@ bool CEGLManager::testEGLError()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -2,11 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in Irrlicht.h
|
// For conditions of distribution and use, see copyright notice in Irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_EGL_MANAGER_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_EGL_MANAGER_H_INCLUDED__
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef _IRR_COMPILE_WITH_EGL_MANAGER_
|
|
||||||
|
|
||||||
#include <EGL/egl.h>
|
#include <EGL/egl.h>
|
||||||
|
|
||||||
@ -113,5 +109,3 @@ namespace video
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_EMPTY_SCENE_NODE_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_EMPTY_SCENE_NODE_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "ISceneNode.h"
|
#include "ISceneNode.h"
|
||||||
|
|
||||||
@ -41,6 +40,3 @@ namespace scene
|
|||||||
|
|
||||||
} // end namespace scene
|
} // end namespace scene
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_FPSCOUNTER_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_FPSCOUNTER_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "irrTypes.h"
|
#include "irrTypes.h"
|
||||||
|
|
||||||
@ -48,7 +47,3 @@ private:
|
|||||||
|
|
||||||
} // end namespace video
|
} // end namespace video
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_FILE_LIST_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_FILE_LIST_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IFileList.h"
|
#include "IFileList.h"
|
||||||
#include "irrString.h"
|
#include "irrString.h"
|
||||||
@ -132,7 +131,3 @@ protected:
|
|||||||
|
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
} // end namespace io
|
} // end namespace io
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_FILE_SYSTEM_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_FILE_SYSTEM_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IFileSystem.h"
|
#include "IFileSystem.h"
|
||||||
#include "irrArray.h"
|
#include "irrArray.h"
|
||||||
@ -140,6 +139,3 @@ private:
|
|||||||
|
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
} // end namespace io
|
} // end namespace io
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in Irrlicht.h
|
// For conditions of distribution and use, see copyright notice in Irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_GLX_MANAGER_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_GLX_MANAGER_H_INCLUDED__
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef _IRR_COMPILE_WITH_GLX_MANAGER_
|
#ifdef _IRR_COMPILE_WITH_GLX_MANAGER_
|
||||||
|
|
||||||
@ -76,6 +74,3 @@ namespace video
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_GUI_BUTTON_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_GUI_BUTTON_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IGUIButton.h"
|
#include "IGUIButton.h"
|
||||||
#include "IGUISpriteBank.h"
|
#include "IGUISpriteBank.h"
|
||||||
@ -240,5 +239,3 @@ namespace gui
|
|||||||
|
|
||||||
} // end namespace gui
|
} // end namespace gui
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif // __C_GUI_BUTTON_H_INCLUDED__
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_GUI_CHECKBOX_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_GUI_CHECKBOX_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IGUICheckBox.h"
|
#include "IGUICheckBox.h"
|
||||||
|
|
||||||
@ -56,5 +55,3 @@ namespace gui
|
|||||||
|
|
||||||
} // end namespace gui
|
} // end namespace gui
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif // __C_GUI_CHECKBOX_H_INCLUDED__
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_GUI_COMBO_BOX_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_GUI_COMBO_BOX_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IGUIComboBox.h"
|
#include "IGUIComboBox.h"
|
||||||
#include "IGUIStaticText.h"
|
#include "IGUIStaticText.h"
|
||||||
@ -103,5 +102,3 @@ namespace gui
|
|||||||
|
|
||||||
} // end namespace gui
|
} // end namespace gui
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif // __C_GUI_COMBO_BOX_H_INCLUDED__
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_GUI_EDIT_BOX_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_GUI_EDIT_BOX_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IGUIEditBox.h"
|
#include "IGUIEditBox.h"
|
||||||
#include "irrArray.h"
|
#include "irrArray.h"
|
||||||
@ -197,5 +196,3 @@ namespace gui
|
|||||||
|
|
||||||
} // end namespace gui
|
} // end namespace gui
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif // __C_GUI_EDIT_BOX_H_INCLUDED__
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_GUI_ENVIRONMENT_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_GUI_ENVIRONMENT_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IGUIEnvironment.h"
|
#include "IGUIEnvironment.h"
|
||||||
#include "IGUIElement.h"
|
#include "IGUIElement.h"
|
||||||
@ -227,5 +226,3 @@ private:
|
|||||||
|
|
||||||
} // end namespace gui
|
} // end namespace gui
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif // __C_GUI_ENVIRONMENT_H_INCLUDED__
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_GUI_FILE_OPEN_DIALOG_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_GUI_FILE_OPEN_DIALOG_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IGUIFileOpenDialog.h"
|
#include "IGUIFileOpenDialog.h"
|
||||||
#include "IGUIButton.h"
|
#include "IGUIButton.h"
|
||||||
@ -86,5 +85,3 @@ namespace gui
|
|||||||
|
|
||||||
} // end namespace gui
|
} // end namespace gui
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif // __C_GUI_FILE_OPEN_DIALOG_H_INCLUDED__
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_GUI_FONT_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_GUI_FONT_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IGUIFontBitmap.h"
|
#include "IGUIFontBitmap.h"
|
||||||
#include "irrString.h"
|
#include "irrString.h"
|
||||||
@ -107,5 +106,3 @@ private:
|
|||||||
|
|
||||||
} // end namespace gui
|
} // end namespace gui
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif // __C_GUI_FONT_H_INCLUDED__
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_GUI_IMAGE_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_GUI_IMAGE_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IGUIImage.h"
|
#include "IGUIImage.h"
|
||||||
|
|
||||||
@ -98,5 +97,3 @@ namespace gui
|
|||||||
|
|
||||||
} // end namespace gui
|
} // end namespace gui
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif // __C_GUI_IMAGE_H_INCLUDED__
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de
|
// written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de
|
||||||
|
|
||||||
#ifndef __C_GUI_IMAGE_LIST_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_GUI_IMAGE_LIST_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IGUIImageList.h"
|
#include "IGUIImageList.h"
|
||||||
#include "IVideoDriver.h"
|
#include "IVideoDriver.h"
|
||||||
@ -62,6 +61,3 @@ private:
|
|||||||
|
|
||||||
} // end namespace gui
|
} // end namespace gui
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_GUI_LIST_BOX_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_GUI_LIST_BOX_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IGUIListBox.h"
|
#include "IGUIListBox.h"
|
||||||
#include "irrArray.h"
|
#include "irrArray.h"
|
||||||
@ -174,5 +173,3 @@ namespace gui
|
|||||||
|
|
||||||
} // end namespace gui
|
} // end namespace gui
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_GUI_SCROLL_BAR_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_GUI_SCROLL_BAR_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IGUIScrollBar.h"
|
#include "IGUIScrollBar.h"
|
||||||
#include "IGUIButton.h"
|
#include "IGUIButton.h"
|
||||||
@ -97,5 +96,3 @@ namespace gui
|
|||||||
|
|
||||||
} // end namespace gui
|
} // end namespace gui
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_GUI_SKIN_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_GUI_SKIN_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IGUISkin.h"
|
#include "IGUISkin.h"
|
||||||
#include "irrString.h"
|
#include "irrString.h"
|
||||||
@ -230,5 +229,3 @@ namespace gui
|
|||||||
|
|
||||||
} // end namespace gui
|
} // end namespace gui
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_GUI_SPRITE_BANK_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_GUI_SPRITE_BANK_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IGUISpriteBank.h"
|
#include "IGUISpriteBank.h"
|
||||||
|
|
||||||
@ -83,5 +82,3 @@ protected:
|
|||||||
|
|
||||||
} // end namespace gui
|
} // end namespace gui
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif // __C_GUI_SPRITE_BANK_H_INCLUDED__
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_GUI_STATIC_TEXT_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_GUI_STATIC_TEXT_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IGUIStaticText.h"
|
#include "IGUIStaticText.h"
|
||||||
#include "irrArray.h"
|
#include "irrArray.h"
|
||||||
@ -132,5 +131,3 @@ namespace gui
|
|||||||
|
|
||||||
} // end namespace gui
|
} // end namespace gui
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_GUI_TAB_CONTROL_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_GUI_TAB_CONTROL_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IGUITabControl.h"
|
#include "IGUITabControl.h"
|
||||||
#include "irrArray.h"
|
#include "irrArray.h"
|
||||||
@ -180,5 +179,3 @@ namespace gui
|
|||||||
|
|
||||||
} // end namespace gui
|
} // end namespace gui
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_IMAGE_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_IMAGE_H_INCLUDED__
|
|
||||||
|
|
||||||
#include "IImage.h"
|
#include "IImage.h"
|
||||||
#include "rect.h"
|
#include "rect.h"
|
||||||
@ -74,7 +73,3 @@ private:
|
|||||||
|
|
||||||
} // end namespace video
|
} // end namespace video
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_IMAGE_LOADER_BMP_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_IMAGE_LOADER_BMP_H_INCLUDED__
|
|
||||||
|
|
||||||
|
|
||||||
#include "IImageLoader.h"
|
#include "IImageLoader.h"
|
||||||
|
|
||||||
@ -85,5 +83,3 @@ private:
|
|||||||
|
|
||||||
} // end namespace video
|
} // end namespace video
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_IMAGE_LOADER_JPG_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_IMAGE_LOADER_JPG_H_INCLUDED__
|
|
||||||
|
|
||||||
|
|
||||||
#include "IImageLoader.h"
|
#include "IImageLoader.h"
|
||||||
|
|
||||||
@ -91,6 +89,3 @@ private:
|
|||||||
|
|
||||||
} // end namespace video
|
} // end namespace video
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -6,9 +6,7 @@
|
|||||||
// i wanted to be able to read in PNG images with irrlicht :)
|
// i wanted to be able to read in PNG images with irrlicht :)
|
||||||
// why? lossless compression with 8-bit alpha channel!
|
// why? lossless compression with 8-bit alpha channel!
|
||||||
|
|
||||||
#ifndef __C_IMAGE_LOADER_PNG_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_IMAGE_LOADER_PNG_H_INCLUDED__
|
|
||||||
|
|
||||||
|
|
||||||
#include "IImageLoader.h"
|
#include "IImageLoader.h"
|
||||||
|
|
||||||
@ -36,5 +34,3 @@ public:
|
|||||||
|
|
||||||
} // end namespace video
|
} // end namespace video
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef __C_IMAGE_LOADER_TGA_H_INCLUDED__
|
#pragma once
|
||||||
#define __C_IMAGE_LOADER_TGA_H_INCLUDED__
|
|
||||||
|
|
||||||
|
|
||||||
#include "IImageLoader.h"
|
#include "IImageLoader.h"
|
||||||
|
|
||||||
@ -68,5 +66,3 @@ private:
|
|||||||
|
|
||||||
} // end namespace video
|
} // end namespace video
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef _C_IMAGE_WRITER_JPG_H_INCLUDED__
|
#pragma once
|
||||||
#define _C_IMAGE_WRITER_JPG_H_INCLUDED__
|
|
||||||
|
|
||||||
|
|
||||||
#include "IImageWriter.h"
|
#include "IImageWriter.h"
|
||||||
|
|
||||||
@ -28,5 +26,3 @@ public:
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _C_IMAGE_WRITER_JPG_H_INCLUDED__
|
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#ifndef _C_IMAGE_WRITER_PNG_H_INCLUDED__
|
#pragma once
|
||||||
#define _C_IMAGE_WRITER_PNG_H_INCLUDED__
|
|
||||||
|
|
||||||
|
|
||||||
#include "IImageWriter.h"
|
#include "IImageWriter.h"
|
||||||
|
|
||||||
@ -28,5 +26,3 @@ public:
|
|||||||
|
|
||||||
} // namespace video
|
} // namespace video
|
||||||
} // namespace irr
|
} // namespace irr
|
||||||
|
|
||||||
#endif // _C_IMAGE_WRITER_PNG_H_INCLUDED__
|
|
||||||
|
@ -332,7 +332,7 @@ void CIrrDeviceLinux::setupTopLevelXorgWindow()
|
|||||||
|
|
||||||
Atom NET_WM_PID = XInternAtom(XDisplay, "_NET_WM_PID", false);
|
Atom NET_WM_PID = XInternAtom(XDisplay, "_NET_WM_PID", false);
|
||||||
|
|
||||||
pid_t pid = getpid();
|
long pid = static_cast<long>(getpid());
|
||||||
|
|
||||||
XChangeProperty(XDisplay, XWindow, NET_WM_PID,
|
XChangeProperty(XDisplay, XWindow, NET_WM_PID,
|
||||||
XA_CARDINAL, 32, PropModeReplace,
|
XA_CARDINAL, 32, PropModeReplace,
|
||||||
@ -633,11 +633,6 @@ void CIrrDeviceLinux::createDriver()
|
|||||||
os::Printer::log("No WebGL1 support compiled in.", ELL_ERROR);
|
os::Printer::log("No WebGL1 support compiled in.", ELL_ERROR);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case video::DEPRECATED_EDT_DIRECT3D8_NO_LONGER_EXISTS:
|
|
||||||
case video::EDT_DIRECT3D9:
|
|
||||||
os::Printer::log("This driver is not available in Linux. Try OpenGL or Software renderer.",
|
|
||||||
ELL_ERROR);
|
|
||||||
break;
|
|
||||||
case video::EDT_NULL:
|
case video::EDT_NULL:
|
||||||
VideoDriver = video::createNullDriver(FileSystem, CreationParams.WindowSize);
|
VideoDriver = video::createNullDriver(FileSystem, CreationParams.WindowSize);
|
||||||
break;
|
break;
|
||||||
@ -1485,7 +1480,7 @@ void CIrrDeviceLinux::createKeyMap()
|
|||||||
KeyMap.push_back(SKeyMap(XK_Next, KEY_NEXT));
|
KeyMap.push_back(SKeyMap(XK_Next, KEY_NEXT));
|
||||||
KeyMap.push_back(SKeyMap(XK_Page_Down, KEY_NEXT));
|
KeyMap.push_back(SKeyMap(XK_Page_Down, KEY_NEXT));
|
||||||
KeyMap.push_back(SKeyMap(XK_End, KEY_END));
|
KeyMap.push_back(SKeyMap(XK_End, KEY_END));
|
||||||
KeyMap.push_back(SKeyMap(XK_Begin, KEY_HOME));
|
KeyMap.push_back(SKeyMap(XK_Begin, KEY_NUMPAD5));
|
||||||
KeyMap.push_back(SKeyMap(XK_Num_Lock, KEY_NUMLOCK));
|
KeyMap.push_back(SKeyMap(XK_Num_Lock, KEY_NUMLOCK));
|
||||||
KeyMap.push_back(SKeyMap(XK_KP_Space, KEY_SPACE));
|
KeyMap.push_back(SKeyMap(XK_KP_Space, KEY_SPACE));
|
||||||
KeyMap.push_back(SKeyMap(XK_KP_Tab, KEY_TAB));
|
KeyMap.push_back(SKeyMap(XK_KP_Tab, KEY_TAB));
|
||||||
@ -1505,7 +1500,7 @@ void CIrrDeviceLinux::createKeyMap()
|
|||||||
KeyMap.push_back(SKeyMap(XK_KP_Next, KEY_NEXT));
|
KeyMap.push_back(SKeyMap(XK_KP_Next, KEY_NEXT));
|
||||||
KeyMap.push_back(SKeyMap(XK_KP_Page_Down, KEY_NEXT));
|
KeyMap.push_back(SKeyMap(XK_KP_Page_Down, KEY_NEXT));
|
||||||
KeyMap.push_back(SKeyMap(XK_KP_End, KEY_END));
|
KeyMap.push_back(SKeyMap(XK_KP_End, KEY_END));
|
||||||
KeyMap.push_back(SKeyMap(XK_KP_Begin, KEY_HOME));
|
KeyMap.push_back(SKeyMap(XK_KP_Begin, KEY_NUMPAD5));
|
||||||
KeyMap.push_back(SKeyMap(XK_KP_Insert, KEY_INSERT));
|
KeyMap.push_back(SKeyMap(XK_KP_Insert, KEY_INSERT));
|
||||||
KeyMap.push_back(SKeyMap(XK_KP_Delete, KEY_DELETE));
|
KeyMap.push_back(SKeyMap(XK_KP_Delete, KEY_DELETE));
|
||||||
KeyMap.push_back(SKeyMap(XK_KP_Equal, 0)); // ???
|
KeyMap.push_back(SKeyMap(XK_KP_Equal, 0)); // ???
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user