Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_capabilities.cc
| Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
| /** \name Capabilities | /** \name Capabilities | ||||
| * \{ */ | * \{ */ | ||||
| int GPU_max_texture_size(void) | int GPU_max_texture_size(void) | ||||
| { | { | ||||
| return GCaps.max_texture_size; | return GCaps.max_texture_size; | ||||
| } | } | ||||
| int GPU_texture_size_with_limit(int res) | int GPU_texture_size_with_limit(int res, bool limit_gl_texture_size) | ||||
| { | { | ||||
| int size = GPU_max_texture_size(); | int size = GPU_max_texture_size(); | ||||
| int reslimit = (U.glreslimit != 0) ? min_ii(U.glreslimit, size) : size; | int reslimit = (limit_gl_texture_size && (U.glreslimit != 0)) ? min_ii(U.glreslimit, size) : | ||||
| size; | |||||
| return min_ii(reslimit, res); | return min_ii(reslimit, res); | ||||
| } | } | ||||
| int GPU_max_texture_layers(void) | int GPU_max_texture_layers(void) | ||||
| { | { | ||||
| return GCaps.max_texture_layers; | return GCaps.max_texture_layers; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines | |||||