diff options
author | Germano Cavalcante <mano-wii> | 2021-05-14 17:15:00 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-05-14 18:26:40 +0300 |
commit | 48fa029dd11bb09d4aca8e0a420781e3ec07a3a2 (patch) | |
tree | 7ea87a8fb24dc7201fb1a2a52a681973a9c0d46e /source/blender/gpu/intern/gpu_platform_private.hh | |
parent | 3f4f109646059ee0780bb40dbd65b3bc8c3a8f3f (diff) |
Python GPU: New 'platform' module
This module exposes the platform utils defined in the GPU module in C.
This will be useful for porting existing code with `bgl` to `gpu`.
Reviewed By: fclem, brecht, campbellbarton
Maniphest Tasks: T80730
Part of D11147
Diffstat (limited to 'source/blender/gpu/intern/gpu_platform_private.hh')
-rw-r--r-- | source/blender/gpu/intern/gpu_platform_private.hh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/gpu/intern/gpu_platform_private.hh b/source/blender/gpu/intern/gpu_platform_private.hh index 02d99efa4a9..f823269ab54 100644 --- a/source/blender/gpu/intern/gpu_platform_private.hh +++ b/source/blender/gpu/intern/gpu_platform_private.hh @@ -34,16 +34,20 @@ class GPUPlatformGlobal { eGPUOSType os; eGPUDriverType driver; eGPUSupportLevel support_level; + char *vendor = nullptr; + char *renderer = nullptr; + char *version = nullptr; char *support_key = nullptr; char *gpu_name = nullptr; public: - void create_key(eGPUSupportLevel support_level, - const char *vendor, - const char *renderer, - const char *version); - - void create_gpu_name(const char *vendor, const char *renderer, const char *version); + void init(eGPUDeviceType gpu_device, + eGPUOSType os_type, + eGPUDriverType driver_type, + eGPUSupportLevel gpu_support_level, + const char *vendor_str, + const char *renderer_str, + const char *version_str); void clear(void); }; |