diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/iphone/rasterizer_iphone.cpp | 18 | ||||
-rw-r--r-- | platform/iphone/rasterizer_iphone.h | 2 | ||||
-rw-r--r-- | platform/osx/export/export.cpp | 2 | ||||
-rw-r--r-- | platform/osx/os_osx.mm | 2 | ||||
-rw-r--r-- | platform/osx/platform_config.h | 2 | ||||
-rw-r--r-- | platform/server/os_server.cpp | 10 | ||||
-rw-r--r-- | platform/server/os_server.h | 2 | ||||
-rw-r--r-- | platform/windows/os_windows.cpp | 4 | ||||
-rw-r--r-- | platform/windows/platform_config.h | 1 | ||||
-rw-r--r-- | platform/x11/context_gl_x11.cpp | 1 | ||||
-rw-r--r-- | platform/x11/detect.py | 6 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 19 | ||||
-rw-r--r-- | platform/x11/os_x11.h | 4 | ||||
-rw-r--r-- | platform/x11/platform_config.h | 1 |
14 files changed, 41 insertions, 33 deletions
diff --git a/platform/iphone/rasterizer_iphone.cpp b/platform/iphone/rasterizer_iphone.cpp index 99e83343d0..5478569a42 100644 --- a/platform/iphone/rasterizer_iphone.cpp +++ b/platform/iphone/rasterizer_iphone.cpp @@ -134,21 +134,21 @@ static Image _get_gl_image_and_format(const Image& p_image, Image::Format p_form switch(p_format) { - case Image::FORMAT_GRAYSCALE: { + case Image::FORMAT_L8: { r_gl_components=1; r_gl_format=GL_LUMINANCE; } break; case Image::FORMAT_INTENSITY: { - image.convert(Image::FORMAT_RGBA); + image.convert(Image::FORMAT_RGBA8); r_gl_components=4; r_gl_format=GL_RGBA; r_has_alpha_cache=true; } break; - case Image::FORMAT_GRAYSCALE_ALPHA: { + case Image::FORMAT_LA8: { - image.convert(Image::FORMAT_RGBA); + image.convert(Image::FORMAT_RGBA8); r_gl_components=4; r_gl_format=GL_RGBA; r_has_alpha_cache=true; @@ -156,7 +156,7 @@ static Image _get_gl_image_and_format(const Image& p_image, Image::Format p_form case Image::FORMAT_INDEXED: { - image.convert(Image::FORMAT_RGB); + image.convert(Image::FORMAT_RGB8); r_gl_components=3; r_gl_format=GL_RGB; @@ -164,17 +164,17 @@ static Image _get_gl_image_and_format(const Image& p_image, Image::Format p_form case Image::FORMAT_INDEXED_ALPHA: { - image.convert(Image::FORMAT_RGBA); + image.convert(Image::FORMAT_RGBA8); r_gl_components=4; r_gl_format=GL_RGB; r_has_alpha_cache=true; } break; - case Image::FORMAT_RGB: { + case Image::FORMAT_RGB8: { r_gl_components=3; r_gl_format=GL_RGB; } break; - case Image::FORMAT_RGBA: { + case Image::FORMAT_RGBA8: { r_gl_components=4; r_gl_format=GL_RGBA; @@ -344,7 +344,7 @@ Image::Format RasterizerIPhone::texture_get_format(RID p_texture) const { Texture * texture = texture_owner.get(p_texture); - ERR_FAIL_COND_V(!texture,Image::FORMAT_GRAYSCALE); + ERR_FAIL_COND_V(!texture,Image::FORMAT_L8); return texture->format; } diff --git a/platform/iphone/rasterizer_iphone.h b/platform/iphone/rasterizer_iphone.h index add656b190..fcbb339ab3 100644 --- a/platform/iphone/rasterizer_iphone.h +++ b/platform/iphone/rasterizer_iphone.h @@ -74,7 +74,7 @@ class RasterizerIPhone : public Rasterizer { flags=width=height=0; tex_id=0; - format=Image::FORMAT_GRAYSCALE; + format=Image::FORMAT_L8; gl_components_cache=0; format_has_alpha=false; has_alpha=false; diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp index 30f4c58150..c55bf0eadb 100644 --- a/platform/osx/export/export.cpp +++ b/platform/osx/export/export.cpp @@ -207,7 +207,7 @@ void EditorExportPlatformOSX::_make_icon(const Image& p_icon,Vector<uint8_t>& ic while(size>=16) { Image copy = p_icon; - copy.convert(Image::FORMAT_RGBA); + copy.convert(Image::FORMAT_RGBA8); copy.resize(size,size); it->create_from_image(copy); String path = EditorSettings::get_singleton()->get_settings_path()+"/tmp/icon.png"; diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index cc893cc7a0..5a5ddccd60 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -1313,7 +1313,7 @@ void OS_OSX::set_window_title(const String& p_title) { void OS_OSX::set_icon(const Image& p_icon) { Image img=p_icon; - img.convert(Image::FORMAT_RGBA); + img.convert(Image::FORMAT_RGBA8); NSBitmapImageRep *imgrep= [[[NSBitmapImageRep alloc] initWithBitmapDataPlanes: NULL pixelsWide: p_icon.get_width() pixelsHigh: p_icon.get_height() diff --git a/platform/osx/platform_config.h b/platform/osx/platform_config.h index 86505206ae..dc04e9b4f1 100644 --- a/platform/osx/platform_config.h +++ b/platform/osx/platform_config.h @@ -27,5 +27,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include <alloca.h> + #define GLES2_INCLUDE_H "gl_context/GL/glew.h" +#define GLES3_INCLUDE_H "gl_context/GL/glew.h" #define PTHREAD_RENAME_SELF diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp index 5404980ff3..cb00fdaac8 100644 --- a/platform/server/os_server.cpp +++ b/platform/server/os_server.cpp @@ -26,8 +26,8 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "servers/visual/visual_server_raster.h" -#include "servers/visual/rasterizer_dummy.h" +//#include "servers/visual/visual_server_raster.h" +//#include "servers/visual/rasterizer_dummy.h" #include "os_server.h" #include <stdio.h> #include <stdlib.h> @@ -57,9 +57,9 @@ void OS_Server::initialize(const VideoMode& p_desired,int p_video_driver,int p_a current_videomode=p_desired; main_loop=NULL; - rasterizer = memnew( RasterizerDummy ); + //rasterizer = memnew( RasterizerDummy ); - visual_server = memnew( VisualServerRaster(rasterizer) ); + //visual_server = memnew( VisualServerRaster(rasterizer) ); AudioDriverManagerSW::get_driver(p_audio_driver)->set_singleton(); @@ -114,7 +114,7 @@ void OS_Server::finalize() { visual_server->finish(); memdelete(visual_server); - memdelete(rasterizer); + //memdelete(rasterizer); physics_server->finish(); memdelete(physics_server); diff --git a/platform/server/os_server.h b/platform/server/os_server.h index 2081d5f2f4..ed5111d831 100644 --- a/platform/server/os_server.h +++ b/platform/server/os_server.h @@ -51,7 +51,7 @@ class OS_Server : public OS_Unix { - Rasterizer *rasterizer; +// Rasterizer *rasterizer; VisualServer *visual_server; VideoMode current_videomode; List<String> args; diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 35d90a8308..1af7cb2a49 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -2081,8 +2081,8 @@ void OS_Windows::set_icon(const Image& p_icon) { Image icon=p_icon; - if (icon.get_format()!=Image::FORMAT_RGBA) - icon.convert(Image::FORMAT_RGBA); + if (icon.get_format()!=Image::FORMAT_RGBA8) + icon.convert(Image::FORMAT_RGBA8); int w = icon.get_width(); int h = icon.get_height(); diff --git a/platform/windows/platform_config.h b/platform/windows/platform_config.h index 9e20750816..296a778ac8 100644 --- a/platform/windows/platform_config.h +++ b/platform/windows/platform_config.h @@ -31,5 +31,6 @@ //#include <alloca.h> //#endif #define GLES2_INCLUDE_H "gl_context/GL/glew.h" +#define GLES3_INCLUDE_H "gl_context/GL/glew.h" diff --git a/platform/x11/context_gl_x11.cpp b/platform/x11/context_gl_x11.cpp index cd325dfc99..ccf7a801ef 100644 --- a/platform/x11/context_gl_x11.cpp +++ b/platform/x11/context_gl_x11.cpp @@ -140,6 +140,7 @@ Error ContextGL_X11::initialize() { static int context_attribs[] = { GLX_CONTEXT_MAJOR_VERSION_ARB, 3, GLX_CONTEXT_MINOR_VERSION_ARB, 0, + GLX_CONTEXT_FLAGS_ARB, GLX_CONTEXT_DEBUG_BIT_ARB, None }; diff --git a/platform/x11/detect.py b/platform/x11/detect.py index ba232f6d4e..6e3a8af676 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -198,9 +198,9 @@ def configure(env): import methods - env.Append( BUILDERS = { 'GLSL120' : env.Builder(action = methods.build_legacygl_headers, suffix = 'glsl.h',src_suffix = '.glsl') } ) - env.Append( BUILDERS = { 'GLSL' : env.Builder(action = methods.build_glsl_headers, suffix = 'glsl.h',src_suffix = '.glsl') } ) - env.Append( BUILDERS = { 'GLSL120GLES' : env.Builder(action = methods.build_gles2_headers, suffix = 'glsl.h',src_suffix = '.glsl') } ) + #env.Append( BUILDERS = { 'GLSL120' : env.Builder(action = methods.build_legacygl_headers, suffix = 'glsl.h',src_suffix = '.glsl') } ) + #env.Append( BUILDERS = { 'GLSL' : env.Builder(action = methods.build_glsl_headers, suffix = 'glsl.h',src_suffix = '.glsl') } ) + #env.Append( BUILDERS = { 'GLSL120GLES' : env.Builder(action = methods.build_gles2_headers, suffix = 'glsl.h',src_suffix = '.glsl') } ) #env.Append( BUILDERS = { 'HLSL9' : env.Builder(action = methods.build_hlsl_dx9_headers, suffix = 'hlsl.h',src_suffix = '.hlsl') } ) if (env["use_static_cpp"]=="yes"): diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 5f1ab5b4aa..d2d6e88c4b 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -27,7 +27,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "servers/visual/visual_server_raster.h" -#include "drivers/gles2/rasterizer_gles2.h" +#include "drivers/gles3/rasterizer_gles3.h" #include "os_x11.h" #include "key_mapping_x11.h" #include <stdio.h> @@ -74,7 +74,7 @@ int OS_X11::get_video_driver_count() const { } const char * OS_X11::get_video_driver_name(int p_driver) const { - return "GLES2"; + return "GLES3"; } OS::VideoMode OS_X11::get_default_video_mode() const { @@ -203,19 +203,22 @@ void OS_X11::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi //print_line("def videomode "+itos(current_videomode.width)+","+itos(current_videomode.height)); #if defined(OPENGL_ENABLED) || defined(LEGACYGL_ENABLED) + context_gl = memnew( ContextGL_X11( x11_display, x11_window,current_videomode, false ) ); context_gl->initialize(); - rasterizer = memnew( RasterizerGLES2 ); + RasterizerGLES3::register_config(); -#endif - visual_server = memnew( VisualServerRaster(rasterizer) ); + RasterizerGLES3::make_current(); +#endif + visual_server = memnew( VisualServerRaster ); +#if 0 if (get_render_thread_mode()!=RENDER_THREAD_UNSAFE) { visual_server =memnew(VisualServerWrapMT(visual_server,get_render_thread_mode()==RENDER_SEPARATE_THREAD)); } - +#endif // borderless fullscreen window mode if (current_videomode.fullscreen) { // needed for lxde/openbox, possibly others @@ -487,7 +490,7 @@ void OS_X11::finalize() { visual_server->finish(); memdelete(visual_server); - memdelete(rasterizer); + //memdelete(rasterizer); physics_server->finish(); memdelete(physics_server); @@ -1878,7 +1881,7 @@ void OS_X11::set_icon(const Image& p_icon) { if (!p_icon.empty()) { Image img=p_icon; - img.convert(Image::FORMAT_RGBA); + img.convert(Image::FORMAT_RGBA8); int w = img.get_width(); int h = img.get_height(); diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h index b27f71406a..b351309d80 100644 --- a/platform/x11/os_x11.h +++ b/platform/x11/os_x11.h @@ -34,7 +34,7 @@ #include "drivers/unix/os_unix.h" #include "context_gl_x11.h" #include "servers/visual_server.h" -#include "servers/visual/visual_server_wrap_mt.h" +//#include "servers/visual/visual_server_wrap_mt.h" #include "servers/visual/rasterizer.h" #include "servers/physics_server.h" #include "servers/audio/audio_server_sw.h" @@ -99,7 +99,7 @@ class OS_X11 : public OS_Unix { #if defined(OPENGL_ENABLED) || defined(LEGACYGL_ENABLED) ContextGL_X11 *context_gl; #endif - Rasterizer *rasterizer; + //Rasterizer *rasterizer; VisualServer *visual_server; VideoMode current_videomode; List<String> args; diff --git a/platform/x11/platform_config.h b/platform/x11/platform_config.h index 3b47b2c92d..1873e712ec 100644 --- a/platform/x11/platform_config.h +++ b/platform/x11/platform_config.h @@ -35,5 +35,6 @@ #endif #define GLES2_INCLUDE_H "gl_context/GL/glew.h" +#define GLES3_INCLUDE_H "gl_context/GL/glew.h" |