2011-02-21 06:58:46 +00:00
|
|
|
/*
|
2011-11-29 10:54:47 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
2011-11-29 10:54:47 +00:00
|
|
|
* of the License, or (at your option) any later version.
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
*
|
2011-11-29 10:54:47 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2011-11-29 10:54:47 +00:00
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2005 Blender Foundation.
|
|
|
|
* All rights reserved.
|
|
|
|
*/
|
|
|
|
|
2019-02-06 15:42:22 +11:00
|
|
|
/** \file \ingroup gpu
|
2011-02-21 06:58:46 +00:00
|
|
|
*/
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#ifndef __GPU_EXTENSIONS_H__
|
|
|
|
#define __GPU_EXTENSIONS_H__
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2010-01-31 23:45:51 +00:00
|
|
|
/* GPU extensions support */
|
|
|
|
|
2015-03-16 22:57:56 -04:00
|
|
|
int GPU_max_texture_size(void);
|
2018-07-27 14:15:45 +02:00
|
|
|
int GPU_max_texture_layers(void);
|
2015-12-06 21:20:19 +01:00
|
|
|
int GPU_max_textures(void);
|
2018-09-18 14:22:42 +02:00
|
|
|
int GPU_max_textures_vert(void);
|
|
|
|
int GPU_max_textures_geom(void);
|
|
|
|
int GPU_max_textures_frag(void);
|
2016-01-07 11:21:08 -05:00
|
|
|
float GPU_max_texture_anisotropy(void);
|
2015-12-06 21:20:19 +01:00
|
|
|
int GPU_max_color_texture_samples(void);
|
World textures displaying for viewport in BI.
This patch supports "Image or Movie" and "Environment map" types of world texture for the viewport.
It supports:
- "View", "AngMap" and "Equirectangular" types of mapping.
- Different types of texture blending (according to BI world render).
- Same color blending as when it lacked textures (but render via glsl).
{F207734}
{F207735}
Example: {F275180}
Original author: @valentin_b4w
Regards,
Alexander (Blend4Web Team).
Reviewers: sergey, valentin_b4w, brecht, merwin
Reviewed By: merwin
Subscribers: campbellbarton, merwin, blueprintrandom, youle, a.romanov, yurikovelenov, AlexKowel, Evgeny_Rodygin
Projects: #rendering, #opengl_gfx, #bf_blender:_next
Differential Revision: https://developer.blender.org/D1414
2016-01-27 12:06:57 +03:00
|
|
|
int GPU_max_cube_map_size(void);
|
2017-02-07 11:20:15 +01:00
|
|
|
int GPU_max_ubo_binds(void);
|
|
|
|
int GPU_max_ubo_size(void);
|
2018-11-02 14:58:49 +01:00
|
|
|
float GPU_max_line_width(void);
|
2010-07-04 12:24:19 +00:00
|
|
|
int GPU_color_depth(void);
|
2015-03-30 14:14:32 +02:00
|
|
|
void GPU_get_dfdy_factors(float fac[2]);
|
2018-10-22 12:58:11 +02:00
|
|
|
bool GPU_mip_render_workaround(void);
|
2018-10-25 21:57:40 +02:00
|
|
|
bool GPU_depth_blitting_workaround(void);
|
2018-12-04 20:29:30 +01:00
|
|
|
bool GPU_unused_fb_slot_workaround(void);
|
2015-03-16 22:57:56 -04:00
|
|
|
|
2015-04-24 14:11:05 +02:00
|
|
|
bool GPU_mem_stats_supported(void);
|
|
|
|
void GPU_mem_stats_get(int *totalmem, int *freemem);
|
|
|
|
|
2011-12-15 13:58:09 +00:00
|
|
|
void GPU_code_generate_glsl_lib(void);
|
2013-04-12 17:56:07 +00:00
|
|
|
|
2010-01-31 23:45:51 +00:00
|
|
|
/* GPU Types */
|
|
|
|
|
2019-01-23 14:15:43 +11:00
|
|
|
typedef enum eGPUDeviceType {
|
2016-01-10 07:12:10 +11:00
|
|
|
GPU_DEVICE_NVIDIA = (1 << 0),
|
|
|
|
GPU_DEVICE_ATI = (1 << 1),
|
|
|
|
GPU_DEVICE_INTEL = (1 << 2),
|
2018-12-02 01:57:22 +01:00
|
|
|
GPU_DEVICE_INTEL_UHD = (1 << 3),
|
|
|
|
GPU_DEVICE_SOFTWARE = (1 << 4),
|
|
|
|
GPU_DEVICE_UNKNOWN = (1 << 5),
|
2019-01-15 23:57:49 +11:00
|
|
|
GPU_DEVICE_ANY = (0xff),
|
2019-01-23 14:15:43 +11:00
|
|
|
} eGPUDeviceType;
|
2010-01-31 23:45:51 +00:00
|
|
|
|
2019-01-23 14:15:43 +11:00
|
|
|
typedef enum eGPUOSType {
|
2016-01-10 07:12:10 +11:00
|
|
|
GPU_OS_WIN = (1 << 8),
|
|
|
|
GPU_OS_MAC = (1 << 9),
|
|
|
|
GPU_OS_UNIX = (1 << 10),
|
2019-01-15 23:57:49 +11:00
|
|
|
GPU_OS_ANY = (0xff00),
|
2019-01-23 14:15:43 +11:00
|
|
|
} eGPUOSType;
|
2010-01-31 23:45:51 +00:00
|
|
|
|
2019-01-23 14:15:43 +11:00
|
|
|
typedef enum eGPUDriverType {
|
2016-01-10 07:12:10 +11:00
|
|
|
GPU_DRIVER_OFFICIAL = (1 << 16),
|
|
|
|
GPU_DRIVER_OPENSOURCE = (1 << 17),
|
|
|
|
GPU_DRIVER_SOFTWARE = (1 << 18),
|
2019-01-15 23:57:49 +11:00
|
|
|
GPU_DRIVER_ANY = (0xff0000),
|
2019-01-23 14:15:43 +11:00
|
|
|
} eGPUDriverType;
|
2010-01-31 23:45:51 +00:00
|
|
|
|
2019-01-23 14:15:43 +11:00
|
|
|
bool GPU_type_matches(eGPUDeviceType device, eGPUOSType os, eGPUDriverType driver);
|
2010-01-31 23:45:51 +00:00
|
|
|
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2013-04-16 05:46:17 +00:00
|
|
|
#endif /* __GPU_EXTENSIONS_H__ */
|