Commit Graph

1240 Commits (e3d6a907ffc252d9e30f1d5c3ae3905065491c7c)

Author SHA1 Message Date
cutealien e3d6a907ff Merge revisions r5570 through r5596 from trunk to ogl-es
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5597 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-12-31 20:48:18 +00:00
cutealien 68480aacc7 ECF_D16 is only available in WebGL with WEBGL_depth_texture extension.
Add some more debug output to opengl texture in debug when things go wrong.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5573 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-11-07 22:19:39 +00:00
cutealien 12323e4115 Merge revisions r5568 from trunk to ogl-es
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5569 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-11-06 14:40:56 +00:00
cutealien 87db86ddfd Merge revisions r5554 through r5566 from trunk to ogl-es
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5567 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-11-06 14:27:34 +00:00
cutealien 56317e5278 Get 24bit/32bit rendertarget textures working in WebGL.
WEBGL_depth_texture doesn't use same symbols as OES_packed_depth_stencil & OES_depth32 and also does not allow attaching depth and stencil buffers to RTT like other GL versions.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5557 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-10-30 16:08:23 +00:00
cutealien 54ba627a72 Separate es2 and WebGL extension handlers. Should allow to get RTT's with depht buffers > 16bit to work.
While names of WebGL extensions are 90% identical to ES2, at some point the WebGL committee seems to have decided 
that it's better to give new names to the same stuff (RTT's with depth-buffer for example, but I'm sure they had a good reason?).
So we have to split this and now have mostly independent extension handlers. Still - WebGLDriver is lazy and derives from 
ES2Driver and that derives from ES2ExtensionHandler... so unfortunately WebGL driver has now 2 extension handlers.
The way it's solved for now is that extension strings are handled by the webgl extension handler and everything else
stays for now with the ES2ExtensionHandler. Maybe we can split/merge stuff later in a better way, but I see no easy to implement improvement.
Could be we could pass extension handlers as template paramter to drivers maybe, but that's just an idea for now.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5556 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-10-27 16:48:00 +00:00
cutealien 87546d90ad To stay in Irrlicht style add 'virtual' qualifiers in derived classes.
Also improve some code comments.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5555 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-10-26 18:51:02 +00:00
cutealien 66530e3941 Add another way to select a context in CEGLManager.
Emscripten can't use eglChooseConfig so far (it won't return best context, but just any), 
so we have to work with eglGetConfigs instead and figure out the best egl context.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5554 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-10-25 17:37:07 +00:00
cutealien 3d19965f91 Merge revisions r5549 through r5552 from trunk to ogl-es.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5553 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-10-25 12:48:36 +00:00
cutealien 70363e0819 Evaluate more device creation parameters in emscripten.
We can now use hardware antialiasing in emscripten.
Print some info about used SDL flags to log.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5551 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-10-23 22:03:18 +00:00
cutealien c376454941 Use SDL_FLAGS variable also in emscripten and ensure it always uses SDL_OPENGL.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5550 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-10-23 21:24:50 +00:00
cutealien cac82280ee Update emscripten example Makefile.
Using c++11 for emscripten.
Some minor link fixes.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5549 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-10-23 21:18:14 +00:00
cutealien 3a1a4a78ea Merge revisions r5540 through r5547 from trunk to ogl-es
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5548 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-10-23 20:23:20 +00:00
cutealien 44b211800b Add some more log messages for android app commands.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5543 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-09-24 19:36:33 +00:00
cutealien 65e41da94b Remove some warnings.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5541 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-08-30 13:28:36 +00:00
cutealien b5d46535e7 Remove warnings in ES1 and ES2 getColorFormatParameters functions as was done in OpenGL before.
(warnings are now produced instead of places calling those functions).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5540 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-08-30 13:27:27 +00:00
cutealien 7bd44b9733 Merge revisions r5532 through r5538 from trunk to ogl-es-
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5539 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-08-30 13:20:12 +00:00
cutealien 5450247e6b Merge revisions r5525 through r5530 from trunk to ogl-es
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5531 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-08-24 14:11:29 +00:00
cutealien c20dc5cc6f Add support for ECF_A16B16G16R16F and ECF_A32B32G32R32F color formats for es2.
Use emscripten headers now for es2 when compiling with emscripten (instead of our own extension headers).
Try enabling es2 extensions for emscripten (compiles, but not yet tested)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5527 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-08-23 14:56:35 +00:00
cutealien e4b8e7210f Fix compiling es2 driver on platforms without GL_EXT_texture_rg.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5526 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-08-23 13:03:36 +00:00
cutealien 62ac2fd2e1 Implement queryTextureFormat for es1 and es2 drivers.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5525 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-08-21 14:34:56 +00:00
cutealien f184d58cfe Merge revisions r5520 through r5523 from trunk to ogl-es.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5524 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-08-21 13:57:06 +00:00
cutealien 33bfe098e7 Add support for more formats on ES2 (with extensions): ECF_R8, ECF_R8G8, ECF_R16F, ECF_G16R16F
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5522 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-08-18 14:50:10 +00:00
cutealien 20418b3126 Unify GLES extension handling.
Update ES extensions (first 290 now recognized)
Get examples 2 to compile in c::b (most other examples still need to fix linker settings)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5521 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-08-18 13:28:20 +00:00
cutealien 0a5bbcde85 Update ext headers for es1 and es2 with newest versions from khronos.
Remove eglext.h as it's not used anywhere in Irrlicht so far.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5520 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-08-17 20:44:56 +00:00
cutealien 246293a570 Merge revisions r5516 through r5518 from trunk to ogl-es.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5519 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-08-16 12:06:39 +00:00
cutealien e54b5aa198 Fix some problems with keyboard input on emscripten. Most special or control characters no longer cause white-space in editbox, but are now used correctly.
Some keys (like AltGr) are still somewhat trouble. 
This is basically a workaround because SDL_event.key.keysym.unicode is deprecated on emscripten and returns different results than SDL on other platforms.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5516 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-08-07 18:22:24 +00:00
cutealien 53a1d9f724 Merge revisions r5503 through r5514 from trunk to ogl-es
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5515 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-08-07 17:30:46 +00:00
cutealien 237111814f Fix compiling SDL without emscripten.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5513 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-08-07 14:18:16 +00:00
cutealien 32cef51975 Removing our newline when logging on emscripten as emscripten_log seems to add it's own newline.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5512 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-07-29 12:35:22 +00:00
cutealien 5bccd00a00 Link example 01 also to libs necessary for OGL ES1&2.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5511 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-07-22 14:52:11 +00:00
cutealien 397a27fbc9 Remove superfluos call to emscripten_set_canvas_size when handling sdl_resize.
This should be the other way round - sdl resize event gets triggered when emscripten_set_canvas_size is called.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5510 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-07-20 15:39:42 +00:00
cutealien 3304309867 Bugfix: Inform videodriver about new size when created by getting size from canvas (on emscripten).
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5509 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-07-20 13:21:05 +00:00
cutealien 7f190b80cd Add the code in emscripten hello_worldd which was missing in last 2 check-ins (sorry).
- Add a function to check for canvas resizes 
- Switch to WebGL1 driver


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5508 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-07-19 13:05:25 +00:00
cutealien 60d2798d9d Add some function which allows to check for canvas size changes in emscripten.
But not yet working well together with emscripten default html template (also not worse than before).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5507 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-07-18 18:42:50 +00:00
cutealien 6705452474 Switch to using WebGL1 driver by default for emscripten (better optimized).
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5506 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-07-18 18:27:19 +00:00
cutealien 854cdd5573 Rever accidentally checked-in changes for SDL_Flags (was not tested yet and not yet working).
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5505 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-07-18 18:24:31 +00:00
cutealien bad05c903d Can now use canvas size in emscripten by passing 0,0 for width/height in createDevice.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5504 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-07-18 17:55:46 +00:00
cutealien 2117249df1 Break up long log messages on Android as they are cut otherwise.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5503 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-07-16 14:55:14 +00:00
cutealien 80718d0e60 Merge revisions r5484 through r5501 from trunk to ogl-es
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5502 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-07-16 14:30:26 +00:00
cutealien 4637ba2281 Add RTT example 13 for emscripten.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5498 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-07-05 12:34:45 +00:00
cutealien a3d31d7a48 Make internalFormat and pixelFormat identical in ES 2 driver.
Noticed some driver bugs in emscripten when using ECF_D16 which were not identical and 
it seems that since ES 2.0 those values have to match. Specification is slightly fuzzy 
on the term (says "match", not "identical" or "equal"), but found no other interpretation online.
If I understand it correctly this also means in ES 2 we have no guarantee which format is really used internally.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5493 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-07-03 17:00:23 +00:00
cutealien 380d186d3f Rolled back to r5490. Was likely a misunderstanding
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5492 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-07-03 16:37:29 +00:00
cutealien 3a2a0eede9 Remove getZBufferBits from ogl-es drivers.
It's never used. Also if I guess the intended use for it correctly (figuring out internFormat to use for depth-buffer textures)
then there will be a problem with that implementation as it only works for OpenGL that way (maybe also ES1.0, not sure there, but for ES2.0 it looks wrong).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5491 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-07-03 16:08:44 +00:00
cutealien ff7a1c154f Merge revisions r5476 through r5483 from trunk to ogl-es-
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5484 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-06-11 18:34:38 +00:00
cutealien e316100012 Fix spelling in comment.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5479 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-06-09 12:26:16 +00:00
cutealien 61ef6f9c7d Rename target in HelloWorld_emscripten so it doesn't overwrite (or clean) the other hello-world.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5478 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-06-08 20:26:18 +00:00
cutealien 7766187be4 Use new zbuffer-test (which was already in OpenGL) in OGL-ES1 and OGL-ES2 drivers.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5477 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-06-08 13:11:46 +00:00
cutealien 56e72da4a7 Merge revisions r5455:r5474 from trunk to ogl-es
Add color-mask fixes to ogles2 and webgl drivers.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5475 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-06-07 15:20:59 +00:00
cutealien c3ed02c8d0 setRenderStates3DMode in ES1 and ES2 now use setBlendFunc with (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) instead of (GL_ONE, GL_ONE_MINUS_SRC_COLOR).
This prevents color blending with background when we only want alpha blending (when EBO_ADD is set in materials).
It's something that was changed a few years ago in the OpenGL driver, but never made it into the ES drivers.
Note that transparency in ES1 _is_ currently broken - but it was broken before this patch already (so another bug to hunt).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5473 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-06-07 10:21:30 +00:00