[00:02:12] *** groton <groton!~groton@unaffiliated/groton> has quit IRC (Quit: groton)
[00:02:39] *** Nicmavr <Nicmavr!~Nicmavr@unaffiliated/nicmavr> has quit IRC (Read error: Connection reset by peer)
[00:04:52] *** Nicmavr <Nicmavr!~Nicmavr@unaffiliated/nicmavr> has joined ##OpenGL
[00:08:40] <zy]x[yz> holy crap how long have i been staring at this?
[00:14:22] *** krystcich <krystcich!~krystcich@088156132170.dynamic-ww-04.vectranet.pl> has quit IRC (Quit: Going offline, see ya! (www.adiirc.com))
[00:15:35] *** davr0s <davr0s!~textual@host109-150-28-226.range109-150.btcentralplus.com> has quit IRC (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
[00:18:33] *** davr0s <davr0s!~textual@host109-150-28-226.range109-150.btcentralplus.com> has joined ##OpenGL
[00:18:46] *** darkside86 <darkside86!~ismai@97-81-155-106.dhcp.gwnt.ga.charter.com> has joined ##OpenGL
[00:20:20] *** Orion] <Orion]!~H0i@unaffiliated/orion/x-3970838> has quit IRC (Remote host closed the connection)
[00:20:50] *** Snoo21690 <Snoo21690!~H0i@unaffiliated/orion/x-3970838> has joined ##OpenGL
[00:30:04] *** Snoo21690 <Snoo21690!~H0i@unaffiliated/orion/x-3970838> has quit IRC (Read error: Connection reset by peer)
[00:30:34] *** Orion] <Orion]!~H0i@unaffiliated/orion/x-3970838> has joined ##OpenGL
[00:59:01]
*** serg-z <serg-z!~serg-z@87.247.62.56> has quit IRC (Quit: ZNC 1.7.2 - https://znc.in)
[01:00:06] *** atk <atk!~Arch-TK@ircpuzzles/staff/Arch-TK> has quit IRC (Quit: Well this is unexpected.)
[01:00:27] *** atk <atk!~Arch-TK@ircpuzzles/staff/Arch-TK> has joined ##OpenGL
[01:10:21] *** serg-z <serg-z!~serg-z@188.246.245.177> has joined ##OpenGL
[01:15:06] *** LunarJetman <LunarJetman!LunarJetma@5ec16e1a.skybroadband.com> has quit IRC (Ping timeout: 250 seconds)
[01:17:00] *** Matthijs <Matthijs!~quassel@unaffiliated/matthijs> has joined ##OpenGL
[01:19:43] *** BPL <BPL!~BPL@102.56.27.77.dynamic.reverse-mundo-r.com> has quit IRC (Quit: Leaving)
[01:26:53] *** Elysion <Elysion!~Elysion@124-148-129-247.dyn.iinet.net.au> has joined ##OpenGL
[01:30:22] *** Matthijs <Matthijs!~quassel@unaffiliated/matthijs> has quit IRC (Ping timeout: 246 seconds)
[01:45:16] *** learningc <learningc!~learningc@mti-37-145.tm.net.my> has joined ##OpenGL
[01:55:53] *** KAHR-Alpha <KAHR-Alpha!~Alpha@2a01cb0d024a6600e8e0a5332ca21635.ipv6.abo.wanadoo.fr> has quit IRC (Ping timeout: 258 seconds)
[02:00:45] *** learningc <learningc!~learningc@mti-37-145.tm.net.my> has quit IRC (Remote host closed the connection)
[02:11:26] *** slidercrank <slidercrank!~slidercra@ircpuzzles/2015/april-fools/fifth/slidercrank> has quit IRC (Ping timeout: 272 seconds)
[02:36:08] *** Oddity <Oddity!~Oddity@unaffiliated/oddity> has quit IRC (Ping timeout: 250 seconds)
[02:47:08] *** Oddity <Oddity!~Oddity@unaffiliated/oddity> has joined ##OpenGL
[02:49:32] *** davr0s <davr0s!~textual@host109-150-28-226.range109-150.btcentralplus.com> has quit IRC (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
[03:05:16] *** R2robot <R2robot!~R2robot@unaffiliated/r2ro> has quit IRC (Ping timeout: 272 seconds)
[03:32:03] *** Jonas___ <Jonas___!~Jonas__@unaffiliated/jonas/x-7723671> has joined ##OpenGL
[03:35:12] *** Jonas__ <Jonas__!~Jonas__@unaffiliated/jonas/x-7723671> has quit IRC (Ping timeout: 246 seconds)
[03:46:32] *** learningc <learningc!~learningc@mti-37-145.tm.net.my> has joined ##OpenGL
[03:50:50] *** R2robot <R2robot!~R2robot@unaffiliated/r2ro> has joined ##OpenGL
[03:59:30] *** Twipply <Twipply!~Twipply@unaffiliated/twipply> has quit IRC (Quit: Leaving)
[04:17:34] *** darkside86 <darkside86!~ismai@97-81-155-106.dhcp.gwnt.ga.charter.com> has quit IRC (Ping timeout: 255 seconds)
[04:28:39] *** slime <slime!~slime73@108-60-106-85.static.wiline.com> has joined ##OpenGL
[04:28:52] *** slime <slime!~slime73@108-60-106-85.static.wiline.com> has quit IRC (Client Quit)
[04:30:05] *** groton <groton!~groton@unaffiliated/groton> has joined ##OpenGL
[04:42:24] *** zalt <zalt!~lambda443@unaffiliated/lambda443> has quit IRC (Ping timeout: 244 seconds)
[04:49:13] *** learningc <learningc!~learningc@mti-37-145.tm.net.my> has quit IRC (Ping timeout: 245 seconds)
[04:49:35] *** learningc <learningc!~learningc@mti-37-145.tm.net.my> has joined ##OpenGL
[04:50:54] *** Oddity <Oddity!~Oddity@unaffiliated/oddity> has quit IRC (Ping timeout: 250 seconds)
[05:08:42] *** wildlander <wildlander!~wildlande@unaffiliated/wildlander> has quit IRC (Ping timeout: 258 seconds)
[05:13:00] *** diwr <diwr!~manjaro-u@unaffiliated/diwr> has joined ##OpenGL
[05:48:58] *** learningc <learningc!~learningc@mti-37-145.tm.net.my> has quit IRC (Ping timeout: 250 seconds)
[05:57:22] *** learningc <learningc!~learningc@mti-37-145.tm.net.my> has joined ##OpenGL
[06:06:02] *** immibis <immibis!~immibis@125-238-72-168-fibre.sparkbb.co.nz> has joined ##OpenGL
[06:20:07] *** thomas_25 <thomas_25!~thomas_25@unaffiliated/thomas-25/x-0068438> has joined ##OpenGL
[06:24:44] *** thomas_25 <thomas_25!~thomas_25@unaffiliated/thomas-25/x-0068438> has quit IRC (Ping timeout: 268 seconds)
[06:28:48] *** ville <ville!~ville@212-149-214-47.bb.dnainternet.fi> has quit IRC (Quit:)
[06:30:30] *** thomas_25 <thomas_25!~thomas_25@unaffiliated/thomas-25/x-0068438> has joined ##OpenGL
[06:38:10] *** diwr <diwr!~manjaro-u@unaffiliated/diwr> has quit IRC (Remote host closed the connection)
[06:44:23] *** thomas_25 <thomas_25!~thomas_25@unaffiliated/thomas-25/x-0068438> has quit IRC (Quit: My MacBook has gone to sleep. ZZZzzz…)
[06:44:57] *** thomas_25 <thomas_25!~thomas_25@unaffiliated/thomas-25/x-0068438> has joined ##OpenGL
[06:49:27] *** thomas_25 <thomas_25!~thomas_25@unaffiliated/thomas-25/x-0068438> has quit IRC (Ping timeout: 246 seconds)
[06:49:28] *** learningc <learningc!~learningc@mti-37-145.tm.net.my> has quit IRC (Ping timeout: 272 seconds)
[06:50:03] *** learningc <learningc!~learningc@mti-37-145.tm.net.my> has joined ##OpenGL
[06:50:54] *** ville <ville!~ville@212-149-214-47.bb.dnainternet.fi> has joined ##OpenGL
[06:53:20] *** davr0s <davr0s!~textual@host109-150-28-226.range109-150.btcentralplus.com> has joined ##OpenGL
[07:07:44] *** learningc <learningc!~learningc@mti-37-145.tm.net.my> has quit IRC (Remote host closed the connection)
[07:08:10] *** learningc <learningc!~learningc@mti-37-145.tm.net.my> has joined ##OpenGL
[07:26:08] *** slvn_ <slvn_!~slvn_@c2s31-1-78-245-90-111.fbx.proxad.net> has joined ##OpenGL
[07:49:13] *** learningc <learningc!~learningc@mti-37-145.tm.net.my> has quit IRC (Ping timeout: 268 seconds)
[07:49:25] *** learningc <learningc!~learningc@mti-37-145.tm.net.my> has joined ##OpenGL
[07:52:57] *** thomas_25 <thomas_25!~thomas_25@unaffiliated/thomas-25/x-0068438> has joined ##OpenGL
[07:54:06] *** davr0s <davr0s!~textual@host109-150-28-226.range109-150.btcentralplus.com> has quit IRC (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
[08:03:39] *** learningc <learningc!~learningc@mti-37-145.tm.net.my> has quit IRC (Ping timeout: 246 seconds)
[08:04:12] *** learningc <learningc!~learningc@mti-37-145.tm.net.my> has joined ##OpenGL
[08:05:30] *** hellozee <hellozee!~hellozee@116.73.34.190> has joined ##OpenGL
[08:14:46] *** groton <groton!~groton@unaffiliated/groton> has quit IRC (Quit: groton)
[08:24:26] *** random_yanek <random_yanek!~random_ya@87.116.237.230> has quit IRC (Quit: random_yanek)
[08:25:04] *** random_yanek <random_yanek!~random_ya@87.116.237.230> has joined ##OpenGL
[08:25:05] *** random_yanek <random_yanek!~random_ya@87.116.237.230> has quit IRC (Max SendQ exceeded)
[08:26:49] *** random_yanek <random_yanek!~random_ya@87.116.237.230> has joined ##OpenGL
[08:30:42] *** iderik <iderik!~weechat@h-162-65.A147.priv.bahnhof.se> has joined ##OpenGL
[08:43:53] *** karab44 <karab44!~karab44@unaffiliated/karab44> has joined ##OpenGL
[08:49:13] *** learningc <learningc!~learningc@mti-37-145.tm.net.my> has quit IRC (Ping timeout: 245 seconds)
[08:49:40] *** learningc <learningc!~learningc@mti-37-145.tm.net.my> has joined ##OpenGL
[08:50:44] *** learningc <learningc!~learningc@mti-37-145.tm.net.my> has quit IRC (Remote host closed the connection)
[08:51:43] *** mukunda <mukunda!~mukunda@cpe-104-175-176-150.socal.res.rr.com> has quit IRC (Ping timeout: 246 seconds)
[09:00:16] *** fatalhalt <fatalhalt!~fatalhalt@c-67-163-60-93.hsd1.il.comcast.net> has quit IRC (Quit: fatal halt)
[09:17:41] *** zalt <zalt!~lambda443@unaffiliated/lambda443> has joined ##OpenGL
[09:26:47] *** stefkos <stefkos!~Pawel@79.184.40.186.ipv4.supernova.orange.pl> has joined ##OpenGL
[09:34:29] *** gareppa <gareppa!~gareppa@unaffiliated/gareppa> has joined ##OpenGL
[09:53:11] *** gareppa <gareppa!~gareppa@unaffiliated/gareppa> has quit IRC (Quit: Leaving)
[09:53:23] *** gareppa <gareppa!~gareppa@unaffiliated/gareppa> has joined ##OpenGL
[10:01:29] *** Matthijs <Matthijs!~quassel@unaffiliated/matthijs> has joined ##OpenGL
[10:06:58] *** ratchetfreak <ratchetfreak!c351a8d8@gateway/web/freenode/ip.195.81.168.216> has joined ##OpenGL
[10:07:48] *** hellozee <hellozee!~hellozee@116.73.34.190> has quit IRC (Remote host closed the connection)
[10:08:11] *** hellozee <hellozee!~hellozee@116.73.34.190> has joined ##OpenGL
[10:08:56] *** gareppa <gareppa!~gareppa@unaffiliated/gareppa> has quit IRC (Quit: Leaving)
[10:42:39] *** Nicmavr <Nicmavr!~Nicmavr@unaffiliated/nicmavr> has quit IRC (Read error: Connection reset by peer)
[10:44:37] *** Nicmavr <Nicmavr!~Nicmavr@unaffiliated/nicmavr> has joined ##OpenGL
[11:02:13] *** Oddity <Oddity!~Oddity@unaffiliated/oddity> has joined ##OpenGL
[12:10:59] *** darkside86 <darkside86!~ismai@97-81-155-106.dhcp.gwnt.ga.charter.com> has joined ##OpenGL
[12:11:44] *** davr0s <davr0s!~textual@host109-150-28-226.range109-150.btcentralplus.com> has joined ##OpenGL
[12:20:40] *** Foaly <Foaly!~Foaly@ppp-88-217-55-65.dynamic.mnet-online.de> has joined ##OpenGL
[12:47:59] *** neure <neure!~timo@mobile-access-b0481f-213.dhcp.inet.fi> has joined ##OpenGL
[12:54:56] *** davr0s <davr0s!~textual@host109-150-28-226.range109-150.btcentralplus.com> has quit IRC (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
[13:01:04] <wedr> YAY! Today's a milestone!
[13:03:13] *** quadsar <quadsar!~quadsar@unaffiliated/quadsar> has quit IRC (Ping timeout: 252 seconds)
[13:03:57] *** Foaly <Foaly!~Foaly@ppp-88-217-55-65.dynamic.mnet-online.de> has quit IRC (Quit: Now 'mid shadows deep falls blessed sleep.)
[13:04:53] *** quadsar <quadsar!~quadsar@unaffiliated/quadsar> has joined ##OpenGL
[13:29:37] *** Chipzz <Chipzz!chipzz@unaffiliated/chipzz> has quit IRC (Ping timeout: 268 seconds)
[13:55:13] *** davr0s <davr0s!~textual@host109-150-28-226.range109-150.btcentralplus.com> has joined ##OpenGL
[14:19:07] *** jfpoole <jfpoole!~textual@72.143.113.107> has joined ##OpenGL
[14:19:13] *** hellozee <hellozee!~hellozee@116.73.34.190> has quit IRC (Remote host closed the connection)
[14:19:31] *** Foaly <Foaly!~Foaly@ppp-88-217-58-16.dynamic.mnet-online.de> has joined ##OpenGL
[14:19:38] *** hellozee <hellozee!~hellozee@116.73.34.190> has joined ##OpenGL
[14:26:08] *** bayoubengal <bayoubengal!~bayoubeng@rrcs-50-84-94-202.sw.biz.rr.com> has joined ##OpenGL
[14:30:13] *** gaulishcoin <gaulishcoin!~gaulishco@anice-652-1-371-223.w83-201.abo.wanadoo.fr> has joined ##OpenGL
[14:31:32] *** Twipply <Twipply!~Twipply@unaffiliated/twipply> has joined ##OpenGL
[14:44:54] *** karab44 <karab44!~karab44@unaffiliated/karab44> has quit IRC ()
[15:01:29] *** Twipply <Twipply!~Twipply@unaffiliated/twipply> has quit IRC (Quit: Leaving)
[15:02:03] *** Twipply <Twipply!~Twipply@unaffiliated/twipply> has joined ##OpenGL
[15:15:01] *** englosh <englosh!5bba370e@gateway/web/freenode/ip.91.186.55.14> has joined ##OpenGL
[15:32:52] *** Lord-Kamina <Lord-Kamina!~Lord-Kami@pc-250-87-104-200.cm.vtr.net> has quit IRC (Quit: Textual IRC Client: www.textualapp.com)
[15:34:18] <englosh> Hello. There are some graphis framework (like LÖVE) that allow you to draw a rectangle just by writing "love.graphics.rectangle(x, y, width, height)" in the main loop. But I wonder how these frameworks do that? I mean the vertices for that rectangle of course have to be created first. But doing that in the loop every frame would be very inefficient I think. Does anyone know? LÖVE uses OpenGL internally.
[15:35:08] <zalt> englosh, why would that be inefficient
[15:35:09] <Stragus> It's fairly efficient to buffer up small geometry, perform a single big upload, then draw the stuff
[15:35:28] <zalt> my engine does basically the same thing
[15:35:31] <englosh> But I mean the vertices array is recreated every frame
[15:35:46] <derhass> why would it need to do that?
[15:35:57] <Stragus> englosh: No, you can ues a cycle of vertex buffers, you just upload to a different one each frame, then draw it
[15:36:05] <zalt> you have a huge buffer where you store vertices, and you can sort things based on similar textures and stuff, and you usually end up doing a single glDraw call
[15:36:14] <Stragus> That being said, this is sane for UI stuff and text, not serious geometry
[15:37:08] <derhass> doing "love.graphics.rectangle(x, y, width, height)" is conceptually providing an immediate mode interface. and in the end, this is a very bad idea for most scenarios anyway
[15:38:12] <englosh> why? so you mean you prefer creating a rectangle object outside the loop and then do draw(rectangle) in the loop?
[15:38:48] <zalt> derhass, the thing is, gpus are super fast, i can get away with this for up to 100,000 rectangles or so on a good gpu :)
[15:38:50] <Stragus> If buffering allows you to bundle a bunch of stuff and draw it all at once, then it's better than drawing a single rectangle
[15:39:13] <derhass> zalt: but, the thing is, the GPU speed is completely irrelevant in that scenario
[15:39:34] <zalt> derhass, note that it's probably not doing the draw right away, it's buffering all the commands and doing a single call
[15:39:36] <Stragus> zalt: You aren't really using the GPU if it's constantly starved of work
[15:40:39] <derhass> zalt: that doesn't matter if the driver has the overhead of batching up immediate mode calls, or if you wrap this yourself. you still use an immediate mode interface with a lot of cpu side function calls for tiny bits of geometry
[15:40:41] <zalt> yep, that'll probably be the case, but i mean, because the gpu does its thing very quickly there's plenty of room to do things wrong on the cpu side
[15:41:14] <derhass> englosh: it really depends on what ecaxtly you're trying to achieve
[15:41:15] <Stragus> zalt: Then you'll have to scrap and rewrite everything when you want to do something more serious
[15:42:20] <zalt> even though it's totally retarded in terms of the hundreds of indirections involved it's still pretty fast
[15:42:24] <derhass> that cocos2d thing has annoyed me a couple of times alreadt
[15:42:30] <zalt> iirc it's faster than unity on mobiles
[15:42:47] <zalt> derhass, i based my 2d renderer on theirs :P
[15:55:34] <zalt> derhass, do you see anything inefficient about this scenario: call draw_rectangle() -> 6 vertices get added to a huge buffer of dynamic and unpredictable geometry that will be sent to the gpu anyways -> loop throw metadata describing the needed textures of continuous regions of vertices doing the necessary changes then doing glDraw() calls
[15:57:13] <zalt> the huge buffer is usually sorted, so that if you have different 10 textures you will do at most 10 glDraw() calls
[15:57:46] <Stragus> That's certainly reasonable for light geometry, like UI stuff. I do the same for my UI/widget/text engine
[15:57:49] <zalt> this ignores the complexity of Z order, with that it might less efficient
[15:58:13] <Stragus> Just have a cycle of multiple buffers so you can pick a new one each frame
[15:59:10] <Stragus> I also sort by "region" of the textures (it's free as part of the same sort), it improves texture cache locality a bit
[16:07:04] <derhass> zalt: well, if you need that kind of dynamic geometry, I don't see anything wrong with it
[16:07:56] <zalt> that's exactly what you need in a 2d engine, there's pretty much no static geometry
[16:08:33] <derhass> is that so? not in my world
[16:08:46] <derhass> I'm not talking about completely static
[16:08:52] <zalt> i have no idea how things are done in a 3d engine, i guess because models are big they're usually stored then you change a matrix to do transformations on them?
[16:09:20] <derhass> but for example, in an UI, new elements aren't added and removedand moved around every frame, there are changes, but lots of it is untouched
[16:10:07] <Stragus> But an UI is so light, so little geometry, that it's easier to upload a new bundle of 10kb of data than figuring out what has changed, how to repack...
[16:10:11] <zalt> derhass, that's true, but when you consider the "human cost" involved and extra complexity in optimizing these, it makes sense to treat everything as if it's dynamic
[16:13:03] <wedr> Hmmm, if I'm writing an OpenGL book that's just 2 chapters long... and then every other OpenGL books covered all the textures, lighting, shaders, and post-processing... maybe I should cover audio and game engine architecture for OpenGL...
[16:13:33] <wedr> (Even though both of them are literally out of scope for OpenGL0
[16:13:43] *** Foaly <Foaly!~Foaly@ppp-88-217-58-16.dynamic.mnet-online.de> has quit IRC (Quit: Now 'mid shadows deep falls blessed sleep.)
[16:14:19] *** zalt_ <zalt_!~lambda443@unaffiliated/lambda443> has joined ##OpenGL
[16:14:42] <karalaine> wedr: sounds like topics for entirely different two (or three) books :)
[16:14:49] * zalt_ lost his connection
[16:15:42] <zalt_> derhass, so you mean, you'd gain a lot by treating static geometry differently even in 2d?
[16:15:58] <zalt_> when i think about it, there is still plenty of static 2d things :P
[16:16:07] *** zalt <zalt!~lambda443@unaffiliated/lambda443> has quit IRC (Ping timeout: 268 seconds)
[16:16:51] <zalt_> and getting rid of them / loading them at the start of a level would give you more bandwidth room to do dynamic things
[16:17:57] <wedr> karalaine: Yes, because I was thinking what else do I need to cover in OpenGL that is sadistic?
[16:18:33] <zalt_> i'm still wondering about how things are usually done in a 3d engine
[16:18:58] <zalt_> especially things like model animations, do you need dynamic geometry for that? :O
[16:19:42] <Stragus> You really don't save much trying to reduce that 10kb of UI 2D uploads per frame. You gain the hassle of figuring out how to update just little scattered pieces in as few uploads as possible
[16:20:10] <Stragus> Most model animations are done in the vertex shader
[16:20:17] <karalaine> wedr: you could name your book "how to make game" or "how to make game engine" and then include those topics if you want but calling it opengl book would be misleading
[16:20:50] <karalaine> "how to make game engine with opengl" maybe
[16:22:02] <wedr> karalaine: Hmmm, right now, it's just a sadistic approach to initializing OpenGL.
[16:22:30] <wedr> and they were all written with the intention for me to learn OpenGL
[16:22:53] <Stragus> I don't think you are supposed to write a book when you are still learning
[16:22:56] <Stragus> Personal notes, maybe
[16:23:03] <wedr> Stragus: It's personal notes,
[16:23:07] <wedr> but written as if it's a book
[16:23:18] <wedr> and it's MIT licensed, so it's not published at all
[16:24:34] *** neure <neure!~timo@mobile-access-b0481f-213.dhcp.inet.fi> has quit IRC (Quit: Leaving)
[16:25:41] *** upgrdman <upgrdman!~upgrdman@blender/artist/upgrdman> has joined ##OpenGL
[16:27:23]
<englosh> did anyone here ever had the problem that when recreating the vertices array in the main loop every frame that a weird additional line is being drawn? This is my rectangle with the vertices array defined once outside the loop: https://i.imgur.com/MsnBEsc.png. But this is it when I recreate the vertices every frame: https://i.imgur.com/DMlDMcj.png also that additional line that was not on the previous screenshot somtimes flickers
[16:28:06] <englosh> also it took me 2 days to figure this out because it's so strange
[16:29:10] <Stragus> Probably drawing from undefined data
[16:35:16] *** zalt_ <zalt_!~lambda443@unaffiliated/lambda443> has quit IRC (Remote host closed the connection)
[16:35:47] *** zalt_ <zalt_!~lambda443@unaffiliated/lambda443> has joined ##OpenGL
[16:38:16] *** zalt_ <zalt_!~lambda443@unaffiliated/lambda443> has quit IRC (Remote host closed the connection)
[16:38:46] *** zalt_ <zalt_!~lambda443@unaffiliated/lambda443> has joined ##OpenGL
[16:39:17] *** Foaly <Foaly!~Foaly@ppp-88-217-58-16.dynamic.mnet-online.de> has joined ##OpenGL
[16:40:52] *** davr0s <davr0s!~textual@host109-150-28-226.range109-150.btcentralplus.com> has quit IRC (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
[16:49:52] *** zalt_ <zalt_!~lambda443@unaffiliated/lambda443> has quit IRC (Ping timeout: 272 seconds)
[17:02:08] *** tecneecs <tecneecs!~tecneecs@ool-44c1cbc1.dyn.optonline.net> has quit IRC (Ping timeout: 245 seconds)
[17:16:59] *** groton <groton!~groton@unaffiliated/groton> has joined ##OpenGL
[17:21:26] *** alexge50 <alexge50!~alexge50@unaffiliated/alexge50> has joined ##OpenGL
[17:21:42] *** groton <groton!~groton@unaffiliated/groton> has quit IRC (Client Quit)
[17:22:14] *** alexge50 <alexge50!~alexge50@unaffiliated/alexge50> has quit IRC (Max SendQ exceeded)
[17:22:41] *** alexge50 <alexge50!~alexge50@unaffiliated/alexge50> has joined ##OpenGL
[17:33:57] *** thomas_25 <thomas_25!~thomas_25@unaffiliated/thomas-25/x-0068438> has quit IRC (Quit: My MacBook has gone to sleep. ZZZzzz…)
[17:43:10] <roxlu> Hi I'm curious how you manage PBR materials when they sometimes use textures and sometimes just a value; for example for albedo
[17:45:09] *** krystcich <krystcich!~krystcich@088156132082.dynamic-ww-04.vectranet.pl> has joined ##OpenGL
[17:47:01] <ratchetfreak> just like any other value that needs to make it's way to the fragment shader, if it's constant on the object: uniform, otherwise texture
[17:47:44] <ratchetfreak> for some parts you can use vertex attributes but those tend to be rare
[17:48:26] <roxlu> ratchetfreak: how would you deal with that in the shader?
[17:49:49] *** Matthijs <Matthijs!~quassel@unaffiliated/matthijs> has quit IRC (Quit: *waves frantically*)
[17:49:49] <Stragus> You use a different shader
[17:50:01] <Stragus> You can compile the same one multiple times with #if though
[17:51:23] <roxlu> yeah, but if you have e.g. albedo, normal, metallic, roughness, ambient occlusion.. that would mean a lot of different possibliities
[17:52:24] * roxlu bbl
[17:52:40] <Stragus> In practice, that's likely to be a single digit count of shaders. You can compile just the ones you need
[17:54:50] *** Foaly <Foaly!~Foaly@ppp-88-217-58-16.dynamic.mnet-online.de> has quit IRC (Quit: Now 'mid shadows deep falls blessed sleep.)
[18:01:16] *** gareppa <gareppa!~gareppa@unaffiliated/gareppa> has joined ##OpenGL
[18:08:12] <Yaniel> you can also use a 1x1 texture
[18:08:24] <Yaniel> or a 1x1 white texture + a uniform
[18:09:44] *** fatalhalt <fatalhalt!~fatalhalt@c-67-163-60-93.hsd1.il.comcast.net> has joined ##OpenGL
[18:17:57] *** zalt <zalt!~lambda443@unaffiliated/lambda443> has joined ##OpenGL
[18:19:33] *** LunarJetman <LunarJetman!LunarJetma@5ec16e1a.skybroadband.com> has joined ##OpenGL
[18:28:28] *** Foaly <Foaly!~Foaly@ppp-88-217-58-16.dynamic.mnet-online.de> has joined ##OpenGL
[18:37:01] *** HZun <HZun!~HZun@0x3ec721e2.osd.customer.dk.telia.net> has joined ##OpenGL
[18:40:46] *** gareppa <gareppa!~gareppa@unaffiliated/gareppa> has quit IRC (Quit: Leaving)
[18:44:19] *** ratchetfreak <ratchetfreak!c351a8d8@gateway/web/freenode/ip.195.81.168.216> has quit IRC (Ping timeout: 256 seconds)
[18:50:24] *** iderik <iderik!~weechat@h-162-65.A147.priv.bahnhof.se> has quit IRC (Quit: iderik)
[18:52:16] *** borkr <borkr!~borkr@static130-244.mimer.net> has joined ##OpenGL
[18:57:14] *** TzilTzal <TzilTzal!~yaron@58.182.185.149> has joined ##OpenGL
[18:57:50] *** karab44 <karab44!~karab44@unaffiliated/karab44> has joined ##OpenGL
[19:04:38] *** thomas_25 <thomas_25!~thomas_25@unaffiliated/thomas-25/x-0068438> has joined ##OpenGL
[19:26:18] *** R2robot <R2robot!~R2robot@unaffiliated/r2ro> has quit IRC (Ping timeout: 272 seconds)
[19:27:11] *** R2robot <R2robot!~R2robot@unaffiliated/r2ro> has joined ##OpenGL
[19:30:02] *** mandeep <mandeep!~mandeep@unaffiliated/mandeepb> has quit IRC (Ping timeout: 245 seconds)
[19:35:53] <roxlu> Yaniel: yeah I was thinking about that
[19:35:57] *** LunarJetman <LunarJetman!LunarJetma@5ec16e1a.skybroadband.com> has quit IRC (Quit: LunarJetman)
[19:36:27] *** englosh <englosh!5bba370e@gateway/web/freenode/ip.91.186.55.14> has quit IRC (Ping timeout: 256 seconds)
[19:36:29] *** LunarJetman <LunarJetman!LunarJetma@5ec16e1a.skybroadband.com> has joined ##OpenGL
[19:36:42] *** ShadowIce <ShadowIce!~pyoro@unaffiliated/shadowice-x841044> has joined ##OpenGL
[19:37:52] *** bpmedley <bpmedley!~bpm@c-69-94-201-19.hs.gigamonster.net> has quit IRC (Quit: Textual IRC Client: www.textualapp.com)
[19:44:29] *** mandeep <mandeep!~mandeep@unaffiliated/mandeepb> has joined ##OpenGL
[20:04:08] *** TzilTzal <TzilTzal!~yaron@58.182.185.149> has quit IRC (Quit: Leaving.)
[20:20:28] *** gareppa <gareppa!~gareppa@unaffiliated/gareppa> has joined ##OpenGL
[20:21:48] *** slidercrank <slidercrank!~slidercra@ircpuzzles/2015/april-fools/fifth/slidercrank> has joined ##OpenGL
[20:25:30] *** ratchetfreak <ratchetfreak!~ratchetfr@ptr-82s3g7oc1x6xrsura62.18120a2.ip6.access.telenet.be> has joined ##OpenGL
[20:39:38] *** Stragus <Stragus!~alexis@modemcable198.134-161-184.mc.videotron.ca> has quit IRC (Ping timeout: 245 seconds)
[20:49:47] *** davr0s <davr0s!~textual@host109-150-28-226.range109-150.btcentralplus.com> has joined ##OpenGL
[21:10:49] *** gareppa <gareppa!~gareppa@unaffiliated/gareppa> has quit IRC (Quit: Leaving)
[21:11:12] *** slvn_ <slvn_!~slvn_@c2s31-1-78-245-90-111.fbx.proxad.net> has quit IRC (Quit: Leaving)
[21:12:36] *** davr0s <davr0s!~textual@host109-150-28-226.range109-150.btcentralplus.com> has quit IRC (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
[21:14:13] *** alexge50 <alexge50!~alexge50@unaffiliated/alexge50> has quit IRC (Ping timeout: 245 seconds)
[21:18:19] *** gb_away <gb_away!~sfdzt4@190.18.120.141> has quit IRC (Quit: bye)
[21:20:27] *** gb_away <gb_away!~sfdzt4@190.18.120.141> has joined ##OpenGL
[21:22:39] *** Nicmavr <Nicmavr!~Nicmavr@unaffiliated/nicmavr> has quit IRC (Read error: Connection reset by peer)
[21:23:45] *** davr0s <davr0s!~textual@host109-150-28-226.range109-150.btcentralplus.com> has joined ##OpenGL
[21:24:51] *** Nicmavr <Nicmavr!~Nicmavr@unaffiliated/nicmavr> has joined ##OpenGL
[21:34:19] *** lamefun <lamefun!~lamefun@37.113.12.205> has joined ##OpenGL
[21:35:38] *** krystcich <krystcich!~krystcich@088156132082.dynamic-ww-04.vectranet.pl> has quit IRC (Quit: Going offline, see ya! (www.adiirc.com))
[21:42:18] *** hellozee <hellozee!~hellozee@116.73.34.190> has quit IRC (Ping timeout: 250 seconds)
[21:42:24] *** KAHR-Alpha <KAHR-Alpha!~Alpha@2a01cb0d024a6600e9e37be4a3de7e13.ipv6.abo.wanadoo.fr> has joined ##OpenGL
[21:46:37] *** hellozee <hellozee!~hellozee@2405:204:3390:d7c8:2543:b3c2:f0e3:5efe> has joined ##OpenGL
[21:46:40] *** hellozee <hellozee!~hellozee@2405:204:3390:d7c8:2543:b3c2:f0e3:5efe> has quit IRC (Remote host closed the connection)
[21:51:16] *** ShadowIce <ShadowIce!~pyoro@unaffiliated/shadowice-x841044> has quit IRC (Quit: Leaving)
[21:56:17] <qptain_Nemo> do drivers tend to optimize access to the same texture coordinates? or is "manually caching" obtained values from sampling the same coordinates in variables actually worth it?
[21:56:43] *** Stragus <Stragus!~alexis@modemcable198.134-161-184.mc.videotron.ca> has joined ##OpenGL
[21:58:08] <toxictype> Hello
[21:58:30] <toxictype> I tried drawing a shaded quad but my program doesn't draw it if I use glUseProgram it's just not there, otherwise it draws my quad.
[21:58:39] <toxictype> Shader gets loaded correctly, I used tutoria
[21:59:44] <Stragus> If you don't use a shader, then it's going through the legacy fixed pipeline. There are many differences
[21:59:59] <toxictype> How do I draw a shaded quad then?
[22:00:12] <Stragus> Does that tutorial cover how to supply vertex attributes, uniforms?
[22:00:17] <toxictype> No.
[22:00:26] <Stragus> You need a better tutorial
[22:06:35] <toxictype> How do I draw a shaded quad though?
[22:07:21] <Stragus> When you say "shaded", you mean "using shaders" or something else?
[22:07:42] <toxictype> Using shaders.
[22:07:55] <toxictype> I loaded a shader and got its ID but that's as far as I got besides glUseProgram
[22:08:04] <Stragus> It would be easier if you were to follow a good tutorial
[22:08:10] <Stragus> You can ask more specific questions here though
[22:08:58] <qptain_Nemo> the idea is that you draw geometry, vertices. the vertices gets processed by your vertex shader, and then for every pixel that will be potentially visible your fragment shader is called. but yeah, both of those websites cover basic quad rendering.
[22:09:28] *** thomas_25 <thomas_25!~thomas_25@unaffiliated/thomas-25/x-0068438> has quit IRC (Ping timeout: 268 seconds)
[22:10:19] <qptain_Nemo> what is the most efficient way to shift texture data by arbitrary values? basically, what is the best equivalent of textureOffset with variable offsets
[22:11:04] *** thomas_25 <thomas_25!~thomas_25@unaffiliated/thomas-25/x-0068438> has joined ##OpenGL
[22:12:06] <Stragus> qptain_Nemo: Add to the texcoords in the shader?
[22:12:57] <qptain_Nemo> that seems to slow it down pretty much as much as literally rendering the offsetted texture with a separate shader and fbo :S
[22:15:30] <derhass> qptain_Nemo: what>
[22:15:52] <Stragus> Ah. Is that on some mobile devices which want interpolated texcoords passed straight through from the vertex shader, so they know what to pre-cache as fragments come?
[22:16:20] <derhass> well, you cann add the offset in the VS already
[22:16:22] <qptain_Nemo> nah i'm getting that on desktop
[22:17:53] <Stragus> Does that "variable offset" mean your texture loads are scattered all over the place?
[22:19:14] <chrisf> qptain_Nemo: to answer your initial question: there are typically various small caches on the sampler's path to memory.
[22:19:52] <chrisf> qptain_Nemo: not trashing them is fairly important
[22:19:55] <qptain_Nemo> well the sampling generally happens around the current texel but the point is that the overall offset specified as a uniform can change from one call to another
[22:20:17] <qptain_Nemo> from one shader run to another i mean
[22:20:53] <derhass> that shouldn't result in a slowdown
[22:21:20] *** ratchet_freak <ratchet_freak!~ratchetfr@ptr-82s3g7oc1x6xrsura62.18120a2.ip6.access.telenet.be> has joined ##OpenGL
[22:21:59] <toxictype> Is this right?
[22:22:34] <derhass> toxictype: it is _far_ from being complete
[22:22:46] <toxictype> Okay can you give me a link or something?
[22:23:04] <derhass> there are links to tutorials in the channel topic
[22:23:31] <qptain_Nemo> chrisf: i'm assuming trashing them involves accessing texture too chaotically?
[22:23:39] <qptain_Nemo> *textures
[22:23:40] <chrisf> yes
[22:24:28] *** ratchetfreak <ratchetfreak!~ratchetfr@ptr-82s3g7oc1x6xrsura62.18120a2.ip6.access.telenet.be> has quit IRC (Ping timeout: 258 seconds)
[22:24:37] <qptain_Nemo> that's very useful to know. but i was more wondering if i like write texture(tex, coords) with the same values seven times, will the shader compilers optimize it away or actually make the GPU sample it seven times
[22:24:59] <Stragus> Don't rely on compilers being smart, write what you want the code to do
[22:25:14] <qptain_Nemo> fair enough
[22:26:57] *** karab44 <karab44!~karab44@unaffiliated/karab44> has quit IRC ()
[22:32:25] *** borkr <borkr!~borkr@static130-244.mimer.net> has quit IRC (Ping timeout: 244 seconds)
[22:35:57] <toxictype> Why is nothing drawn?
[22:36:56] *** lamefun <lamefun!~lamefun@37.113.12.205> has quit IRC (Remote host closed the connection)
[22:36:59] <toxictype> It draws a wonky triangle if I change it to GL_TRIANGLES
[22:38:35] *** thomas_25 <thomas_25!~thomas_25@unaffiliated/thomas-25/x-0068438> has quit IRC (Quit: My MacBook has gone to sleep. ZZZzzz…)
[22:39:01] <toxictype> nvm
[22:49:12] <toxictype> Am I drawing the shape right?
[22:51:31] <derhass> GL_QUADS is deprecated since a decade
[22:51:35] <toxictype> Oh.
[22:51:40] <toxictype> Does that mean I have to use two triangles?
[22:51:53] <derhass> or a triangle strip or fan
[22:53:58] *** stefkos <stefkos!~Pawel@79.184.40.186.ipv4.supernova.orange.pl> has quit IRC (Quit: Going offline, see ya! (www.adiirc.com))
[22:53:59] <toxictype> My rectangle gets drawn all wack.
[22:54:08] <derhass> it is really unclear what is going on in your code
[22:54:18] <derhass> you only pasted some bits and pieces
[22:54:24] <derhass> but a lot is missing
[22:54:33] <toxictype> I pasted the working part.
[22:54:47] <toxictype> I changed it to two triagle. Ill post a screenshot.
[22:54:59] <derhass> well
[22:55:04] <derhass> "the working part"
[22:55:06] <derhass> LOL
[22:55:10] <toxictype> yeye
[22:55:53] <toxictype> So what's wrong with my shape?
[22:56:05] <derhass> what are you even doing?
[22:56:16] <toxictype> I'm trying to draw a rectangle with a shader.
[22:56:24] <toxictype> At the specified 2D screen location.
[22:56:29] <derhass> and the screenshot shows what?
[22:56:38] <toxictype> The wacky rectangle.
[22:56:44] <toxictype> It's not supposed to go outside right and top.
[22:56:55] <toxictype> It's supposed to be 32 pixels wide and high.
[22:57:08] <derhass> and how do you make it 32 pixels wide?
[22:57:19] <toxictype> Load x y w and h from a file.
[22:57:30] <toxictype> With glortho(?) set to the window size in pixels.
[22:57:30] <derhass> the GL doesn't draw in pixels
[22:57:36] <toxictype> I set it up so it does.
[22:57:42] <derhass> glOrtho is irrelevant for the shader
[22:58:00] <toxictype> I'm trying to just draw the quad without the shader.
[22:58:07] <toxictype> For now.
[22:58:10] <toxictype> It draws too big.
[22:58:26] <toxictype> It worked fine when I used glBegin() and such.
[22:58:27] <derhass> well
[22:58:32] <derhass> as I said
[22:58:34] <toxictype> Drew it at the right place and size.
[22:59:17] <toxictype> Can I use a shader with glBegin/End()?
[22:59:27] <toxictype> Like set the program and run the bit?
[22:59:32] <derhass> you actually can. sort of
[22:59:38] <derhass> but you'll end in hell
[22:59:47] <toxictype> Okay so can you fix this for me pretty please
[22:59:57] <derhass> no
[23:00:09] <toxictype> How do I fix it?
[23:00:13] <derhass> I don't know
[23:00:25] <derhass> you still haven't given us the chance to analyse the problem
[23:00:35] <toxictype> What do you require?
[23:00:42] <derhass> the relevant source code
[23:00:56] <toxictype> That is the relevant source code, what more do you need?
[23:01:02] <derhass> the shader
[23:01:06] <toxictype> Assuming I have it set up that glBegin() works perfectly.
[23:01:12] <toxictype> Wait I'm going to disable the shader.
[23:01:25] <derhass> and all code which defines all the (relevant) gl state at the time of the draw call
[23:01:36] *** bayoubengal <bayoubengal!~bayoubeng@rrcs-50-84-94-202.sw.biz.rr.com> has quit IRC (Ping timeout: 250 seconds)
[23:02:16] <toxictype> If I comment out glUseProgram and the shape doesn't draw at all.
[23:02:52] <toxictype> I'll post the shader code.
[23:03:13] <toxictype> Shader.cpp
[23:03:42] <derhass> that's not the shader
[23:03:43] <toxictype> ShadedAreas contain a Shader pointer which has the program ID.
[23:03:49] <toxictype> Oh that thing one sec.
[23:03:54] <toxictype> Sorry names
[23:04:05] *** bayoubengal <bayoubengal!~bayoubeng@rrcs-50-84-94-202.sw.biz.rr.com> has joined ##OpenGL
[23:05:09] <derhass> as I said, your shader isn't doing any transforms, so your coordinates are not in pixels
[23:05:16] <derhass> and the result you get is totally plausible
[23:05:30] <toxictype> Okay that makes sense. How do I fix this?
[23:05:53] <derhass> either add some transforms to your shader, or pre-transform the coordinates on the CPU
[23:06:03] <Stragus> A tutorial would cover uniforms and matrices
[23:06:05] <toxictype> How do I do that?
[23:06:16] <toxictype> I'm confused.
[23:06:55] <derhass> well, it is far too much to explain in a chat
[23:07:15] <derhass> the usual way is to use a transform matrix as a uniform in the shader
[23:07:40] *** Foaly <Foaly!~Foaly@ppp-88-217-58-16.dynamic.mnet-online.de> has quit IRC (Quit: Now 'mid shadows deep falls blessed sleep.)
[23:07:46] <toxictype> I have never used shaders before so idek
[23:08:11] <Stragus> Tutorial tutorial tutorial
[23:08:17] <toxictype> Computing the coordinates on the CPU seems easy enough.
[23:08:25] <toxictype> How do I translate pixel to gl coordinates?
[23:09:03] <derhass> you need to learn about the relevant coordinate systems first
[23:09:11] <toxictype> No I get that.
[23:09:12] <derhass> window space, ndc, clip space
[23:09:23] <toxictype> In pixel it's 0 to 1024 or what ever in gl it's -1 to 1 or something.
[23:11:31] <derhass> well, that is an over-simplification, but it might be enough to solve your current issue
[23:11:43] <toxictype> Exactly
[23:11:46] <toxictype> What is the math tho
[23:13:02] <derhass> it boils down to a simple linear equation
[23:13:25] <toxictype> :U
[23:14:27] <Stragus> Or you could learn how to supply an orthographic matrix as uniform so your vertex attributes can stick to pixels
[23:14:39] <Stragus> But you need to go through tutorials, it's too much basic stuff to cover here
[23:14:51] <toxictype> Is there a tutorial on that?
[23:15:37] <Stragus> This is the basic stuff tutorials start with, how to draw a triangle
[23:19:06] *** crankslider <crankslider!~slidercra@ircpuzzles/2015/april-fools/fifth/slidercrank> has joined ##OpenGL
[23:22:23] *** slidercrank <slidercrank!~slidercra@ircpuzzles/2015/april-fools/fifth/slidercrank> has quit IRC (Ping timeout: 246 seconds)
[23:22:55] *** upgrdman <upgrdman!~upgrdman@blender/artist/upgrdman> has quit IRC (Quit: Leaving)
[23:46:38] <toxictype> How do I apply a shader to this...
[23:46:41] <toxictype> Seems simplest.
[23:47:32] <derhass> you're already using a shader there
[23:47:41] <toxictype> It doesn't show up my shape.
[23:51:10] <derhass> nobody is able to tell you why exactly that is without the relevant code
[23:52:31] <Stragus> Your way of learning is far less efficient than following a tutorial that would explain everything you need
[23:54:11] <toxictype> derhass I got to where it draws my rectangle and I can also change its color.
[23:56:00] *** hellozee <hellozee!~hellozee@116.73.34.190> has joined ##OpenGL