mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-11-21 16:37:20 +01:00
Fix #if *_ENABLED
inconsistencies, should check if defined
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
This commit is contained in:
parent
57c4c9455a
commit
0f099eca32
@ -44,10 +44,10 @@ def make_default_controller_mappings(target, source, env):
|
||||
platform_mappings[current_platform][guid] = line
|
||||
|
||||
platform_variables = {
|
||||
"Linux": "#if X11_ENABLED",
|
||||
"Linux": "#ifdef X11_ENABLED",
|
||||
"Windows": "#ifdef WINDOWS_ENABLED",
|
||||
"Mac OS X": "#ifdef OSX_ENABLED",
|
||||
"Android": "#if defined(__ANDROID__)",
|
||||
"Android": "#ifdef ANDROID_ENABLED",
|
||||
"iOS": "#ifdef IPHONE_ENABLED",
|
||||
"Javascript": "#ifdef JAVASCRIPT_ENABLED",
|
||||
"UWP": "#ifdef UWP_ENABLED",
|
||||
|
@ -121,6 +121,6 @@ public:
|
||||
~AudioDriverCoreAudio();
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // COREAUDIO_ENABLED
|
||||
|
||||
#endif
|
||||
|
@ -2761,7 +2761,7 @@ void RasterizerSceneGLES2::_post_process(Environment3D *env, const Projection &p
|
||||
|
||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
|
||||
#elif IPHONE_ENABLED
|
||||
#elif defined(IPHONE_ENABLED)
|
||||
|
||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, storage->frame.current_rt->multisample_fbo);
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, next_buffer);
|
||||
@ -2769,7 +2769,7 @@ void RasterizerSceneGLES2::_post_process(Environment3D *env, const Projection &p
|
||||
|
||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
|
||||
#elif ANDROID_ENABLED
|
||||
#elif defined(ANDROID_ENABLED)
|
||||
|
||||
// In GLES2 Android Blit is not available, so just copy color texture manually
|
||||
_copy_texture_to_buffer(storage->frame.current_rt->multisample_color, next_buffer);
|
||||
@ -3438,7 +3438,7 @@ void RasterizerSceneGLES2::render_scene(const Transform &p_cam_transform, const
|
||||
|
||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
|
||||
#elif IPHONE_ENABLED
|
||||
#elif defined(IPHONE_ENABLED)
|
||||
|
||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, storage->frame.current_rt->multisample_fbo);
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, storage->frame.current_rt->fbo);
|
||||
@ -3446,7 +3446,7 @@ void RasterizerSceneGLES2::render_scene(const Transform &p_cam_transform, const
|
||||
|
||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
|
||||
#elif ANDROID_ENABLED
|
||||
#elif defined(ANDROID_ENABLED)
|
||||
|
||||
// In GLES2 AndroidBlit is not available, so just copy color texture manually
|
||||
_copy_texture_to_buffer(storage->frame.current_rt->multisample_color, storage->frame.current_rt->fbo);
|
||||
|
@ -4887,7 +4887,7 @@ void RasterizerStorageGLES2::_render_target_allocate(RenderTarget *rt) {
|
||||
glRenderbufferStorageMultisample(GL_RENDERBUFFER, msaa, color_internal_format, rt->width, rt->height);
|
||||
|
||||
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, rt->multisample_color);
|
||||
#elif ANDROID_ENABLED
|
||||
#elif defined(ANDROID_ENABLED)
|
||||
// Render to a texture in android
|
||||
glGenTextures(1, &rt->multisample_color);
|
||||
glBindTexture(GL_TEXTURE_2D, rt->multisample_color);
|
||||
@ -5291,7 +5291,7 @@ void RasterizerStorageGLES2::render_target_set_external_texture(RID p_render_tar
|
||||
t->alloc_width = rt->height;
|
||||
|
||||
// Switch our texture on our frame buffer
|
||||
#if ANDROID_ENABLED
|
||||
#ifdef ANDROID_ENABLED
|
||||
if (rt->msaa >= RS::VIEWPORT_MSAA_EXT_2X && rt->msaa <= RS::VIEWPORT_MSAA_EXT_4X) {
|
||||
// This code only applies to the Oculus Go and Oculus Quest. Due to the the tiled nature
|
||||
// of the GPU we can do a single render pass by rendering directly into our texture chains
|
||||
@ -6017,7 +6017,7 @@ void RasterizerStorageGLES2::initialize() {
|
||||
//void *gles2_lib = dlopen(NULL, RTLD_LAZY);
|
||||
//glRenderbufferStorageMultisampleAPPLE = dlsym(gles2_lib, "glRenderbufferStorageMultisampleAPPLE");
|
||||
//glResolveMultisampleFramebufferAPPLE = dlsym(gles2_lib, "glResolveMultisampleFramebufferAPPLE");
|
||||
#elif ANDROID_ENABLED
|
||||
#elif defined(ANDROID_ENABLED)
|
||||
|
||||
void *gles2_lib = dlopen("libGLESv2.so", RTLD_LAZY);
|
||||
glRenderbufferStorageMultisampleEXT = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC)dlsym(gles2_lib, "glRenderbufferStorageMultisampleEXT");
|
||||
|
Loading…
Reference in New Issue
Block a user