02:06 < Nick___> hello tee ppl ! 02:08 < Nick___> anyone here! 02:08 < yemDX`> me 02:08 < Nick___> ooh good 02:09 < yemDX`> how are u 02:09 < Nick___> good and u? 02:11 < Nick___> have to go bb 4 now 02:11 < yemDX`> bye 11:00 < Naruto-Man> hi tee ppl 11:00 < EastBite> hi Naruto-Man 11:00 < Naruto-Man> what mod do u like more EastBite 17:11 < KingteEGER> Hey is there aleready an issue on github for the sometimes buggy physics? 1. http://youtu.be/mZXZc9Ho2JQ 0:04 look at the two red player "Arcanios" and "m80116" 2. The same Bug wich manny players use un DDRace but thistime in Vanilla http://youtu.be/l34ijNuZTwg 17:11 < Nimda3> [YouTube] Title: [Show]Teeworlds physics | Rating: 5.00/5.00 | Views: 36 20:59 < heinrich5991> I'd like to try to outsource text rendering to a library in TW 21:00 <@minus> do eeet, fgt 21:01 < heinrich5991> my first attempt would be to send the actual string through the graphic 'pipeline' 21:02 < heinrich5991> and render it in the backend 21:02 < heinrich5991> that means 21:03 < heinrich5991> requesting text width -> text interface -> library 21:03 < heinrich5991> drawing text -> text interface -> graphics pipeline -> library rendering -> putting it onto the screen 21:03 < heinrich5991> (which are the two functions the text interface currently exposes) 21:05 < heinrich5991> matricks: does that sound sane? 22:13 <@matricks> heinrich5991: why are you doing all this? 22:16 <@matricks> heinrich5991: sound like you might just wanna replace parts of the text interface 22:22 < heinrich5991> matricks: I'm doing this because I want to try to get better text rendering into tw 22:22 < heinrich5991> or what do you mean by 'all this'? 22:26 < heinrich5991> replacing parts of the text interface – do you mean I should change the interface? 22:27 <@matricks> noo, just the internals 22:27 <@matricks> you shouldnt let a library draw dirwctly to the backbuffer 22:28 <@matricks> do you wanna render a complete phrase to a texture and render or? 22:29 < heinrich5991> I wanna render a complete line using the library 22:29 <@matricks> so, render to a line to a texture and cache it then 22:30 < heinrich5991> but the lines weren't cached before either 22:30 <@matricks> no, but the glyphs are 22:30 < heinrich5991> I guess the library does that too 22:31 < heinrich5991> I at least have to create a cache (?) object 22:31 <@matricks> so if you are going to pass a complete line to a library you need to cache complete lines 22:32 <@matricks> does thlibrary know about opengl? 22:32 < heinrich5991> no 22:32 <@matricks> then it doesn't cache it on the level that is needed 22:33 <@matricks> you wanna get better kerning or? 22:33 < heinrich5991> I wanna get RTL stuff 22:33 <@matricks> >_< 22:35 < heinrich5991> I knew you were gonna do this :D 22:35 <@matricks> render it normally and flip the screen as a last pass 22:37 <@matricks> and now you think i'm joking, but im not :) 22:37 < heinrich5991> you were not >_ I stand by qhen i say that trnaslations was the worat thing I ever done 22:39 <@matricks> (on mobile so spelling is a bit off) 22:41 < heinrich5991> yes, I know that you think that 22:41 < heinrich5991> I don't think that the RTL stuff is that easy though 22:42 < heinrich5991> fun starts when one starts mixing non-RTL and RTL stuff 22:42 < heinrich5991> which is why I'd like to rely on that lib for rendering 22:42 <@matricks> >_< 22:43 <@matricks> the textinterface need to be redone for it 22:43 <@matricks> I dont know about the alignment rules for it either 22:47 < heinrich5991> why does the text interface need a redo for this? it already gets passed a box (which is most of the time correct, but can be fixed) 22:48 <@matricks> to make line caching work I think it might be needed 22:49 < heinrich5991> so, you say one needs caching on opengl level? 22:50 <@matricks> yah 22:51 <@matricks> otherwise there will be a lot of data transfers to the gpu from cpu 22:52 < heinrich5991> okay 23:24 < heinrich5991> matricks: do you think it should rather be 'text interface -> library -> render to texture, cache -> graphic pipeline -> render to screen' or with 'text interface -> graphic pipeline -> library -> render to texture, cache -> render to screen' 23:25 < heinrich5991> the latter case would need a mutex for the library unfortunately 23:25 <@matricks> graphics should be last 23:26 <@matricks> it;s the one that does the quad rendering 23:26 <@matricks> text interface should take care of caching 23:27 < heinrich5991> how does the graphic stuff ensure that the following situation can't happen: 23:28 < heinrich5991> command "render texture A" to pipeline – unload texture A – "render texture A" is executed for the next frame? 23:28 < heinrich5991> e.g. when disconnecting 23:28 <@matricks> the one that does the rendering shouldn't do that 23:29 < heinrich5991> ok, that might be hard though, as you don't know when the final render of texture A happens 23:29 <@matricks> ? 23:31 < heinrich5991> suppose we're sending the command to render a tile to the screen 23:31 < heinrich5991> then the user clicks disconnect 23:31 < heinrich5991> now I'm assuming that we instantly unload the map's textures 23:32 <@matricks> might be, dunno actually 23:32 < heinrich5991> what happens if the graphic rendering hasn't rendered the tile yet? 23:32 <@matricks> disconnect etc should be latched and happen at a beginning of a frame 23:32 <@matricks> wait... doesn;t matter 23:33 <@matricks> everything is queued to the render thread 23:33 <@matricks> including deletes 23:33 <@matricks> so everything is sequenced 23:33 <@matricks> it will render the tiles, then delete the texture etc etc 23:33 < heinrich5991> ah ok 23:34 <@matricks> only the render thread is allowed to make gl calls 23:35 < heinrich5991> ok, that's a clear separation 23:35 <@matricks> yup 23:35 < heinrich5991> do you know off the head how the textures are passed from the main thread to the gl thread? 23:35 < heinrich5991> (i.e. how is it ensured that the data lives long enough) 23:35 <@matricks> by a buffer on the heap 23:35 <@matricks> and the render thread deletes it 23:36 < heinrich5991> ok that works 23:36 <@matricks> I think :P 23:37 <@matricks> https://github.com/teeworlds/teeworlds/blob/master/src/engine/client/graphics_threaded.h 23:37 <@matricks> all the commands are listed there 23:38 <@matricks> line 210, texture create 23:47 < heinrich5991> matricks: is it viable to do this one allocation per different text line rendered? 23:49 <@matricks> heinrich5991: dunno 23:49 <@matricks> might trash the gpu mem 23:49 <@matricks> dunno how much data it will be