Switch to DuckDuckGo Search
   July 3, 2017  
< | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | >

bottom
[00:47:04] *** roxlu_ <roxlu_!~textual@217.104.68.196.ip.onderwijs.casematelecom.nl> has quit IRC (Quit: My Mac has gone to sleep. ZZZzzz…)
[01:08:20] *** intrigus <intrigus!uid114902@gateway/web/irccloud.com/x-nsmttodryptgaiwx> has joined #lwjgl
[02:14:57] *** NegativeZero <NegativeZero!~quassel@121-79-248-31.sta.inspire.net.nz> has joined #lwjgl
[04:09:44] *** alyphen <alyphen!alyphen@znc.seventh-root.com> has quit IRC (Ping timeout: 255 seconds)
[04:15:30] *** alyphen <alyphen!~alyphen@znc.seventh-root.com> has joined #lwjgl
[04:30:35] *** intrigus <intrigus!uid114902@gateway/web/irccloud.com/x-nsmttodryptgaiwx> has quit IRC (Quit: Connection closed for inactivity)
[08:46:58] *** MatthiasM <MatthiasM!~MatthiasM@unaffiliated/matthiasm> has quit IRC (Ping timeout: 276 seconds)
[09:00:35] *** EmrisM <EmrisM!~Miranda@195.234.58.25> has joined #lwjgl
[10:39:45] *** roxlu_ <roxlu_!~textual@217.104.68.196.ip.onderwijs.casematelecom.nl> has joined #lwjgl
[10:42:07] *** roxlu_ <roxlu_!~textual@217.104.68.196.ip.onderwijs.casematelecom.nl> has quit IRC (Client Quit)
[12:06:49] *** X-Ray-Jin <X-Ray-Jin!~X-Ray-Jin@dslb-092-076-022-169.092.076.pools.vodafone-ip.de> has joined #lwjgl
[12:14:24] *** X-Ray-Jin <X-Ray-Jin!~X-Ray-Jin@dslb-092-076-022-169.092.076.pools.vodafone-ip.de> has quit IRC (Ping timeout: 260 seconds)
[13:06:44] *** justJanne <justJanne!~justJanne@2001:bc8:33e7:200::1> has quit IRC (Quit: No Ping reply in 300 seconds.)
[13:08:03] *** justJanne <justJanne!~justJanne@lithium.kuschku.de> has joined #lwjgl
[13:32:02] *** NegativeZero <NegativeZero!~quassel@121-79-248-31.sta.inspire.net.nz> has quit IRC (Remote host closed the connection)
[14:24:49] *** intrigus <intrigus!uid114902@gateway/web/irccloud.com/x-fswbqaofxefyqqom> has joined #lwjgl
[16:39:30] *** Unimatrix325 <Unimatrix325!~Unimatrix@router-kraduha-nat-l.pilsfree.net> has joined #lwjgl
[18:51:00] *** EmrisM <EmrisM!~Miranda@195.234.58.25> has quit IRC (Read error: Connection reset by peer)
[18:51:31] *** Robert_Zenz <Robert_Zenz!~Robert_Ze@213-47-230-151.cable.dynamic.surfer.at> has joined #lwjgl
[20:23:44] *** MatthiasM <MatthiasM!~MatthiasM@unaffiliated/matthiasm> has joined #lwjgl
[20:56:07] *** Robert_Zenz <Robert_Zenz!~Robert_Ze@213-47-230-151.cable.dynamic.surfer.at> has quit IRC (Ping timeout: 246 seconds)
[21:09:51] *** Robert_Zenz <Robert_Zenz!~Robert_Ze@213-47-230-151.cable.dynamic.surfer.at> has joined #lwjgl
[23:01:37] *** Flaghacker <Flaghacker!~Flaghac@ptr-907ch74fuklzykepy9m.18120a2.ip6.access.telenet.be> has joined #lwjgl
[23:06:48] <Flaghacker> I'm trying to load an image in LWJGL, but I get an error (out of heap memory) when I try to use MemoryStack to allocate the buffer. This is the code that loads the texture: https://gist.github.com/anonymous/596dfd4fde20548a4175d962aaec74c4 . It works, but when I comment the allocation and replace it with the MemoryStack stuff it fails. Why is that?
[23:07:37] <Flaghacker> (Sidenote, the code is written in Kotlin but that reads almost like pseudocode)
[23:12:13] <codi^r> the default stack size for MemoryStack is 64 kb. I guess your image data is bigger than that.
[23:23:26] *** Robert_Zenz <Robert_Zenz!~Robert_Ze@213-47-230-151.cable.dynamic.surfer.at> has quit IRC (Quit: What do you mean that wasn't a smart idea?)
[23:23:32] <Flaghacker> codi^r, But why does it work with ByteBuffer.allocate then?
[23:29:21] *** Unimatrix325 <Unimatrix325!~Unimatrix@router-kraduha-nat-l.pilsfree.net> has quit IRC (Ping timeout: 268 seconds)
[23:30:30] <codi^r> because ByteBuffer.allocate() is limited to 2 gb which is plenty for a texture. note that this probably fails later, as you should use native memory (e.g. with allocateDirect()) for GL resources.
[23:33:29] <codi^r> also, see https://blog.lwjgl.org/memory-management-in-lwjgl-3/
[23:35:34] <Flaghacker> I come from that site, and they say "Use of ByteBuffer.allocateDirect() is highly discouraged." and "Always prefer stack allocation.", so I'm getting mixed signals here :)
[23:37:31] <codi^r> MemoryStack isn't meant to be used for large amounts of data. just use MemoryUtil.memAlloc()/memFree(). If you want to avoid reallocations for texture uploads, maybe create a "large enough" buffer at startup and reuse that.
[23:40:24] <Flaghacker> Okay, thanks a lot!
[23:57:35] *** travisgrib <travisgrib!~travisgri@cpc76428-belc8-2-0-cust570.2-1.cable.virginm.net> has joined #lwjgl
top

   July 3, 2017  
< | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | >