summaryrefslogtreecommitdiff
path: root/drivers/gles2/rasterizer_storage_gles2.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles2/rasterizer_storage_gles2.h')
-rw-r--r--drivers/gles2/rasterizer_storage_gles2.h47
1 files changed, 44 insertions, 3 deletions
diff --git a/drivers/gles2/rasterizer_storage_gles2.h b/drivers/gles2/rasterizer_storage_gles2.h
index ed21238db6..d6130849fb 100644
--- a/drivers/gles2/rasterizer_storage_gles2.h
+++ b/drivers/gles2/rasterizer_storage_gles2.h
@@ -31,7 +31,7 @@
#ifndef RASTERIZERSTORAGEGLES2_H
#define RASTERIZERSTORAGEGLES2_H
-#include "core/dvector.h"
+#include "core/pool_vector.h"
#include "core/self_list.h"
#include "servers/visual/rasterizer.h"
#include "servers/visual/shader_language.h"
@@ -72,16 +72,29 @@ public:
bool float_texture_supported;
bool s3tc_supported;
bool etc1_supported;
+ bool pvrtc_supported;
+ bool rgtc_supported;
+ bool bptc_supported;
bool keep_original_textures;
bool force_vertex_shading;
bool use_rgba_2d_shadows;
+ bool use_rgba_3d_shadows;
bool support_32_bits_indices;
bool support_write_depth;
bool support_half_float_vertices;
+ bool support_npot_repeat_mipmap;
+ bool support_depth_texture;
+ bool support_depth_cubemaps;
+
+ bool support_shadow_cubemaps;
+
+ GLuint depth_internalformat;
+ GLuint depth_type;
+
} config;
struct Resources {
@@ -91,6 +104,9 @@ public:
GLuint normal_tex;
GLuint aniso_tex;
+ GLuint mipmap_blur_fbo;
+ GLuint mipmap_blur_color;
+
GLuint radical_inverse_vdc_cache_tex;
bool use_rgba_2d_shadows;
@@ -240,6 +256,8 @@ public:
int mipmaps;
+ bool resize_to_po2;
+
bool active;
GLenum tex_id;
@@ -275,6 +293,7 @@ public:
ignore_mipmaps(false),
compressed(false),
mipmaps(0),
+ resize_to_po2(false),
active(false),
tex_id(0),
stored_cube_sides(0),
@@ -313,7 +332,7 @@ public:
mutable RID_Owner<Texture> texture_owner;
- Ref<Image> _get_gl_image_and_format(const Ref<Image> &p_image, Image::Format p_format, uint32_t p_flags, Image::Format &r_real_format, GLenum &r_gl_format, GLenum &r_gl_internal_format, GLenum &r_gl_type, bool &r_compressed) const;
+ Ref<Image> _get_gl_image_and_format(const Ref<Image> &p_image, Image::Format p_format, uint32_t p_flags, Image::Format &r_real_format, GLenum &r_gl_format, GLenum &r_gl_internal_format, GLenum &r_gl_type, bool &r_compressed, bool p_will_need_resize) const;
virtual RID texture_create();
virtual void texture_allocate(RID p_texture, int p_width, int p_height, int p_depth_3d, Image::Format p_format, VS::TextureType p_type, uint32_t p_flags = VS::TEXTURE_FLAGS_DEFAULT);
@@ -342,6 +361,7 @@ public:
virtual void textures_keep_original(bool p_enable);
virtual void texture_set_proxy(RID p_texture, RID p_proxy);
+ virtual Size2 texture_size_with_proxy(RID p_texture) const;
virtual void texture_set_detect_3d_callback(RID p_texture, VisualServer::TextureDetectCallback p_callback, void *p_userdata);
virtual void texture_set_detect_srgb_callback(RID p_texture, VisualServer::TextureDetectCallback p_callback, void *p_userdata);
@@ -618,6 +638,7 @@ public:
PoolVector<uint8_t> data;
PoolVector<uint8_t> index_data;
+ Vector<PoolVector<uint8_t> > blend_shape_data;
int total_data_size;
@@ -844,12 +865,16 @@ public:
Set<RasterizerScene::InstanceBase *> instances;
Transform2D base_transform_2d;
+ Transform world_transform;
+ Transform world_transform_inverse;
+ bool use_world_transform;
Skeleton() :
use_2d(false),
size(0),
tex_id(0),
- update_list(this) {
+ update_list(this),
+ use_world_transform(false) {
}
};
@@ -867,6 +892,7 @@ public:
virtual void skeleton_bone_set_transform_2d(RID p_skeleton, int p_bone, const Transform2D &p_transform);
virtual Transform2D skeleton_bone_get_transform_2d(RID p_skeleton, int p_bone) const;
virtual void skeleton_set_base_transform_2d(RID p_skeleton, const Transform2D &p_base_transform);
+ virtual void skeleton_set_world_transform(RID p_skeleton, bool p_enable, const Transform &p_world_transform);
void _update_skeleton_transform_buffer(const PoolVector<float> &p_data, size_t p_size);
@@ -884,6 +910,7 @@ public:
bool shadow;
bool negative;
bool reverse_cull;
+ bool use_gi;
uint32_t cull_mask;
@@ -910,6 +937,7 @@ public:
virtual void light_set_negative(RID p_light, bool p_enable);
virtual void light_set_cull_mask(RID p_light, uint32_t p_mask);
virtual void light_set_reverse_cull_face_mode(RID p_light, bool p_enabled);
+ virtual void light_set_use_gi(RID p_light, bool p_enabled);
virtual void light_omni_set_shadow_mode(RID p_light, VS::LightOmniShadowMode p_mode);
virtual void light_omni_set_shadow_detail(RID p_light, VS::LightOmniShadowDetail p_detail);
@@ -929,6 +957,7 @@ public:
virtual VS::LightType light_get_type(RID p_light) const;
virtual float light_get_param(RID p_light, VS::LightParam p_param);
virtual Color light_get_color(RID p_light);
+ virtual bool light_get_use_gi(RID p_light);
virtual AABB light_get_aabb(RID p_light) const;
virtual uint64_t light_get_version(RID p_light) const;
@@ -1130,6 +1159,16 @@ public:
Effect copy_screen_effect;
+ struct External {
+ GLuint fbo;
+ GLuint color;
+ RID texture;
+
+ External() :
+ fbo(0) {
+ }
+ } external;
+
int width, height;
bool flags[RENDER_TARGET_FLAG_MAX];
@@ -1150,6 +1189,7 @@ public:
for (int i = 0; i < RENDER_TARGET_FLAG_MAX; ++i) {
flags[i] = false;
}
+ external.fbo = 0;
}
};
@@ -1161,6 +1201,7 @@ public:
virtual RID render_target_create();
virtual void render_target_set_size(RID p_render_target, int p_width, int p_height);
virtual RID render_target_get_texture(RID p_render_target) const;
+ virtual void render_target_set_external_texture(RID p_render_target, unsigned int p_texture_id);
virtual void render_target_set_flag(RID p_render_target, RenderTargetFlags p_flag, bool p_value);
virtual bool render_target_was_used(RID p_render_target);