Switch to DuckDuckGo Search
   November 28, 2014  
< | 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 | >

Toggle Join/Part | bottom
[00:00:12] *** shintah has quit IRC
[00:01:25] *** snakenerd has quit IRC
[00:02:17] *** kuldeepdhaka has joined ##OpenGL
[00:08:01] <kippo> hi i am wondering why glusphere doesn't draw
[00:08:55] *** paul424 has quit IRC
[00:09:10] <kippo> my sphere ocde http://ideone.com/hroTBT
[00:09:52] *** Zupoman has quit IRC
[00:10:06] *** Misu has quit IRC
[00:13:40] *** thetourist has joined ##OpenGL
[00:15:51] *** snakenerd has joined ##OpenGL
[00:18:31] *** snakenerd has quit IRC
[00:20:08] *** kuldeepdhaka has quit IRC
[00:23:53] *** kippo has quit IRC
[00:25:28] *** japro has quit IRC
[00:25:43] *** thetourist has quit IRC
[00:25:55] *** cranfield has quit IRC
[00:27:35] *** paperManu_ has joined ##OpenGL
[00:27:43] *** BitPuffin has quit IRC
[00:28:42] *** snakenerd has joined ##OpenGL
[00:29:46] *** bkre__ has quit IRC
[00:40:26] *** snakenerd has quit IRC
[00:44:25] *** det- has quit IRC
[00:44:34] *** det has joined ##OpenGL
[00:50:53] <bookmark> is writing to memory slower than reading from memory?
[00:51:25] <bookmark> nevermind ill ask in #programming channel
[00:55:00] *** timsche has joined ##OpenGL
[00:58:38] <glYoda> that depends
[00:59:10] <glYoda> what is "memory" in this context?
[01:00:01] <glYoda> i.e. CPU side L1? L2? L3? DRAM (i.e. "main memory" for instance), GPU mapped DRAM (i.e. "main memory" as well)?, local VRAM? …something else?
[01:00:04] *** terabit has joined ##OpenGL
[01:00:20] <terabit> chan needs +C
[01:00:34] <foobaz> writing to memory is faster, because it can be done asynchronously
[01:00:44] *** CodeGos3 has joined ##OpenGL
[01:00:46] <foobaz> when you read from memory, the processor has to block while it waits
[01:01:04] <CodeGos3> smoothstep(0.0, 1.0, x); does about the same thing as x*x*(3.0-2.0*x); right?
[01:01:48] <glYoda> foobaz again that depends
[01:04:17] <bookmark> foobaz do you have any additional link or information?
[01:04:29] <bookmark> becuase that sounds counter intuitive to me
[01:04:31] <glYoda> he's incorrect
[01:04:34] <glYoda> as per usual
[01:04:42] <glYoda> (at least in the more common cases)
[01:05:18] <bookmark> hmm
[01:05:42] <glYoda> you'll find that this is heavily dependent upon the cache policy used (assuming one is targeting CPU side I/O versus another device)
[01:06:30] <glYoda> and with that you'll typically find that writes are more expensive than reads
[01:07:37] <glYoda> but again this isn't always the case and there are a number of optimizations (i.e. write combining for instance) which will affect the outcome quite significantly
[01:10:56] <glYoda> and of course a WT cache policy would give one a fairly even delta for either case (i.e. W or R respectively)
[01:11:46] <glYoda> which is one of the reasons why it's fairly useful to discuss the underlying HW being targeted...
[01:15:14] *** paperManu_ has quit IRC
[01:15:54] *** paperManu_ has joined ##OpenGL
[01:16:37] *** Zupo has quit IRC
[01:17:17] *** Syzygy has joined ##OpenGL
[01:28:11] *** indefini has quit IRC
[01:28:48] *** Khlorghaal has quit IRC
[01:29:24] *** DrBenway has joined ##OpenGL
[01:30:04] *** konom has quit IRC
[01:35:01] *** jdolan has quit IRC
[01:35:44] *** jdolan has joined ##OpenGL
[01:36:07] *** Mango_Man has quit IRC
[01:40:51] *** Mango_Man has joined ##OpenGL
[01:44:19] *** b4b has joined ##OpenGL
[01:46:34] *** Lorcatar has joined ##OpenGL
[01:47:38] <Lorcatar> I am trying to follow the redbook tutorials. But when I build freeglut with mingw using./configure make all make install it only creates a .lib folder in the src directory. Why would they change it when it is pretty standard to have a lib folder and a include folder.
[01:50:01] *** derhass has quit IRC
[01:52:06] *** Crehl has quit IRC
[01:54:47] <Codex_> i'm installing header and lib to same dir, so there isnt any real standards how it should be done
[01:55:19] <Codex_> guess everyone does it different way
[01:56:40] *** indefini has joined ##OpenGL
[01:56:50] <Lorcatar> It doesn't matter where you put your libraries
[01:57:09] <Lorcatar> It matters if they want someone to compile the libraries from source.
[01:58:14] *** _BJFreeman has joined ##OpenGL
[02:00:49] *** TyrfingMjolnir has joined ##OpenGL
[02:00:57] *** _BJFreeman is now known as BJfreeman
[02:04:50] <Lorcatar> This webpage is bullshit http://freeglut.sourceforge.net/docs/install.php
[02:04:58] *** BitPuffin has joined ##OpenGL
[02:10:03] *** Lorcatar has quit IRC
[02:13:37] *** staylor_ has quit IRC
[02:16:51] *** BJfreeman has quit IRC
[02:19:50] <jeaye> Maybe if he ran an OS with a proper package manager, this wouldn't be an issue.
[02:26:19] *** centrinia has joined ##OpenGL
[02:27:04] *** Demon_Fox has quit IRC
[02:28:11] *** b4b has quit IRC
[02:28:17] *** Demon_Fox has joined ##OpenGL
[02:29:18] *** Keniyal has quit IRC
[02:30:59] *** konom has joined ##OpenGL
[02:32:16] *** Mango_Man has quit IRC
[02:33:52] *** b4b has joined ##OpenGL
[02:38:56] *** bookmark has quit IRC
[02:39:26] *** TyrfingMjolnir has quit IRC
[02:41:23] *** Ryp has joined ##OpenGL
[02:44:05] *** Ryp has quit IRC
[02:46:54] *** staylor_ has joined ##OpenGL
[02:47:47] *** Mango_Man has joined ##OpenGL
[02:52:50] *** razieliyo_ has quit IRC
[02:53:48] *** nekitu has quit IRC
[02:57:02] *** konom has quit IRC
[02:59:18] *** konom has joined ##OpenGL
[02:59:59] *** b4b has quit IRC
[03:03:01] *** CodeGos3 has quit IRC
[03:03:29] *** CodeGos3 has joined ##OpenGL
[03:08:57] *** shingshang has joined ##OpenGL
[03:15:13] *** Twinklebear has quit IRC
[03:22:54] *** realz_ has joined ##OpenGL
[03:23:01] *** matpow2 has joined ##OpenGL
[03:23:02] *** Baldwin__ has joined ##OpenGL
[03:23:09] *** suppahasrv has joined ##OpenGL
[03:23:18] *** ruuns has quit IRC
[03:24:42] *** jbud has joined ##OpenGL
[03:26:15] *** mat^2 has quit IRC
[03:26:15] *** realz has quit IRC
[03:26:44] *** Baldwin_ has quit IRC
[03:26:44] *** suppahsrv has quit IRC
[03:28:01] *** BitPuffin has quit IRC
[03:29:40] *** realz_ has quit IRC
[03:29:40] *** realz_ has joined ##OpenGL
[03:30:09] *** realz_ is now known as realz
[03:31:07] *** Mango_Man has quit IRC
[03:34:34] *** ValicekB has quit IRC
[03:37:43] *** ValicekB has joined ##OpenGL
[03:42:40] *** timsche has quit IRC
[03:42:50] *** TyrfingMjolnir has joined ##OpenGL
[03:47:14] *** Mango_Man has joined ##OpenGL
[03:47:30] *** TyrfingMjolnir has quit IRC
[03:49:25] *** TyrfingMjolnir has joined ##OpenGL
[03:49:32] *** Hunts has joined ##OpenGL
[03:50:47] *** CodeGos3 has quit IRC
[03:51:14] *** CodeGos3 has joined ##OpenGL
[03:52:55] *** HuntsMan has quit IRC
[03:55:46] *** bookmark has joined ##OpenGL
[03:55:47] <bookmark> sup
[03:56:15] <bookmark> anyone know how to get the luminance in glsl is it just an average of r g b?
[03:57:07] <roboman2444> eh, pretty much
[03:57:15] <bookmark> right sorry
[03:58:26] <roboman2444> i mean, you can do many things with it
[03:58:29] <roboman2444> weighted averages
[03:58:34] <roboman2444> taking the max
[03:58:35] <roboman2444> etc
[03:58:48] *** urraka has quit IRC
[04:02:43] *** MLM_ has joined ##OpenGL
[04:12:26] *** TyrfingMjolnir has quit IRC
[04:14:28] *** Ad1 has quit IRC
[04:21:33] *** Zerflag has joined ##OpenGL
[04:21:36] *** samrat has joined ##OpenGL
[04:21:53] *** DolpheenDream has joined ##OpenGL
[04:24:30] *** Khlorghaal has joined ##OpenGL
[04:28:53] *** jdolan has quit IRC
[04:34:28] *** RyanPridgeon_ has quit IRC
[04:36:03] *** TyrfingMjolnir has joined ##OpenGL
[04:37:36] *** cwkx has joined ##OpenGL
[04:38:14] *** Orion] has quit IRC
[04:39:04] <cwkx> hi, I have two fbo's - one for the scene, and one for the gui, then a full-screen shader to combine both. Strangely, my GUI fbo tex only gets displayed for one frame on startup, any thoughts?
[04:42:54] *** TyrfingMjolnir has quit IRC
[04:44:51] *** paperManu_ has quit IRC
[04:46:30] *** jdolan has joined ##OpenGL
[04:47:39] *** TyrfingMjolnir has joined ##OpenGL
[04:49:38] <roboman2444> cwkx, why not render the GUI directly to the backbuffer?
[04:51:03] *** Cabanossi has quit IRC
[04:51:30] *** jdolan has quit IRC
[04:51:51] *** TyrfingMjolnir has quit IRC
[04:51:56] <chrisf> roboman2444: i dont know the details of his situation, but ive done similar things to be able to decouple the gui draw rate and/or resolution from the game rendering
[04:52:12] <roboman2444> like FSAA the gui?
[04:52:38] <cwkx> yeah I wanted to be able to have control of the resolution and do some postprocessing on the GUI, + i'm unfamiliar with backbuffer
[04:53:04] <chrisf> roboman2444: if your gui takes many batches, and most of the time is identical to the last frame...
[04:53:19] *** TyrfingMjolnir has joined ##OpenGL
[04:53:21] <cwkx> I have no idea why it just displays for one frame at startup then displays a black texture though
[04:53:27] *** Cabanossi has joined ##OpenGL
[04:53:51] <roboman2444> chrisf, could be, but you are likely gonna have more texture fetches and pixel drawing for most things
[04:54:20] <chrisf> roboman2444: depends on the ui complexity of course.
[04:56:46] <chrisf> if it's a modern absurdity like... a browser :)
[04:58:53] *** slime has quit IRC
[04:59:21] *** kapil__ has joined ##OpenGL
[04:59:32] *** bb010g has joined ##OpenGL
[05:00:20] *** xissburg has quit IRC
[05:03:39] *** Zerflag has quit IRC
[05:08:13] *** CodeGos3 has quit IRC
[05:08:43] *** CodeGos3 has joined ##OpenGL
[05:09:59] *** b4b has joined ##OpenGL
[05:10:20] <roboman2444> cwkx, paste code?
[05:10:43] <cwkx> ok 1 min
[05:13:14] *** Garner has quit IRC
[05:15:01] <cwkx> roboman2444, relevant code: http://pastebin.com/Sz6BHUCN
[05:17:05] <roboman2444> could be you switch to texture unit 1 and not back to 0 before you render the ui again
[05:17:56] <cwkx> you mean in RenderCombine() ?
[05:18:24] *** staylor_ has quit IRC
[05:19:50] <roboman2444> ye
[05:20:16] <roboman2444> you do any texturing outside of renderCombine?
[05:20:54] <cwkx> I tried sticking: glActiveTexture(GL_TEXTURE0);
[05:20:54] <cwkx> glBindTexture(GL_TEXTURE_2D, 0); after, but same thing
[05:21:23] *** terabit has quit IRC
[05:22:34] <cwkx> a gui texture gets sent, but to unit 0
[05:22:35] *** glYoda has quit IRC
[05:22:58] *** glYoda has joined ##OpenGL
[05:26:30] *** Syzygy has quit IRC
[05:30:42] *** TyrfingMjolnir has quit IRC
[05:34:29] *** terabit has joined ##OpenGL
[05:39:50] *** [1]asido has joined ##OpenGL
[05:39:57] *** asido has quit IRC
[05:41:27] *** slime has joined ##OpenGL
[05:42:07] *** samrat has quit IRC
[05:52:38] *** hahuang65 has joined ##OpenGL
[05:52:49] *** qeed has quit IRC
[05:58:22] *** CodeGos3 has quit IRC
[05:58:48] *** CodeGos3 has joined ##OpenGL
[05:59:15] *** BreadProduct has joined ##OpenGL
[06:00:46] *** TyrfingMjolnir has joined ##OpenGL
[06:00:46] *** suppahasrv has quit IRC
[06:01:05] *** suppahsrv has joined ##OpenGL
[06:13:09] *** MLM_ has quit IRC
[06:14:55] *** Mango_Man has quit IRC
[06:15:04] <b4b> anyone trample someone to death tonite for the black friday gpu deals?
[06:19:21] *** asido has joined ##OpenGL
[06:21:06] *** [1]asido has quit IRC
[06:25:48] *** Zerflag has joined ##OpenGL
[06:28:10] <roboman2444> ye
[06:29:00] *** asido has quit IRC
[06:29:51] *** asido has joined ##OpenGL
[06:30:17] *** TyrfingMjolnir has quit IRC
[06:31:29] *** samrat has joined ##OpenGL
[06:40:34] *** metredigm has joined ##OpenGL
[06:47:03] *** metredigm has left ##OpenGL
[06:49:20] *** b4b has quit IRC
[06:51:30] *** BlackFox has quit IRC
[06:51:46] <Codex_> what are some features that should be included to a 2d/3d library? I'm running out of ideas of what to add.
[06:54:04] <Codex_> ideal would be some new useful data structure.
[07:04:19] *** sparky has quit IRC
[07:04:38] *** sricharanized has joined ##OpenGL
[07:04:45] *** roxlu has joined ##OpenGL
[07:06:15] <slime> making something that uses it is a good way to know what's missing ånd what needs to be changed
[07:06:20] <slime> and *
[07:07:02] <Codex_> i've been writing test code
[07:07:27] <Codex_> get pretty ok results that way
[07:07:46] *** CodeGos3 has quit IRC
[07:08:12] *** CodeGos3 has joined ##OpenGL
[07:09:08] <Codex_> i have one gap in my plan, but nv_path_rendering didnt work, so i couldnt write proper 2d shapes code
[07:09:51] *** Zupo has joined ##OpenGL
[07:10:02] <Codex_> so I currently cannot render those shapes to screen
[07:10:22] *** metredigm has joined ##OpenGL
[07:11:54] *** sricharanized has quit IRC
[07:12:06] *** foreignFunction has joined ##OpenGL
[07:12:12] *** Demon_Fox has quit IRC
[07:12:58] *** sricharanized has joined ##OpenGL
[07:15:37] *** Baldwin__ has quit IRC
[07:16:14] *** shintah has joined ##OpenGL
[07:16:18] *** hahuang65 has quit IRC
[07:18:25] *** Twinklebear has joined ##OpenGL
[07:25:07] *** Lemml has joined ##OpenGL
[07:26:51] *** Ad1_RnR has joined ##OpenGL
[07:30:22] *** sricharanized has left ##OpenGL
[07:30:23] *** Ad1_RN has quit IRC
[07:34:38] *** DolpheenDream has quit IRC
[07:36:22] *** jdolan has joined ##OpenGL
[07:37:15] *** foreignFunction has quit IRC
[07:38:36] *** BreadProduct_ has joined ##OpenGL
[07:40:24] *** BreadProduct has quit IRC
[07:40:38] *** BreadProduct_ is now known as BreadProduct
[07:40:57] *** jdolan has quit IRC
[07:45:34] *** lenarhoyt has quit IRC
[07:50:06] *** neure has joined ##OpenGL
[07:53:40] *** MLM_ has joined ##OpenGL
[07:55:35] *** jbud has quit IRC
[07:56:43] *** MLM_ has quit IRC
[07:57:05] *** MLM_ has joined ##OpenGL
[08:01:15] <cwkx> i'm still stuck on the same problem from earlier; been about 5 hours now and tried everything I can think of. http://pastebin.com/Sz6BHUCN - just draws the GUI for one frame then it clears and doesn't show it again.. grr
[08:03:24] <Adrinael> Use apitrace, inspect the state at the working drawcalls and not-working
[08:05:23] <cwkx> its always not working; even if I just draw it with one fbo (without drawing the scene) the same thing occurs
[08:05:35] *** MLM_ is now known as MLM
[08:06:04] <Adrinael> You said there's one frame where it works
[08:06:13] <cwkx> ah ok, will look at apitrace
[08:10:03] *** Demon_Fox has joined ##OpenGL
[08:12:23] *** BlackFox has joined ##OpenGL
[08:12:56] *** CodeGos3 has quit IRC
[08:20:46] *** bookmark has quit IRC
[08:23:11] *** clauswitt has joined ##OpenGL
[08:26:33] <neure> cwkx, do you use depth buffer?
[08:27:17] <neure> i see you do not clear depth buffer, only color, on line 259
[08:27:35] <neure> you do disable depth test though
[08:27:35] <cwkx> neure, nope - ray tracing to texture fbo + gui fbo combined to output shader
[08:28:14] <cwkx> (apitrace just says "failed to exectute" on this application)
[08:28:39] <neure> why do you gen* in render() ?
[08:28:53] <neure> typically you are not supposed to do gen calls in render function
[08:29:15] <neure> you prepare objects at init/load time
[08:29:18] <neure> not in the render function
[08:29:27] <cwkx> oh yeah, that was a mistake - removed but same problem
[08:29:57] <neure> so what is your latest code like?
[08:30:08] <cwkx> like that, now minus the two gen calls :)
[08:30:29] <neure> probably not right
[08:31:50] <cwkx> (I had already generated those two vbo's in init, they were just for the full-screen triangle - so removing was just redundant call)
[08:31:56] *** xgearx has joined ##OpenGL
[08:32:39] <neure> well
[08:32:45] <neure> you should also not call bufferdata in render
[08:33:08] <neure> also calling getuniformlocation in render is pointless
[08:33:23] <neure> do those in init
[08:33:43] <neure> also vertex attrib pointer stuff belongs to init, you are using VAO, after all
[08:34:05] <neure> i think your mistakes are most likely due to incorrect VAO usage
[08:34:26] <cwkx> but that part works, surely the problem is due to the fbo/textures ?
[08:34:36] *** TyrfingMjolnir has joined ##OpenGL
[08:34:41] <cwkx> I was doing glCheckErrors and it says its fine
[08:34:54] <neure> fine in the sense that there are no GL API errors
[08:35:11] <neure> you can still do something that is valid in GL API, but not what you should do
[08:35:13] <Bloodust> glGetError is often quiet :P
[08:36:13] <neure> GL does not detect if you do something else that you wanted
[08:36:31] <neure> it only detects violating the listed errors
[08:37:35] <cwkx> if I move
[08:37:35] <cwkx> glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW); outside to init, the full-screen triangle doesn't render properly
[08:38:56] *** Garner has joined ##OpenGL
[08:42:03] *** lenarhoyt has joined ##OpenGL
[08:42:54] <neure> ImImpl_RenderDrawLists() looks weird
[08:43:03] <neure> it copies the vertex data?
[08:43:06] <neure> that is silly
[08:43:15] <neure> you should write the data directly to the buffer
[08:43:18] <neure> use glMapBufferRange()
[08:43:37] <neure> oh wait
[08:43:39] <neure> you do
[08:43:40] <neure> but
[08:43:47] <neure> you still do a copy
[08:44:09] <neure> how many VAOs you have?
[08:44:50] <cwkx> ones from the gui code: https://github.com/ocornut/imgui and the other is for drawing the full-screen triangle, used in two places (for the raycaster and the final composit pass)
[08:47:06] *** lenarhoyt has quit IRC
[08:52:56] *** Gamecubic has quit IRC
[08:56:36] *** prophile has joined ##OpenGL
[09:00:42] *** Beetny has joined ##OpenGL
[09:01:03] *** clauswitt has quit IRC
[09:04:56] <cwkx> fixed it! finally, you were right neure - I had copied the code from the imgui sample not realising they had also named their vao "Gluint vao" which was conflicitng my Gluint vao from the triangle... thanks!
[09:09:08] *** konom_ has joined ##OpenGL
[09:09:13] *** PasNox has joined ##OpenGL
[09:11:56] *** konom has quit IRC
[09:11:58] *** konom_ is now known as konom
[09:13:18] *** Baldwin has joined ##OpenGL
[09:14:00] *** zajfy has quit IRC
[09:16:41] *** PasNox_ has joined ##OpenGL
[09:18:42] *** Twinklebear has quit IRC
[09:19:27] <neure> nice
[09:21:00] *** PasNox has quit IRC
[09:21:08] *** PasNox_ is now known as PasNox
[09:27:02] *** samrat has quit IRC
[09:27:24] *** xbx has joined ##OpenGL
[09:29:52] *** Waynes has joined ##OpenGL
[09:32:07] *** dusted has quit IRC
[09:32:25] *** samrat has joined ##OpenGL
[09:35:04] *** razieliyo has joined ##OpenGL
[09:35:13] *** Cooler has joined ##OpenGL
[09:35:17] *** razieliyo has quit IRC
[09:35:17] *** razieliyo has joined ##OpenGL
[09:35:54] <Cooler> I just can't seem to get if else working in GLSL
[09:36:49] <Cooler> anybody good at GLSL?
[09:37:05] <Bloodust> ask
[09:37:48] <Cooler> in the fragment shader
[09:38:00] <Cooler> i am using 2 samplers
[09:38:09] <Cooler> to sample 2 textures
[09:38:30] <Cooler> then return one of the values to outColor based on a value
[09:38:34] <Cooler> using if else
[09:39:10] <Cooler> it just won't work though
[09:39:22] <Cooler> it just renders nothing just a black screen
[09:39:41] <Bloodust> could be non uniform flow control https://www.opengl.org/wiki/Sampler_%28GLSL%29#Non-uniform_flow_control
[09:39:49] <Cooler> yeah i read that
[09:40:03] <Cooler> the texture access is happening outside the if else
[09:40:29] <Bloodust> okey, pastebin the shader
[09:41:29] <Cooler> https://github.com/CoolerExtreme/Cards/blob/master/src/main/java/com/cooler/cool/Util/Shaders/FragmentShader.shader
[09:42:20] <Bloodust> should be just fine
[09:42:39] <Cooler> Well yeah it "should" be
[09:42:47] *** lenarhoyt has joined ##OpenGL
[09:43:24] <Bloodust> the shader is solid, theres nothign wrong with it
[09:43:52] <Bloodust> does it work with just outColor = texture(texArray, vec3(texCoords.xy, 0)); ?
[09:45:20] <Cooler> yes, but its texture(texArray, texCoords)
[09:45:34] <Cooler> the z is the layer it access
[09:46:40] <Bloodust> well, theres nothign wrong with your code
[09:47:30] <Cooler> however it doesn't work with texture(texAtlas, texCoords.xy)
[09:47:35] <Cooler> its just black
[09:47:46] *** lenarhoyt has quit IRC
[09:48:33] *** Alina-malina has quit IRC
[09:49:35] *** Alina-malina has joined ##OpenGL
[09:49:36] *** Alina-malina has quit IRC
[09:49:36] *** Alina-malina has joined ##OpenGL
[09:50:14] <Bloodust> did you generate mipmaps for both textures or change filters?
[09:50:54] <Cooler> uh no
[09:51:06] <Cooler> filters are set to linear filtering
[09:51:17] <Bloodust> linear or linear mipmap?
[09:52:00] <Cooler> https://github.com/CoolerExtreme/Cards/blob/master/src/main/java/com/cooler/cool/Util/Textures.java#L41-L53
[09:54:06] <Bloodust> your atlas is missing storage
[09:54:36] <Cooler> how do i assign storage?
[09:54:39] <Bloodust> you never call glTexImage2D or glTexStorage2D to it
[09:54:59] <Cooler> i call glTexSubImage2d
[09:55:06] <Bloodust> thats not enough
[09:55:23] <Bloodust> TexSubImage2D doesnt allocate memory
[09:55:34] <Bloodust> it only accesses the already allocated memory
[09:58:44] <Cooler> updated it:https://github.com/CoolerExtreme/Cards/blob/master/src/main/java/com/cooler/cool/Util/Textures.java#L52
[09:59:19] <Cooler> still black though with just texture(texAtlas, texCoords.xy)
[10:00:40] <slime> levels should be at least 1
[10:00:56] <slime> (the second argument to glTexStorage2D)
[10:01:24] *** telex has quit IRC
[10:01:25] <slime> using 0 will generate a GL_INVALID_VALUE error
[10:01:32] <Cooler> yeah i just saw that
[10:01:42] <Cooler> still black
[10:02:38] *** telex has joined ##OpenGL
[10:07:13] *** nekitu has joined ##OpenGL
[10:12:16] *** Cooler has quit IRC
[10:12:22] *** razieliyo has joined ##OpenGL
[10:12:22] *** razieliyo has joined ##OpenGL
[10:12:28] *** razieliyo has quit IRC
[10:14:48] *** Cooler has joined ##OpenGL
[10:16:21] <Cooler> i think i got dced
[10:17:10] <Cooler> slime: Bloodust the textures are rendered when using texture(texArray, texCoords) only
[10:17:38] <Cooler> but nothing gets rendered when using texture(texAtlas, texCoords.xy)
[10:18:20] <slime> have you verified that no errors are generated?
[10:18:41] <Cooler> glErrors? no
[10:20:24] <slime> do you ever use glUniform1i with the location of your sampler uniforms to set the uniform's texture unit index?
[10:20:31] *** Hunts has quit IRC
[10:21:12] <slime> e.g. glUniform1i(glGetUniformLocation("texAtlas"), texAtlasTextureUnitIndex); when the shader program is active
[10:25:43] <Cooler> slime: https://github.com/CoolerExtreme/Cards/blob/master/src/main/java/com/cooler/cool/Util/Shaders/Shaders.java#L66-L89
[10:26:11] <slime> I'm not sure you can use glUniform1f with a sampler uniform
[10:26:28] <Cooler> well it works for array texture
[10:26:39] <slime> "glUniform1i and glUniform1iv are the only two functions that may be used to load uniform variables defined as sampler types. Loading samplers with any other function will result in a GL_INVALID_OPERATION error."
[10:27:17] <slime> (be sure to either liberally use glGetError, or create a debug context and use the debug callback functionality if your driver supports it)
[10:27:29] <Cooler> weird the texArray sampler2DArray works just fine though
[10:27:42] <slime> sampler uniforms default to sampler index 0
[10:27:48] <Cooler> oh
[10:28:16] <slime> er, texture unit index 0, whatever
[10:28:18] <Cooler> so what do yoou use if for?
[10:28:23] <Cooler> 1f*
[10:28:33] <slime> float uniform variables
[10:28:54] <slime> (either a single float or an array of floats)
[10:29:27] <slime> and glUniform2f for vec2, etc.
[10:32:00] <Cooler> well its still black
[10:32:08] <slime> are you checking for opengl errors yet?
[10:32:18] *** redeemed has joined ##OpenGL
[10:32:38] *** Burga has joined ##OpenGL
[10:33:01] <Cooler> https://github.com/CoolerExtreme/Cards/blob/master/src/main/java/com/cooler/cool/Util/Shaders/Shaders.java#L68-L92
[10:33:03] <Cooler> yeah
[10:33:30] <Cooler> oh wait
[10:33:31] <Cooler> ERROR - setting Uniform texAtlas: Operation illegal in current state
[10:34:23] <slime> glUniform needs glUseProgram on the shader program object to be called before the glUniform call
[10:35:47] <slime> (so you should do shader.bind() before shader.setUniform(..)
[10:35:48] <slime> )
[10:36:57] <Cooler> oh right
[10:37:39] <slime> if you use the glProgramUniform versions of the functions you don't need to do that, but they were only added in recent GL versions
[10:38:35] <Cooler> its working
[10:38:37] <Cooler> woohoo
[10:38:42] <Cooler> thanks a lot
[10:38:49] <slime> nice
[10:40:32] <Cooler> and the if else condition is working too
[10:40:36] <Cooler> nice
[10:43:31] *** jack-zhang has joined ##OpenGL
[10:43:32] *** lenarhoyt has joined ##OpenGL
[10:45:32] *** prophile has quit IRC
[10:45:38] *** jack-zhang has quit IRC
[10:48:01] <Cooler> if you are rendering a bunch of 2d objects that overlap
[10:48:09] <Cooler> which goes in front?
[10:48:23] <Cooler> how are they ordered?
[10:48:31] <slime> assuming no depth-buffering, it's back-to-front
[10:48:43] <slime> as in, the first thing to be drawn is at the back
[10:48:43] *** lenarhoyt has quit IRC
[10:48:59] <dahlia> or the order you draw them in
[10:49:47] <dahlia> ya what slime said (I misread it)
[10:49:50] <Cooler> well depth buffering is enabled by default isn't it?
[10:50:17] <dahlia> disable it
[10:50:28] <slime> depth testing/depth writes are disabled by default IIRC
[10:51:29] <Cooler> so if i wanted to use their z position, instead of worrying about the order they are drawn in
[10:51:29] *** prophile has joined ##OpenGL
[10:51:44] <Cooler> i have to enable GL_DEPTH_MASK?
[10:52:18] <slime> using the native depth buffer functionality for 2D blended sprites is generally a bad idea
[10:53:00] *** Hadrien has joined ##OpenGL
[10:53:48] <slime> for normal alpha blending, you'll have to draw everything in back-to-front order anyway, plus the depth buffer doesn't care about varying opacity and you'd have to do extra work to make it know about 0 opacity in sprites as well
[10:54:15] *** Jeffreims has joined ##OpenGL
[10:54:50] <slime> (it's also worth mentioning that overlapping primitives in the same draw call also follow the ordering that their vertices are in inside their buffer)
[10:55:41] <slime> or rather, they follow the order of the vertex element array, which is implicitly {0, 1, 2, 3, ...} for glDrawArrays
[10:55:59] <dahlia> how about instanced?
[10:56:09] <dahlia> is there an order?
[10:56:22] <slime> same deal i think
[10:56:50] <Cooler> wait so what would happen if i just enabled depth_mask?
[10:56:52] <dahlia> I mean which instance gets drawn first?
[10:56:58] <slime> the first one
[10:57:07] <Cooler> they would still render in the order they are drawn?
[10:57:54] <Cooler> the zposition wouldn't be taken into account?
[11:01:01] *** clauswitt has joined ##OpenGL
[11:01:43] <Cooler> do you mean the pixels that overlap will get culled by zbuffering regardless of the opacity of the texture?
[11:02:01] *** Plasmastar has quit IRC
[11:02:11] <slime> yes
[11:02:37] <slime> (unless you use the 'discard' keyword in the shader, in which case it's still binary)
[11:02:54] <Cooler> so i have to sort the objects by z position before adding them to be drawn
[11:03:09] *** MLM has quit IRC
[11:03:17] <Cooler> what does discard do?
[11:03:38] *** fatalhalt has joined ##OpenGL
[11:04:06] *** Plasmastar has joined ##OpenGL
[11:05:23] *** snakenerd has joined ##OpenGL
[11:06:16] *** wutata has joined ##OpenGL
[11:11:39] *** snakenerd has quit IRC
[11:11:53] <dahlia> Cooler: it tells the shader to not output anything
[11:13:53] *** TyrfingMjolnir has quit IRC
[11:14:29] *** jokoon has joined ##OpenGL
[11:16:44] <Cooler> where would you use discard?
[11:17:44] <dahlia> well I use it sometimes when drawing with alpha textures
[11:17:48] *** bookmark has joined ##OpenGL
[11:17:55] <bookmark> sup
[11:17:57] <dahlia> if the alpha is below some threshold I discard
[11:18:03] <bookmark> check out what i did: http://youtu.be/1Wk7NM2GJtM
[11:18:06] <bookmark> animated neon
[11:18:53] <dahlia> yay neon!
[11:18:59] <bookmark> yeah huh :D
[11:19:06] <bookmark> im hype about this
[11:19:16] <bookmark> it was a blast to code it :)
[11:19:24] <dahlia> :)
[11:19:36] <Bloodust> :DDD
[11:19:37] <dahlia> make it breakdance :D
[11:19:45] <bookmark> lol yeah
[11:19:51] <bookmark> that would be hard man
[11:20:05] <AbigailBuccaneer> Cooler, it's typically used to draw opaque objects (ie. ones which write to the depth buffer) with holes in
[11:20:18] *** prophile has quit IRC
[11:20:25] <bookmark> i shaded the glow with a vertex shader
[11:20:28] <AbigailBuccaneer> the difference between "discard" and using blending and outputting zero alpha is that it doesn't write to the depth/stencil buffer
[11:20:52] *** navitsu has joined ##OpenGL
[11:21:09] *** Jeffreims has quit IRC
[11:21:11] <Bloodust> bookmark whats the name of the song? :D
[11:21:30] <bookmark> i dunno i had digitally imported breaks playing
[11:21:35] <Madsy> AbigailBuccaneer: Outputting zero alpha writes to the color buffer as well
[11:21:52] <bookmark> i don't usually do that except on short clips
[11:21:55] <Bloodust> which channel on di.fm?
[11:22:00] <bookmark> breaks
[11:22:09] <Bloodust> ah there it is
[11:22:13] <bookmark> they play some good stuff
[11:22:32] <AbigailBuccaneer> Madsy, not if you set the blend mode to something appropriate?
[11:22:53] <AbigailBuccaneer> (i mean it does write to it but it'll write what was already there)
[11:22:55] *** Thandruil has quit IRC
[11:23:10] <Madsy> AbigailBuccaneer: Why would that matter? The blend equation and blend function only controls how the results are combined
[11:23:49] <Madsy> Unless the driver optimizes special combinations like zero for source or destination factors. But that's besides the point
[11:24:27] <AbigailBuccaneer> Madsy, i'm not entirely sure what you're getting at - if, for example, you use the typical GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA blending, then any fragment shader results with 0 alpha won't change the value of that fragment in the relevant colour attachment
[11:24:45] *** Thandruil has joined ##OpenGL
[11:25:02] <AbigailBuccaneer> and while this is technically writing to the color attachment, i merely mean to say that it won't *change* the colour attachment
[11:25:07] <Madsy> AbigailBuccaneer: You're mistaking the result for the actual process
[11:25:26] <bookmark> what i did was just exported 30 versions of the map with different vertex colors but it was still only 610 kilobytes
[11:25:28] <AbigailBuccaneer> i understand the process, i merely meant to explain the result :)
[11:26:32] *** Zerflag has quit IRC
[11:28:23] <dahlia> bookmark: sounds painful
[11:28:28] <bookmark> why?
[11:28:39] <bookmark> its a rad way to do it
[11:28:48] <bookmark> much smaller than a texture
[11:28:51] <dahlia> oh well ok rad helps :)
[11:29:28] <bookmark> it has a texture lightmap that i multiply it by
[11:29:40] <bookmark> that makes the letters
[11:30:36] <bookmark> those might need some special consideration when making UVs to give the neon enough texture space
[11:31:05] <bookmark> anyway it works :P
[11:31:06] *** indefini has quit IRC
[11:32:20] <bookmark> each color would have been a dot product if i used dynamic lighting
[11:32:37] <bookmark> and this way i can light the whole map with zero dot products in the shader
[11:33:29] <bookmark> only real problem is that the animations will grow in size as i get greedy with them
[11:33:38] <bookmark> and as map sizes grow
[11:33:53] <Cooler> is there some function to draw the objects in order of farthest to nearest (z pos) ?
[11:34:06] <Bloodust> Cooler sort them
[11:34:08] <Bloodust> and no
[11:34:13] <bookmark> distance formula
[11:34:28] <bookmark> and sort them
[11:35:05] <Cooler> Bloodust: well fortunately java collections have a sort function
[11:35:25] <Bloodust> but unfortunately its java
[11:35:30] <jophish> AbigailBuccaneer: here?
[11:35:49] <jophish> Emma ate some of your Chocolate Orange
[11:35:50] <Cooler> Bloodust: why does that matter?
[11:35:56] <jophish> I'm so sorry
[11:36:13] <Bloodust> it doesnt, Im just messing with java users
[11:39:01] <bookmark> damn i just filled my vape tank with liquid thats way super to strong whoops
[11:39:19] *** Crehl has joined ##OpenGL
[11:39:25] <Bloodust> umm what
[11:39:27] <bookmark> nothin
[11:44:20] *** lenarhoyt has joined ##OpenGL
[11:46:25] *** Cooler has quit IRC
[11:49:06] *** navitsu has quit IRC
[11:49:08] *** lenarhoyt has quit IRC
[11:51:48] *** fatalhalt has quit IRC
[11:55:37] <xgearx> Bloodust: I have issue with drawing image texture (rectangle) using glDrawArrays. Problem - texture have incorrect width and height ratio an size (smaller). But when i use glDrawTexfOES with same parameters - everything is pixel-perfect. Here is code http://pastebin.com/0W7CGxNk .
[11:56:28] <Bloodust> so you dont know how to scale the texture correctly?
[11:56:31] <Bloodust> I mean the quad
[11:56:49] <xgearx> i don't need scale
[11:57:00] <xgearx> i just want draw it as is
[11:57:29] <Bloodust> you need to scale the quad so the texture fits it perfectly
[11:57:33] <xgearx> but when i use glDrawArrays - proportions are incorrect
[11:58:34] <xgearx> I did not know it, how i can do it?
[11:58:58] <Bloodust> you have to scale the quad according to your screens resolution and texture resolution
[12:01:09] <xgearx> but when i draw texture using code a have pasted - i don't see perfect squad
[12:01:24] *** hahuang65 has joined ##OpenGL
[12:01:32] <xgearx> as i now understend it should look like texture fits squad
[12:01:35] *** ikrima has quit IRC
[12:01:42] <xgearx> but it isn't
[12:01:46] <Bloodust> example, your window is 1024*512 and you texture is 512x512, how big quad do you have to draw so that the texture fits the screen pixel perfectly
[12:02:16] <Bloodust> assuming default opengl coordinate system, -1,-1 to +1,+1
[12:02:26] <cwkx> my ray tracer shader keeps crashing the GPU (nvidia 550M, windows 7 x64, latest drivers) - is there a log somewhere to find out the problem?
[12:02:53] * bookmark runs away
[12:03:06] <xgearx> Bloodust: but i put coordinates in mSquareVerticesBuffer
[12:03:33] <xgearx> i thought that I think that should be enough
[12:04:44] <xgearx> which methods i should call to fit my quad to texture (rectangle)
[12:05:05] <xgearx> additionally to my mSquareVerticesBuffer
[12:05:53] <Bloodust> the coordinates you put to mSquareVerticesBuffer are not correct in your case
[12:06:03] *** hahuang65 has quit IRC
[12:06:28] <Bloodust> are you using custom projection matrix?
[12:06:41] <Bloodust> glOrtho/glOrtho2D or something like thaT?
[12:07:08] <xgearx> gl.glMatrixMode(GL10.GL_PROJECTION);
[12:07:21] <xgearx> gl.glOrthof(.0f, mSurfaceWidth, .0f, mSurfaceHeight, -1.f, 1.f);
[12:07:24] <xgearx> this
[12:08:11] <xgearx> mSurfaceWidth mSurfaceHeight - gl surface (android)
[12:11:15] *** Hadrien has quit IRC
[12:13:27] <xgearx> Bloodust: and this gl.glViewport(0, 0, mSurfaceWidth, mSurfaceHeight);
[12:19:01] <jophish> AbigailBuccaneer: I just opened some code and upon first glance thought "How did I open this stl file?"
[12:19:07] <jophish> I think I've gone template mad again
[12:20:12] <AbigailBuccaneer> all the code i'm writing at the moment is so delightfully underarchitected. working without regards to object-orientation is causing me to produce simpler code faster
[12:21:23] <jophish> Haskell?
[12:21:35] <AbigailBuccaneer> c++
[12:21:38] <bookmark> i just ignore inheritance since it mostly can be faked and i use structs instead of classes, i find just doing that helps me
[12:21:45] <AbigailBuccaneer> but you know, c++ on That One Project
[12:21:57] *** centrinia has quit IRC
[12:22:19] <AbigailBuccaneer> i think most of the friction of using design patterns is that the rest of That One Project is so woefully lacking that it's better to just roll with it
[12:22:23] *** Demon_Fox has quit IRC
[12:22:57] <jophish> bookmark: yeah, I always use 'struct' instead of 'class'. Most compilers are trained not to optimize classes as much to help maintain type 'safety'
[12:23:22] <AbigailBuccaneer> wait what? honestly?
[12:23:24] <Adrinael> what
[12:23:30] <AbigailBuccaneer> that sounds made up
[12:23:39] <AbigailBuccaneer> are you telling porky-pies again joe
[12:23:42] <bookmark> i couldn't have made lightmaps work using classes, i wrote them yesterday and thats how i made it work was i got rid of my class structure entirely
[12:24:26] <bookmark> it declares the data in the wrong order in regards to certain functions
[12:25:01] <bookmark> where structs you can disassociate the data from the function declaration order
[12:25:08] <jophish> I have a git commit hook saying: sed -i 's|class|struct // no!|g'
[12:25:38] <Adrinael> I don't believe you
[12:25:47] <jophish> AbigailBuccaneer: You should tell Kevin that the codebase has a lot of class and run away laughing under your breath
[12:26:28] <jophish> bookmark: I try to use as little data as possible in structs, only pointers to global variables
[12:26:30] <bookmark> does he have mutliple textures and lightmaps
[12:26:51] <bookmark> mutiple textures on one object i mean
[12:26:52] <jophish> bookmark: Kevin has so many textures, you won't believe your eyes
[12:27:00] <jophish> as many as 5 sometimes
[12:27:13] <jophish> He doesn't believe in lightmaps though
[12:28:01] <bookmark> there are certain scenarios where the locking down of declaration order that classes demands can ruin a design from completion
[12:28:16] <bookmark> demand
[12:28:18] <bookmark> whatever
[12:29:47] <bookmark> thats my rant on OOP
[12:29:53] *** TyrfingMjolnir has joined ##OpenGL
[12:30:17] *** ozette has joined ##OpenGL
[12:30:19] *** ozette has joined ##OpenGL
[12:36:16] *** Burga has quit IRC
[12:37:05] <xgearx> Bloodust: i found this, i think it is related to my problem http://gamedev.stackexchange.com/questions/59985/how-to-scale-opengl-textures-by-a-ratio-based-on-height-width-or-alternative
[12:37:18] *** Zerflag has joined ##OpenGL
[12:37:34] *** Keniyal has joined ##OpenGL
[12:41:40] *** Zerflag has quit IRC
[12:42:20] *** jokoon has quit IRC
[12:44:12] *** centrinia has joined ##OpenGL
[12:44:16] <xgearx> So when i draw quad image - it draws smaller that it is, when i draw rectangle image - w/h ratio fail
[12:45:05] *** lenarhoyt has joined ##OpenGL
[12:49:55] *** lenarhoyt has quit IRC
[12:56:05] *** cwkx has quit IRC
[12:59:16] *** Match has joined ##OpenGL
[13:05:27] *** Crehl has quit IRC
[13:12:15] *** paperManu_ has joined ##OpenGL
[13:13:26] *** Adrinael has quit IRC
[13:23:38] *** shintahW2 has joined ##OpenGL
[13:26:37] *** shintahW has quit IRC
[13:26:38] *** shintahW2 is now known as shintahW
[13:31:34] *** timsche has joined ##OpenGL
[13:33:55] *** BitPuffin has joined ##OpenGL
[13:45:52] *** lenarhoyt has joined ##OpenGL
[13:50:54] *** lenarhoyt has quit IRC
[13:51:29] *** bjz has joined ##OpenGL
[13:54:48] *** bjz_ has quit IRC
[13:58:46] *** Hunts has joined ##OpenGL
[13:59:32] *** adsc has joined ##OpenGL
[14:00:18] *** qeed has joined ##OpenGL
[14:00:55] *** moser has quit IRC
[14:02:18] *** elmarquez has joined ##OpenGL
[14:06:17] *** paperManu_ has quit IRC
[14:11:00] <xgearx> Can someone help to map rectangle texture created from bitmap to squad and draw it with proper proportion of image width and height
[14:11:05] <xgearx> ?
[14:12:44] *** timsche has quit IRC
[14:13:29] *** urraka has joined ##OpenGL
[14:14:33] <xgearx> so for example i have screen 1280(h) x 800(w), image 600 x 480. I can create texture 1024 x 512. How i can map?
[14:15:39] <Bloodust> squad :D
[14:16:11] *** ruuns has joined ##OpenGL
[14:16:31] <Bloodust> what confuses me here, is why the image and texture dimensions are not the same
[14:16:56] <Bloodust> or can you not create NPOT textures on your platform?
[14:17:46] <xgearx> not all android devices support NPOT %(
[14:19:06] <xgearx> so, i don't understand what to do with all this resolutions
[14:22:03] *** moser has joined ##OpenGL
[14:24:16] <Bloodust> I know one way but Im not sure if its the best way
[14:24:59] <Bloodust> create 1kx.05k texture, upload the 600x480 image data into it
[14:25:08] *** Beetny has quit IRC
[14:25:25] <Bloodust> when you draw the quad dont use texture coordinates for the full texture but only for the 600x480 part
[14:25:53] <Bloodust> so instead of texture coordinates going from 0 to 1, they go from 0 to 600/1024 and 480/512
[14:29:20] <xgearx> Bloodust: u mean i should change mTextureVertices from http://pastebin.com/0W7CGxNk
[14:29:32] <xgearx> and what with mSquareVerticesBuffer ?
[14:29:35] <xgearx> leave as is?
[14:30:45] <Bloodust> yeah
[14:30:51] <Bloodust> that should work
[14:31:03] *** Adrinael has joined ##OpenGL
[14:35:46] *** centrinia has quit IRC
[14:41:47] *** zzuegg2 has quit IRC
[14:41:57] <bookmark> http://youtu.be/bwVhXJ-CREM
[14:42:15] <bookmark> got it looking a little nicer
[14:43:37] *** elmarquez has quit IRC
[14:45:10] *** xissburg has joined ##OpenGL
[14:46:39] *** lenarhoyt has joined ##OpenGL
[14:49:32] *** paperManu has joined ##OpenGL
[14:52:16] *** centrinia has joined ##OpenGL
[14:54:08] *** Alina-malina has quit IRC
[14:54:52] *** paperManu has quit IRC
[14:56:47] *** Alina-malina has joined ##OpenGL
[14:58:34] *** dusted has joined ##OpenGL
[15:00:17] *** ozette has quit IRC
[15:04:02] *** shintahW2 has joined ##OpenGL
[15:07:42] *** shintahW has quit IRC
[15:07:42] *** shintahW2 is now known as shintahW
[15:09:07] *** BreadProduct_ has joined ##OpenGL
[15:11:54] *** BreadProduct has quit IRC
[15:11:55] *** BreadProduct_ is now known as BreadProduct
[15:16:25] *** paperManu has joined ##OpenGL
[15:17:19] *** jdolan has joined ##OpenGL
[15:20:16] *** tehrain has joined ##OpenGL
[15:20:17] *** tehrain has joined ##OpenGL
[15:21:57] *** neure has quit IRC
[15:25:42] *** Garmine has quit IRC
[15:26:41] *** Garmine has joined ##OpenGL
[15:27:04] *** Garmine is now known as Guest71201
[15:34:42] *** wutata has quit IRC
[15:37:19] *** Hunts has quit IRC
[15:41:47] *** samrat has quit IRC
[15:44:36] *** Hunts has joined ##OpenGL
[15:49:13] *** dusted has quit IRC
[15:50:45] *** clauswitt has quit IRC
[15:56:43] <xgearx> Bloodust: Thanks! Looks like issue was in NPOT support. because when i tried modern device with npot support - drawing was correct with code that i pasted. So now i have support for devcies that not support NPOT feature.
[15:57:04] <Bloodust> np
[15:57:15] <xgearx> now i want to rotate using glRotatef
[15:58:03] <xgearx> but rotate relative to center
[15:58:09] <Bloodust> okey
[15:58:24] <Bloodust> move the quad to origin first, then rotate and then move it back
[15:59:19] <xgearx> to the origin - you mean coordinate 0, 0 ?
[15:59:52] <Bloodust> yes
[16:01:06] <xgearx> so, every time i want to rotate, i should call gl.glRotatef(angle, 0, 0, 1); i tried change x and y but results strange
[16:01:37] *** dusted has joined ##OpenGL
[16:02:44] *** urraka has quit IRC
[16:04:02] *** hexagoxel has joined ##OpenGL
[16:04:30] *** abs25 has joined ##OpenGL
[16:04:41] *** Zupo has quit IRC
[16:05:37] *** Zupo has joined ##OpenGL
[16:06:28] *** Madsy has quit IRC
[16:11:04] <xgearx> Bloodust: and what is the sequence of calls: glPushMatrix then glTranslatef then glRotatef then glTranslatef (back) then glDrawArrays then glPopMatrix ?
[16:12:18] *** samrat has joined ##OpenGL
[16:18:49] <bookmark> did alpha get its name from the alphabet?
[16:18:57] *** indefini has joined ##OpenGL
[16:19:10] <bookmark> hehe
[16:19:23] <AbigailBuccaneer> bookmark, that's the most backwards thing i've ever heard
[16:21:14] *** snakenerd has joined ##OpenGL
[16:21:23] <bookmark> http://youtu.be/eitqVnOb-Jg ok this is music i made
[16:21:58] *** slidercrank has joined ##OpenGL
[16:22:37] *** xissburg has quit IRC
[16:23:10] *** Zupo2 has joined ##OpenGL
[16:23:13] *** japro has joined ##OpenGL
[16:23:48] *** tcsc has joined ##OpenGL
[16:24:03] <Bloodust> xgearx yes
[16:24:36] *** razieliyo has joined ##OpenGL
[16:24:39] <xgearx> should i use gl.glMatrixMode(GL10.GL_MODELVIEW)
[16:24:39] <xgearx> ?
[16:25:11] *** Zupo has quit IRC
[16:27:39] <Bloodust> yes
[16:27:55] <Bloodust> you should really read some basic tutorials on how opengl works
[16:28:09] *** Mango_Man has joined ##OpenGL
[16:28:37] *** Zupoman has joined ##OpenGL
[16:29:09] <ville> xgearx: forgey any material that uses glPushMatrix, glTranslate and so on
[16:29:46] *** [1]asido has joined ##OpenGL
[16:30:50] *** PasNox has quit IRC
[16:31:15] *** Rutix has quit IRC
[16:31:20] *** asido has quit IRC
[16:31:52] <xgearx> Bloodust: maybe you can suggest something simple for "expert" like me?
[16:32:04] <xgearx> ville: don't understand
[16:32:07] *** Rutix has joined ##OpenGL
[16:32:07] *** Rutix has joined ##OpenGL
[16:33:46] <Bloodust> simpler than?
[16:33:54] <ville> xgearx: opengl doesn't have those functions anymore. time to forget the 20 years old interface and use the current interface.
[16:34:13] <xgearx> i am android developer :)
[16:34:41] <xgearx> and trying to support code which use gl10 :(
[16:34:54] <ville> no idea what that is.
[16:35:23] <Bloodust> opengl ES 1
[16:40:00] <xgearx> Bloodust: i even don't understand from what to start. simple examples or theory? every resource i find - 3d related. I want to start with 2d but something tells me that it is not correct in case of opengl
[16:40:48] *** doev has joined ##OpenGL
[16:40:55] <Bloodust> 2d is fine
[16:41:57] <Bloodust> these are the usual tutorial links I give http://www.opengl-tutorial.org/ http://ogldev.atspace.co.uk/ http://open.gl/ http://www.arcsynthesis.org/gltut/
[16:42:04] <Bloodust> but none of these are for opengl ES
[16:42:08] <Bloodust> you have to find those yourself
[16:42:51] <xgearx> thanks
[16:46:59] *** urraka has joined ##OpenGL
[16:47:53] *** japro has quit IRC
[16:49:49] <xgearx> ville: I think that will soon have to learn not opengl but opengl ng
[16:50:12] <AbigailBuccaneer> xgearx, it's often not worth learning the latest version of opengl if you want to target a large number of devices
[16:51:17] <slime> on the other hand, the programmable pipeline has a wider reach than the fixed-function GL1/GLES1-era pipeline now
[16:51:26] <bookmark> i think i should make a sky with this tech with little twinkly stars
[16:51:27] <xgearx> as i know the latest android supports opengl es 3.1
[16:51:59] <xgearx> but if i want to cover large number - i should use opengl 2.0
[16:52:03] *** pazul has joined ##OpenGL
[16:52:06] *** Orion] has joined ##OpenGL
[16:52:07] <Bloodust> ES 2.0 is fine
[16:52:18] <jophish> AbigailBuccaneer: here?
[16:52:25] <jophish> Can you send me your CV please?
[16:52:34] <AbigailBuccaneer> if i pretend i'm not here will you stop asking me inane questions in ##OpenGL
[16:52:47] <jophish> I don't think that was inane
[16:56:23] *** roxlu has quit IRC
[16:56:57] *** Hunts has quit IRC
[16:56:58] <jophish> (It's not for tips)
[16:57:07] *** Waynes has quit IRC
[16:57:48] <abs25> in glsl when I want to add effects on top of everything such as fire, or cool spell effects and stuff
[16:57:48] <abs25> I must give texture for that right?
[16:57:48] <abs25> thats a must do
[16:57:49] <abs25> ,so should I create just on top transparent texture over the whole screen and then pass that as a texture?
[16:58:45] <jophish> abs25: you could generate these things procedurally in a texture
[16:58:45] <AbigailBuccaneer> abs25, you don't necessarily need to use textures, if you can generate all your effects without them
[16:58:51] <jophish> shader*
[16:59:42] *** dusted has quit IRC
[16:59:42] <AbigailBuccaneer> in the case of fire, you could render some quads with fire textures on them, for a cool duke nukem 3d look
[16:59:50] <abs25> AbigailBuccaneer, how do I generate that?
[16:59:52] <bookmark> abs25: if you do your spells that way you will see other players spells through walls and it would also be difficult to do.
[17:00:03] <abs25> how do I define vertex then?
[17:00:23] <bookmark> hold on a sec i have some code for something called billboards
[17:01:23] *** kapil__ has quit IRC
[17:01:34] <abs25> bookmark, so how do I do it?
[17:02:08] <ville> xgearx: opengl ng is probably not that soon. my guess is 2 years out.
[17:02:10] <AbigailBuccaneer> abs25, your question is a very broad question that seems to be looking for very detailed answers
[17:02:19] *** Waynes has joined ##OpenGL
[17:02:33] <abs25> I am doing 2d
[17:02:41] <ville> speaking of which does anyone have opengl ng news?
[17:02:53] <AbigailBuccaneer> abs25, that completely changes the nature of the question
[17:02:58] *** b4b has joined ##OpenGL
[17:03:00] <xgearx> ville: and + 1 year when it comes on mobile devices
[17:04:03] <abs25> AbigailBuccaneer, so is answer easier?
[17:04:36] <bookmark> http://codepad.org/PH3IRoe8
[17:04:53] *** xgearx has quit IRC
[17:04:58] <AbigailBuccaneer> bookmark, no need for billboards, they're doing 2d anyway
[17:05:01] <bookmark> oh 2d, then just draw quads
[17:05:05] <AbigailBuccaneer> abs25, it still doesn't sufficiently define the question :)
[17:05:42] <AbigailBuccaneer> if you want the whole world to look like it's on fire, then just stick a fullscreen quad over it, with a repeating animated texture
[17:05:47] <AbigailBuccaneer> it'll look rad and 90s
[17:07:39] <Waynes> stupid 2d fire
[17:08:38] <abs25> AbigailBuccaneer, I basicly dont understand how to deifne area of screen that I want effect to be applied to
[17:09:23] <bookmark> abs25: how far along are you in development?
[17:10:01] <bookmark> i mean does it draw anything?
[17:10:19] <AbigailBuccaneer> abs25, that entirely depends on what you want to appear as if it's on fire...
[17:11:46] <abs25> bookmark, 1.5 year, but 1st week in flsl
[17:11:50] <Yaniel> oh, never noticed alt+left/right switches between ttys
[17:11:58] <krs> you can draw a circle/tri-fan centered on the center of the effect with the radius wanted
[17:12:02] <krs> and then texture that
[17:12:11] <abs25> bookmark, wana see what I got?
[17:12:28] <krs> or just a quad centered on the effect centrum
[17:12:40] <bookmark> well i just don't understand if you can draw something why don't you just do that?
[17:13:10] <Yaniel> abs25: fire is not an "effect"
[17:13:21] <Yaniel> it is usually just a sprite like anything else
[17:13:24] <abs25> man
[17:13:24] <AbigailBuccaneer> it's a feeling, deep down in your heart
[17:13:27] <abs25> I only want some effect
[17:13:29] <abs25> like light
[17:13:33] *** shingshang has quit IRC
[17:13:35] <abs25> I want to make part of my screen brighter
[17:13:38] <abs25> like a circle of light
[17:13:41] <abs25> doesnt need to ne fire
[17:13:43] <abs25> be*
[17:13:45] <Yaniel> light -> draw a circle with additive blending
[17:13:53] <abs25> how do I specify where on the screen
[17:13:56] <abs25> look what happens to me
[17:14:04] <abs25> 1 sec to make picture
[17:14:06] <bookmark> hmm i'm pretty sure you could do that with glsl abs25
[17:14:08] <Yaniel> just like you specify how to draw anything on the screen in the first place
[17:14:14] <krs> abs25: the vertices x,y tell you where its drawn
[17:14:24] <krs> and the transforms
[17:14:25] <abs25> but I always have to pass a texture
[17:14:36] <abs25> if I dont want it to be texture specific how do I do it?
[17:14:42] <Yaniel> huh?
[17:14:56] <abs25> batch.setShader(shader); this is what I got to do in my render method
[17:14:56] <bookmark> abs25, you need vertices at least
[17:14:58] <krs> abs25: do a fragment shader that creates it if you want
[17:15:09] <Yaniel> I mean draw a white circle with additive blending on top of your scene
[17:15:25] <abs25> how to do it on top of my scene?
[17:15:32] <Yaniel> umm draw it last?
[17:15:33] <AbigailBuccaneer> abs25, render it after the rest of your scene
[17:15:40] *** dusted has joined ##OpenGL
[17:15:42] <AbigailBuccaneer> abs25, how much of this do you have successfully rendering?
[17:15:47] <Yaniel> with depth testing disabled if you ever use it
[17:16:02] <abs25> it still doesnt render
[17:16:10] <bookmark> abs25 do you have a screenshot of your program?
[17:16:12] <abs25> unless some texture is rendered in betwen
[17:16:17] <abs25> shure
[17:16:24] <abs25> Il show you hot it should look and how it looks
[17:16:30] <abs25> (without shader / with shader ) 1 min
[17:16:56] <bookmark> probably just use gl_FragCoord
[17:16:59] <Yaniel> tbh I don't see what the difficult part in this is unless it is your framework
[17:17:29] <bookmark> or just draw a textured quad with blending
[17:17:58] <Yaniel> like I said...
[17:18:05] <bookmark> ye
[17:18:23] *** dusted has quit IRC
[17:18:37] <abs25> https://dl.dropboxusercontent.com/u/64175875/Deving/ShadersProblem.png
[17:18:41] <abs25> on the left my light source effect
[17:18:54] <bookmark> yeah you don't even need a texture just a circle like yaniel said
[17:19:04] <abs25> how do I do that
[17:19:24] <abs25> I mean I dont understand how to call it if there isnt any texture being drawn betwen shader and end shader?
[17:19:41] <AbigailBuccaneer> abs25, your framework sounds wacky
[17:19:46] <abs25> its libgdx
[17:19:47] <AbigailBuccaneer> "between shader and end shader"?
[17:19:48] <bookmark> abs25: gl_FragCoord and the distance formula from your algebra books
[17:20:44] <abs25> bookmark, I am using that in my shader
[17:20:46] <bookmark> or you could use a texture
[17:21:07] <bookmark> might be faster than sqrt calls in the frag shader
[17:21:11] <Yaniel> for starters, just draw a white quad where you want your light
[17:21:30] <Yaniel> as if it was a sprite like anything else in your scene
[17:21:48] <abs25> http://pastebin.com/ixQqnRgb
[17:21:50] <abs25> this is the problem
[17:21:58] *** RyanPridgeon has joined ##OpenGL
[17:22:03] <abs25> if I dont put my shader before texture draws, it doesnt get drawn
[17:22:31] <abs25> Yaniel, the problem is I dont know how
[17:23:26] <bookmark> is it someone elses code base?
[17:23:49] <abs25> shader yes, because I am tryint to understand the part where I am calling it from my code
[17:23:50] <bookmark> or... you don't know how to draw something?
[17:23:52] <AbigailBuccaneer> it looks like the problem is libgdx's SpriteBatch doesn't give you a method to draw without a texture
[17:24:11] <AbigailBuccaneer> try passing in 'null' for the texture argument?
[17:24:31] <AbigailBuccaneer> ooh, even better, TextureRegion() // Constructs a region with no texture and no coordinates defined.
[17:24:32] <abs25> AbigailBuccaneer, I am not passing it on my own anywhere
[17:25:27] *** jeanne has joined ##OpenGL
[17:25:34] *** redeemed has quit IRC
[17:25:41] <bookmark> just pass some random texture in but don't use it except as as maybe a define in the shader
[17:25:52] <abs25> thats the issue idk where I am passing textures
[17:25:55] <abs25> it seems like I cant
[17:26:01] <abs25> like libgdx is doing it on its own
[17:26:10] <abs25> and its doing it when I use batch.draw
[17:26:10] <AbigailBuccaneer> batch.draw(ResourceManager.instance.getTexture("Background-bright.png"), -100, -250, 2574*0.8f, 1080*0.8f);
[17:26:15] <abs25> indeed
[17:26:22] <abs25> oh you mean imaginary object?
[17:26:25] <AbigailBuccaneer> that first argument is a texture
[17:26:30] <AbigailBuccaneer> abs25, ???
[17:26:31] <abs25> thats what I mean like just some transparent texture right?
[17:26:37] <abs25> exactly a
[17:27:24] *** telex has quit IRC
[17:27:45] *** hahuang65 has joined ##OpenGL
[17:28:39] *** telex has joined ##OpenGL
[17:30:33] <abs25> well I cant pass no texutre
[17:30:37] <abs25> it must be a texture inside
[17:30:52] <abs25> thats why I asked about transparent
[17:32:11] *** MLM has joined ##OpenGL
[17:32:31] <AbigailBuccaneer> abs25, libgdx seemingly doesn't let you not use a texture - but in opengl you could render without a texture just fine
[17:32:33] *** hahuang65 has quit IRC
[17:32:42] <AbigailBuccaneer> so your problem is between your and libgdx, not you and opengl
[17:36:20] *** doev has quit IRC
[17:37:42] <Yaniel> why do you even use libgdx
[17:38:46] *** asido has joined ##OpenGL
[17:39:34] <abs25> Yaniel, what should I use?
[17:39:48] <Yaniel> dunno what you need
[17:39:52] *** lasserix has joined ##OpenGL
[17:39:53] <Yaniel> sfml could be good
[17:39:55] *** staylor_ has joined ##OpenGL
[17:40:04] <AbigailBuccaneer> does sfml support android etc.?
[17:40:18] <AbigailBuccaneer> abs25, sdl2 remains cool
[17:40:44] *** enleeten has quit IRC
[17:41:19] *** [1]asido has quit IRC
[17:41:35] <abs25> AbigailBuccaneer, idk if sfml supports android
[17:41:38] <abs25> I know libgdx does :P
[17:41:41] <abs25> flawlesy
[17:41:58] *** adsc has quit IRC
[17:42:23] *** enleeten has joined ##OpenGL
[17:42:36] <AbigailBuccaneer> abs25, okay, but as we've discovered, libgdx is inherently flawed, so you can't call it flawless :)
[17:43:12] <abs25> lol
[17:43:13] <abs25> true
[17:43:27] <abs25> well I would rather do transparent texture then switch to a new library so
[17:44:32] *** asido has quit IRC
[17:47:37] *** Zerflag has joined ##OpenGL
[17:49:26] *** Yaniel has quit IRC
[17:50:02] *** RyanPridgeon has quit IRC
[17:50:03] *** Yaniel has joined ##OpenGL
[17:52:35] <abs25> acctualy the whole points is to use Mesh so I am doing shader only on parts of the screen?
[17:52:41] <abs25> point*
[17:59:42] *** Codex_ has quit IRC
[18:00:06] *** centrinia has quit IRC
[18:01:42] *** samrat has quit IRC
[18:03:54] *** ShadowIce has joined ##OpenGL
[18:05:59] *** shintahW has quit IRC
[18:08:35] *** TyrfingMjolnir has quit IRC
[18:10:20] *** Vtec234 has joined ##OpenGL
[18:10:24] *** Vtec234 has quit IRC
[18:11:15] *** asido has joined ##OpenGL
[18:13:37] *** abs25 has left ##OpenGL
[18:15:28] *** Zerflag has quit IRC
[18:19:43] *** digitalsigil has joined ##OpenGL
[18:20:39] *** AAA12256 has joined ##OpenGL
[18:22:47] *** ShadowIce has quit IRC
[18:24:07] <AAA12256> Can anyone tell me if there are any advantages of using SOA over AOS buffers? http://ogldev.atspace.co.uk/www/tutorial32/tutorial32.html
[18:24:23] <Bloodust> SOA? AOS?
[18:24:24] *** Keniyal has quit IRC
[18:24:39] *** xissburg has joined ##OpenGL
[18:24:41] <AAA12256> Yeah, I posed the link, the first picture should make since.
[18:24:52] <Bloodust> aah
[18:24:54] <Yaniel> struct of arrays vs array of structs
[18:24:57] <AAA12256> Yes.
[18:25:15] *** pazul has quit IRC
[18:25:16] <Bloodust> interleaved is best so AOS
[18:25:22] <flan3002> Yaniel: On a CPU, you'd probably use arrays of structs.
[18:25:27] <AAA12256> I could think of a use to reduce redundant data if I could use multiple ebos.
[18:25:38] <Yaniel> I actually might go for a struct of arrays
[18:25:59] <Yaniel> OTOH I would just interleave all data in one array
[18:26:13] <Yaniel> but that isn't exactly a struct either
[18:26:41] <AAA12256> I see, I just wanted to know if there was some kind of "big picture" thing that I was missing.
[18:26:56] <Yaniel> well
[18:27:15] <Yaniel> sequentially reading an array is about the best you can do cache-wise
[18:27:27] <Yaniel> apply that to whatever the situation at hand is
[18:27:56] <AAA12256> Yeah, I'll probably stick with AOS. I kinda have my code already set up for that. Anyways, thanks :D
[18:28:22] *** jeanne has quit IRC
[18:31:45] *** Hunts has joined ##OpenGL
[18:36:10] *** Defaultti has quit IRC
[18:38:50] *** Twinklebear has joined ##OpenGL
[18:39:00] *** Mango_Man has quit IRC
[18:41:42] *** Defaultti has joined ##OpenGL
[18:43:36] *** samrat has joined ##OpenGL
[18:46:29] *** konom has quit IRC
[18:46:30] *** prophile has joined ##OpenGL
[18:46:54] *** Gamecubic has joined ##OpenGL
[18:49:50] *** Misu has joined ##OpenGL
[18:54:44] *** BearishMushroom has joined ##OpenGL
[18:55:45] *** Mango_Man has joined ##OpenGL
[18:58:06] *** hexagoxel has quit IRC
[18:58:52] *** [1]asido has joined ##OpenGL
[19:00:32] *** asido has quit IRC
[19:01:38] *** metredigm has quit IRC
[19:03:02] *** Garner has quit IRC
[19:03:29] *** Garner has joined ##OpenGL
[19:04:30] *** Jack_ has joined ##OpenGL
[19:08:56] *** RikudoSennin has joined ##OpenGL
[19:10:23] <RikudoSennin> hello, I have a question regarding how to switch rendering between a cube and a glutwiredsphere , i am trying to use a glGenList to hold the render and call it if condition is met, i already have this working to display a coordinate axis but is not working for the cube and sphere :? Could anybody explain what is the difference ?
[19:10:57] *** abs25 has joined ##OpenGL
[19:13:08] <RikudoSennin> void drawSphere(){
[19:13:09] <RikudoSennin> sphereList = glGenLists(1);
[19:13:09] <RikudoSennin> glNewList(sphereList,GL_COMPILE);
[19:13:09] <RikudoSennin> glColor4f(1.0,0.0,0.0,0.5);
[19:13:09] <RikudoSennin> glutWireSphere(100,10,10);
[19:13:09] <RikudoSennin> glEndList();
[19:13:09] <RikudoSennin> }
[19:13:10] <RikudoSennin> void makeAxes() {
[19:13:10] <RikudoSennin> // Create a display list for drawing coord axis
[19:13:11] <RikudoSennin> axisList = glGenLists(1);
[19:13:11] <RikudoSennin> glNewList(axisList, GL_COMPILE);
[19:13:12] <RikudoSennin> glLineWidth(2.0);
[19:13:12] <RikudoSennin> glBegin(GL_LINES);
[19:13:13] <RikudoSennin> glColor3f(1.0, 0.0, 0.0); // X axis - red
[19:15:56] *** zajfy has joined ##OpenGL
[19:21:22] *** _BJFreeman has joined ##OpenGL
[19:23:06] *** _BJFreeman is now known as BJfreeman
[19:23:25] *** [1]asido has quit IRC
[19:24:10] *** matpow2 has quit IRC
[19:24:58] *** Jeanne-Kamikaze has joined ##OpenGL
[19:26:29] *** Match has quit IRC
[19:26:48] <Stragus> RikudoSennin, you are using very obsolete capabilities and OpenGL functions
[19:27:43] <Stragus> You should find more up-to-date learning materials... This is OpenGL 1.0 stuff from the early 1990
[19:28:03] *** DolphinDream has joined ##OpenGL
[19:30:32] *** hexagoxel has joined ##OpenGL
[19:32:50] *** Gamecubic has quit IRC
[19:33:16] *** Gamecubic has joined ##OpenGL
[19:34:44] *** ragecryx has joined ##OpenGL
[19:36:29] *** Misu has quit IRC
[19:37:08] *** Misu has joined ##OpenGL
[19:40:35] *** Baldwin has quit IRC
[19:49:04] *** Guest71 has joined ##OpenGL
[19:49:25] *** bkre__ has joined ##OpenGL
[19:52:04] *** foreignFunction has joined ##OpenGL
[19:52:26] *** tcsc_ has joined ##OpenGL
[19:52:58] *** RyanPridgeon has joined ##OpenGL
[19:53:02] *** b4b has quit IRC
[19:53:52] *** tcsc has quit IRC
[19:53:53] *** wutata has joined ##OpenGL
[20:02:40] *** Khlorghaal has quit IRC
[20:02:57] *** Khlorghaal has joined ##OpenGL
[20:06:35] *** xissburg has quit IRC
[20:11:26] *** CainJacobi has joined ##OpenGL
[20:15:48] <Guest71> Is it ok if i have multiple shader-programs for each frame ? In which situations would one use multiple programs ?
[20:20:37] <Bloodust> yes
[20:20:40] <Bloodust> and in many situtations
[20:21:14] <Guest71> so i could use 1 for shadows, 1 for textures and one for particle systems
[20:21:38] <Bloodust> I have one for UI, one for lighted objects, one for vegetation, one for terrain
[20:21:43] <Bloodust> and then a bunch for post processing
[20:21:51] <Bloodust> total is close to 10-15
[20:22:04] <Guest71> ok thank you ;)
[20:29:07] *** PasNox has joined ##OpenGL
[20:31:54] *** samrat has quit IRC
[20:33:50] *** samrat has joined ##OpenGL
[20:35:23] *** Kane has joined ##OpenGL
[20:35:41] *** derhass has joined ##OpenGL
[20:37:12] *** hahuang65 has joined ##OpenGL
[20:38:34] *** japro has joined ##OpenGL
[20:45:48] *** xbx has quit IRC
[20:49:18] *** Keniyal has joined ##OpenGL
[20:50:27] *** paperManu has quit IRC
[20:50:28] *** ShadowIce has joined ##OpenGL
[20:51:46] *** b4b has joined ##OpenGL
[20:53:40] *** BJfreeman has quit IRC
[20:55:52] *** prophile has quit IRC
[20:57:23] *** prophile has joined ##OpenGL
[20:59:46] *** Waynes has quit IRC
[21:06:28] *** marvimias has left ##OpenGL
[21:07:51] *** ShadowIce has quit IRC
[21:08:28] *** ShadowIce has joined ##OpenGL
[21:15:35] *** b4b has quit IRC
[21:18:32] *** Renderwahn is now known as RenderVAT
[21:19:53] *** prophile has quit IRC
[21:20:12] *** katcher has joined ##OpenGL
[21:21:46] <ville> Guest71: if you think that's holding you back then look into subroutines. they are the equivalnet of pointer-to-function in c. apparently it may be cheaper than switching a program
[21:23:20] <Guest71> thanks im going to read about those before i can undo all changes :D
[21:25:43] *** absof25 has joined ##OpenGL
[21:29:31] *** abs25 has quit IRC
[21:29:46] <glYoda> "if you think that's holding you back then look into subroutines. they are the equivalnet of pointer-to-function in c. apparently it may be cheaper than switching a program" …not typically
[21:30:14] <Stragus> That was certainly my impression as well
[21:30:28] <glYoda> subroutines are nasty on a number of fronts (be it in D3D or GL)
[21:30:47] <glYoda> and I wouldn't recommend using them in a performant path
[21:31:22] <Stragus> I don't even see the point of subroutines, personally
[21:31:39] <glYoda> Stragus well I speak on this subject as an implementor and I'd agree
[21:31:54] *** samrat has quit IRC
[21:33:59] <Guest71> so you would create multiple programs for different uses? with a new program, i can also have different uniform variables..
[21:34:32] <Guest71> if i want to only draw textures in 2d.. i dont need the variables for lights
[21:34:52] <glYoda> well uniforms are per program state(s) so you'd expect that
[21:35:03] <glYoda> and yes multiple programs isn't anything I'd ever shy away from
[21:35:09] <glYoda> in the GL
[21:35:38] <Stragus> Guest71, just try to minimize the switches between programs and you'll be fine
[21:35:48] <Stragus> (Don't switch programs 200 times per frame)
[21:36:33] <glYoda> program binds aren't nearly as costly as developers tend to assume
[21:36:44] <Guest71> if i count correctly i need 6 switches per frame ..
[21:38:40] <glYoda> you'll find that a raw program bind (in the most optimal cases) isn't anything more than setting a few state setting registers and pointing the HW to a few chunk of < insert memory here > which contains the binary one wishes to execute
[21:38:48] *** Biliogadafr has joined ##OpenGL
[21:38:51] <glYoda> *to a new chunk
[21:39:32] <glYoda> that assumes you aren't respecifying uniform / attribute etc. state along with a program change
[21:39:45] <glYoda> IF you need to do that as well the costs go up considerably
[21:40:07] *** ShadowIce has quit IRC
[21:40:29] <glYoda> the cache flushes at the HW layer are an additional cost as well of course
[21:42:39] <Stragus> Cache flushes and the switch to a different batch of kernels
[21:43:29] <Stragus> Although I assume OpenGL drivers have better ways to manage caches than what we see in CUDA world... where everything is flushed between kernels
[21:44:44] <Guest71> and i was thinking it would remove and load the complete shaders over and over again. if i set a uniform A on programm pA, switch to programm B and back to pA .. is A still the same ?
[21:45:53] <Stragus> Yes, each GLSL program maintains its state
[21:46:01] *** bookmark has quit IRC
[21:46:44] <Guest71> nice TY!
[21:46:49] <glYoda> "Cache flushes and the switch to a different batch of kernels" …there is no other "batch of kernels" here
[21:46:54] *** snakenerd has quit IRC
[21:46:59] <glYoda> in any case the extent of the cache flushing behavior I mentioned above is variable
[21:47:22] <glYoda> it might be instruction etc. caches specific to the shader pipeline OR it might be something deeper
[21:47:37] <glYoda> in any case you don't have any direct control over this :P
[21:48:12] <glYoda> and FWIW: "Although I assume OpenGL drivers have better ways to manage caches than what we see in CUDA world... where everything is flushed between kernels" …understand that compute is NOTHING like graphics
[21:48:12] <glYoda> in this and many other regards
[21:48:14] <glYoda> heh
[21:48:30] <Stragus> Well, speaking of CUDA hardware, each MPU can only concurrently run threads from the same kernel
[21:48:47] <glYoda> so?
[21:48:52] <Stragus> So whenever you have to switch to a completely different program, it has to complete all the threads, switch to the new programs, and queue new threads
[21:48:57] <glYoda> again this has nothing to do with 3D
[21:49:09] <glYoda> seriously they are nothing alike in this regard
[21:49:17] <glYoda> Stragus I'm aware
[21:49:23] <Stragus> I'm just saying there is a hardware cost associated to switching to a different program, independently of the API
[21:49:37] <glYoda> but again it has nothing to do with 3D
[21:50:20] <glYoda> and I'm telling you that the cost one sees under CUDA, CL, CS, … whatever isn't equivalent to what one sees in the 3D (i.e. D3D, GL) case
[21:50:38] <glYoda> the binding paradigms here are entirely different
[21:50:52] <Stragus> I had the impression it was a question of hardware design, which would persist under any kind of API
[21:50:58] <katu> depends what one talks about. whether its binding kernel, or actual scheduling of multiple kernels to run simultaneously.
[21:51:11] <glYoda> to start with "state" in the compute realm is (almost) non existent
[21:51:45] <glYoda> and binding on that front tends to be static (i.e. bind once run kernel(s) and return… done)
[21:52:14] <katu> (given the serial nature of gl)
[21:52:20] <katu> i wonder what happens with multi context gl, though
[21:52:26] <glYoda> which is entirely from the dynamically driven schemes we see in the realm of 3D
[21:52:42] *** katcher has quit IRC
[21:52:51] <glYoda> katu multi context GL has nothing to do with this
[21:53:05] <glYoda> the only difference there is that the server handles the mutex
[21:53:15] <glYoda> but that mutex still exists
[21:53:15] *** Garner has quit IRC
[21:53:33] <glYoda> "I had the impression it was a question of hardware design, which would persist under any kind of API" …lol no
[21:53:34] <katu> glYoda: you mean its still serialized and no multiple kernels can ever run at same time?
[21:53:38] <katu> that sounds fishy
[21:53:51] <katu> why would gpu vendors exert so much effort to on-card thread scheduling
[21:54:00] <glYoda> katu at the API layer
[21:54:28] <katu> glYoda: oh, i think theres confusion about multi context.
[21:54:37] <katu> i dont mean threaded gl, i mean literally 2 different apps doing gl calls.
[21:54:51] <glYoda> and see what I said
[21:55:01] <katu> still mutex, one app waits for the another?
[21:55:03] <katu> really?
[21:55:07] <glYoda> I know what you mean and it doesn't change what I've said
[21:55:48] <glYoda> why do you seem to think that the GL is reenterent
[21:55:51] <glYoda> ?
[21:55:57] <glYoda> because it isn't :P
[21:55:58] <Stragus> Both CUDA and GLSL aren't serialized, but a single MPU can only run a single program/kernel/shader at any one time
[21:56:03] <glYoda> never has been
[21:56:04] <Stragus> You have multiple MPUs though
[21:56:11] <katu> glYoda: it isnt. but reentrancy is threading concept.
[21:56:27] <katu> glYoda: invoking it in terms of separate contexes is bending it for the sake of argument.
[21:56:46] <glYoda> and in the realm of GL you'll never, ever, ever execute N > 1 FPs / GSes / ESes / CSes / VSes concurrently
[21:56:52] <katu> glYoda: as far i am aware, gl spec does not say anything what happens wrt separate processes.
[21:57:03] <katu> glYoda: if i'm wrong, please point to place where it says so
[21:57:18] <derhass> katu: the spec never talks about implementation details
[21:57:22] <glYoda> read the spec
[21:57:23] <glYoda> FFS
[21:57:28] <katu> derhass: indeed it does not.
[21:57:30] <Stragus> glYoda, you can have multiple MPUs performing different tasks at the same time, that's up to the OpenGL drivers
[21:57:52] <katu> glYoda: it says its serialized within a process (ie threaded gl has driver level mutex).
[21:58:01] <Stragus> If one wants to run the vertex shader on a MPU, while another does fragments, and a third one is doing vertex feedback transform
[21:58:17] <glYoda> Stragus why do you seem to think that the number of MPUs, CUs, ALUs, … (whatever you wish to call them) has anything to do with this?
[21:58:22] <katu> i'm talking about tl;dr summary at https://www.opengl.org/wiki/OpenGL_and_multithreading
[21:58:32] <glYoda> and why do you seem to think I've implied it does? :P
[21:59:01] <Stragus> Because a single MPU (on Nvidia hardware) can only execute one single program/shader/kernel at any one time?
[21:59:13] <glYoda> simply put running a "program" across N > 1 different "compute units" occurs entirely at the HW layer as far as you're concerned
[21:59:45] <glYoda> it has absolutely, positively nothing to do with the API at the level we are discussing now
[22:00:03] <glYoda> Stragus take a good long look at the GL pipeline
[22:00:04] <katu> Stragus: yes, theres one kernel per wavefront, but generally its possible to run multiple kernels. either scheduled, or indeed in true multicore fashion when scheduled to separate CUs. thats for opencl, i'm not sure about opengl anymore if what glYoda says is true.
[22:00:18] <glYoda> specifically the subsections which cover the various programmable stages
[22:00:34] <Stragus> The point I was trying to make at the beginning was that there is a cost associated with a kernel/shader/program switch due to the fact that you lose concurrency during the switch: you have to complete the previous job then switch
[22:00:47] <glYoda> well I'll assure you that it's true… I say this as a implementor
[22:01:05] <katu> glYoda: i presume you implemented gl drivers for ... all gpu vendors? :)
[22:01:25] <katu> this sounds pretty driver specific to me, but maybe i missed it somewhere in the spec
[22:01:31] <glYoda> katu not sure what that has to do with anything
[22:01:36] <katu> "thou shall not have multiple pipelines, each dedicated to a process"
[22:02:16] <glYoda> feel free to find us a driver which actually does command submission AND execution across N > 1 threads
[22:02:32] <katu> threads? unlikely.
[22:02:40] <katu> that would violate the promise of per-process mutex.
[22:02:54] <glYoda> and no spinning off another thread for async command queuing and submission doesn't count
[22:03:11] <glYoda> nor does spinning off another thread for async resource submission
[22:03:19] <katu> no thread. process.
[22:03:26] <katu> share-nothing on host.
[22:03:34] <glYoda> since most vendors will implement one OR both of those optimizations
[22:03:57] *** bkre__ has quit IRC
[22:03:57] <Stragus> Client threads have little to do with GPU hardware's of programs/kernels, but it might be a different discussion entirely...
[22:03:59] <glYoda> call it whatever you want… I could care less since it doesn't change what I've aaid
[22:04:23] <glYoda> simply put the GL API isn't reentrant
[22:04:48] <katu> glYoda: yes. strtok() is not reentrant either. therefore, only one program can run strtok() at a time.
[22:04:48] <glYoda> if you don't believe me then feel free to submit GL commands from multiple threads into a single context
[22:04:57] <katu> clearly opengl vendors use different notion of reentrancy.
[22:04:58] <glYoda> do it without serialization and see what happens
[22:05:21] *** zagabar has quit IRC
[22:05:25] <glYoda> welcome yourself to the world of non deterministic failures :P
[22:05:29] <glYoda> it's a fun place to be :P
[22:05:39] <katu> glYoda: well, why i'm raising the point is that opencl has no qualms about running multiple kernels (but perhaps still shared mutex on command pipeline).
[22:05:47] *** Garner has joined ##OpenGL
[22:05:59] <glYoda> and I'm not sure what OpenCL has to do with this?
[22:06:09] <katu> simply because often there could be only one command channel on hw level (or not, one some hardware, you can command CUs individually).
[22:06:22] <glYoda> or CUDA? or Metal? or the price of tea in China for that matter :P
[22:06:29] <katu> glYoda: everything, you said you implemented opengl drivers.
[22:06:46] <katu> there is a lot of cross-section at driver level, dont you think?
[22:07:46] <glYoda> (a) not sure why you'd claim that, (b) HW command submission doesn't change what I've said -- this is an API requirement
[22:07:48] <glYoda> period
[22:08:57] *** Grimshaw has joined ##OpenGL
[22:09:20] <glYoda> now it's not at all surprising that the API would be designed in a manner to map to the constraints of the HW i.e. the HW isn't likely to expose command submission / execute spanning multiple contexts
[22:09:42] <glYoda> not to mention you have no idea just how nasty that would be in practice (at the HW level)
[22:09:53] *** shakesoda is now known as nepgear
[22:10:48] <glYoda> people who tend to claim features like this are reasonably trivial to implement ("hey it's just like compute!") tend to have near zero understanding of the API we are discussing here
[22:11:13] <glYoda> just take a look at the amount of global state this particular API exposes
[22:11:37] <katu> glYoda: Indeed there can be only single naive command ring buffer, or fairly complex sg dma implementation, doing fairly crazy stuff like page on-demand paging textures to gpu memory.
[22:11:51] <katu> hardware capability is fairly varied now, its not 2004 and q3a anymore.
[22:12:22] <derhass> what has q3a to do with 2004?
[22:12:22] <glYoda> katu I'm aware of what the HW is capable of… I happen to program it
[22:12:51] <katu> glYoda: for all the vendors. right.
[22:12:52] *** Crehl has joined ##OpenGL
[22:13:19] <glYoda> as I said before I'm not sure what that has to do with anything
[22:13:23] *** DolphinDream has quit IRC
[22:13:46] <glYoda> do you seriously claim that the "vendors" have taken dramatically different approaches to this particular API?
[22:14:39] <glYoda> beyond differences like the shader pipeine, IMR versus TBR versus TBDR… generally speaking at a point it's not terribly different
[22:14:46] <katu> glYoda: sure. APU with integrated memory controller for instance.
[22:14:50] <katu> the gpu shares mmu with host.
[22:14:58] <glYoda> so?
[22:15:01] <glYoda> see what I just said
[22:15:20] <glYoda> VM versus non VM… I've seen both :P
[22:15:37] <glYoda> APUs / SoCs … been there too
[22:16:28] <glYoda> GART only device versus GART + local VRAM with / without CPU side visiibility into that particular address map… seen all of that stuff as well
[22:16:36] <glYoda> in any case my earlier points stand
[22:16:50] <glYoda> *visibility
[22:17:13] *** Drakon has quit IRC
[22:18:47] <glYoda> my recommendation is to stop taking the various PR announcements from < insert vendors of interest here > so seriously :P
[22:19:04] *** Khlorghaal has quit IRC
[22:22:28] *** zagabar has joined ##OpenGL
[22:22:28] *** zagabar has joined ##OpenGL
[22:23:26] *** zagabar has quit IRC
[22:23:45] *** zagabar has joined ##OpenGL
[22:23:45] *** zagabar has joined ##OpenGL
[22:26:54] *** Lucretia has quit IRC
[22:26:58] *** razieliyo has quit IRC
[22:30:16] *** wutata has quit IRC
[22:31:07] *** Lucretia has joined ##OpenGL
[22:41:29] *** BreadProduct has quit IRC
[22:41:40] *** simple_bot has joined ##OpenGL
[22:41:43] *** Drakon has joined ##OpenGL
[22:41:58] *** paperManu_ has joined ##OpenGL
[22:43:46] *** RenderVAT has quit IRC
[22:44:02] *** RenderVAT has joined ##OpenGL
[22:44:32] *** Thandruil has left ##OpenGL
[22:46:06] *** mockillo has quit IRC
[22:46:22] *** simple_bot is now known as andreas__
[22:46:57] *** Jeanne-Kamikaze has quit IRC
[22:47:13] *** andreas__ is now known as andreas
[22:47:37] *** andreas is now known as aattaarrpp
[22:52:15] *** aattaarrpp has left ##OpenGL
[22:54:03] *** DolphinDream has joined ##OpenGL
[22:54:32] *** mockillo has joined ##OpenGL
[22:54:36] *** Guest71 has quit IRC
[23:02:11] *** b4b has joined ##OpenGL
[23:09:54] *** groton has joined ##OpenGL
[23:18:17] *** absof25 has quit IRC
[23:21:57] *** bjz has quit IRC
[23:22:23] *** groton has quit IRC
[23:22:29] *** Crehl has quit IRC
[23:23:24] *** TunnelCat has joined ##OpenGL
[23:26:30] *** Crehl has joined ##OpenGL
[23:29:48] *** DolphinDream has quit IRC
[23:30:21] *** Match has joined ##OpenGL
[23:32:18] *** DolphinDream has joined ##OpenGL
[23:33:36] *** paperManu_ has quit IRC
[23:34:37] *** chirpsalot has quit IRC
[23:35:52] *** ragecryx has quit IRC
[23:37:04] *** Demon_Fox has joined ##OpenGL
[23:40:11] *** paul424 has joined ##OpenGL
[23:40:55] *** tehrain has quit IRC
[23:43:51] *** staylor__ has joined ##OpenGL
[23:43:52] *** staylor has quit IRC
[23:50:02] *** Kane has quit IRC
[23:50:21] *** b4b has quit IRC
[23:52:22] *** Keniyal_ has joined ##OpenGL
[23:54:06] *** Keniyal has quit IRC
[23:54:46] *** paul424 has quit IRC
[23:57:29] *** luxigo has joined ##OpenGL
[23:58:43] *** japro has quit IRC
top

   November 28, 2014  
< | 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 | >