« first day (1784 days earlier)      last day (3164 days later) » 

11:00 PM
no chance
 
Vodka
 
Well it's great that I now know my problem...
 
@Nooble And here I thought to suggest just submitting a point in space and constructing the cube in a geometry shader.
 
@ElimGarak :P
 
@Nooble :)
 
11:02 PM
@Puppy rum
 
@ElimGarak Nevermind, the vertices are normal :v
I forgot to remove the cout.
 
Yeah, you formatted that output like shit.
 
Yeah, looks fine.
 
nooble, output to a text file or something
 
What's that -0.?
 
11:08 PM
@ElimGarak Nothing, it's just zero.
Corresponds with the OBJ that Blender outputs.
Should be evaluated to 0.
And this is my mvp: mvp_ = glm::perspective(fov, aspect_ratio, 0.0f, 100.0f) * glm::lookAt(position, target, glm::vec3(0, 1, 0));
 
@Nooble You dont want that to become 0. If your cube is centered and spans -1, 1 none of the vertices will have a 0 in them
 
Yes. And that cannot be a 0, and cannot be part of normal data. Because it is surrounded by ones, which can appear only once per triplet in a trivially oriented cube.
 
Oh crap @Borgleader's right.
It's -0.999999999. Hmph.
 
Damn you Nooble.
You use glm, do you understand its memory layout?
 
I've been up since 4 am, maybe I should sleep?
 
11:12 PM
@ElimGarak Nope :D
 
@TonyTheLion Nah, sheep is overrated
Browse dank memes instead
 
So, you have no idea that GLSL and HLSL are column major, whilst many libraries are row major. And a transpose is necessary when shoveling data to the shaders?
(not that that is the only problem, you're missfeeding data given the offshoot vertices all over the place)
 
@ElimGarak i dont remember having had to do weird transpose with glm in the past
 
GLM is row major?
 
@Borgleader Possibly column major then, just checking with Nooble.
I don't use outside math libs, so cannot say.
 
11:14 PM
glm::mat4 camera(float Translate, glm::vec2 const & Rotate) {
    glm::mat4 Projection = glm::perspective(45.0f, 4.0f / 3.0f, 0.1f, 100.f);
    glm::mat4 View = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, 0.0f, -Translate));
    View = glm::rotate(View, Rotate.y, glm::vec3(-1.0f, 0.0f, 0.0f));
    View = glm::rotate(View, Rotate.x, glm::vec3(0.0f, 1.0f, 0.0f));
    glm::mat4 Model = glm::scale(glm::mat4(1.0f), glm::vec3(0.5f));
    return Projection * View * Model;
}  // Taken from glm's website
 
glBufferData(GL_ARRAY_BUFFER, vertex_data.size() * sizeof(float), vertex_data.data(), GL_STATIC_DRAW);
Seems right.
glDrawArrays(GL_TRIANGLES, 0, vertex_data.size() / 8);
 
how are you passing your matrices to the shader?
wheres your glUniform__ call
 
That's it, missfeeding the data.
 
@Prismatic By uniform.
glUniformMatrix4fv(matrix_handle, 1, GL_FALSE, glm::value_ptr(camera_.mvp()));
 
looks right
 
11:17 PM
Show me how you're striding through the vertices. And tell me how the vertex data is composed (position3, normal3)?
 
wait, its still not working even after you fixed the vertices?
 
@Nooble Are you using vao/vbo?
 
@Borgleader Of course.
That's my vertex shader.
 
@Nooble Show me your call to VertexAttribPointer
 
(Borgleader's comment) Not that, the vertex buffer stride. You need to explain to the pipeline your arbitrary vertex data format.
 
11:18 PM
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, nullptr);
glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 0, reinterpret_cast<void*>(3 * sizeof(float)));
glVertexAttribPointer(2, 2, GL_FLOAT, GL_FALSE, 0, reinterpret_cast<void*>(6 * sizeof(float)));
 
Did you also call glEnableVertexAttribArray(...) ?
 
'ello, Lounge
 
@jaggedSpire Hi.
 
@jaggedSpire supspire
 
11:21 PM
@Borgleader nothin much, borg
 
that stride... what are the vx attribs
0 is probably position... then ?
 
@Nooble Yo!
 
normal and tex, probably
 
@Prismatic yeah pos, normal, uv
 
@ElimGarak What about 'em?
 
11:24 PM
I dont think the stride is correct
 
each component is not tightly packed to the next one (i.e, you dont have all pos, then all normals etc)
you have AFAIK pos, normal, uv, pos, normal, uv
your stride should be 8 * sizeof(float)
 
Is your data interleaved or not?
 
You are using an array of structures according to the offset
So your stride shouldn't be 0
 
11:25 PM
Oh.
 
Do you understand, Nooble? Like I mentioned already, you're missfeeding the data and Borgleader is very likely correct.
 
@ElimGarak Nope.
@ElimGarak Yes yes
 
Welll, if it's pos, normal, uv, it is interleaved (that's the name for it)
 
woah, OpenGl
 
If your data isn't interleaved, your offsets don't make sense
 
11:26 PM
I see.
Time to fix this then!
Thanks guys!
 
@Prismatic what do you mean "data interleaved"?
 
v1vn1vt1 etc.
 
@TonyTheLion vertex specification in opengl
 
@TonyTheLion pos, normal, uv, pos, normal, uv, instead of pos,pos,pos,..., normal,normal,normal,...
 
11:27 PM
real talk lounge, SoA or AoS? which method is best?
 
Interleave always.
 
You can see it as: interleave is array of structs, not-interleaved is struct of arrays.
 
@Elim Garak what about when you want to update a single vertex attribute
 
@ElimGarak Should I?
Is there a performance benefit?
 
The cost is amortized on the GPU, a single vertex attribute update is an acceptable cost.
Caching data, don't make the GPU work for it. It would have to jump all over the place to collect the necessary data.
 
11:29 PM
hi everyone
 
Localize, localize, localize.
 
Also, you have 36 vertices, which means duplications. Each triangle for itself. Move to index buffers soon.
 
@ElimGarak My point was if you have 8 vertex attributes or something and you want to update one attribute you'd have to reupload the entire buffer. You can mitigate stalls with double buffering and all, but its not like SoA is completely useless
 
cache locality is important af
 
11:30 PM
@Borgleader Wait. Do I?
 
@ElimGarak wheres that hand waving image when you need it
 
I push v v v and then vn vn vn and then vt vt vt.
 
@Nooble lol well then your offsets are wrong and your stride is correct
 
Yes. In both cases, you're wrong ahah
 
:(
 
11:31 PM
your offsets should be 0, 3 * numverts * sizeof(float), 6 * numverts * sizeof(float)
but earlier you printed them grouped by vertex
so i assumed interleaved
 
I see.
 
Do you understand why?
@JonathanMusso hello
 
Kinda.
 
@Prismatic Usually, where you need to do that, you'd use a dynamic buffer which is stored in system memory and always copied over to the GPU, it is only mapped into its memory (as in modern terms, or patched into it in older terms).
 
Where do I get the offset?
It's float *...?
 
11:33 PM
@ElimGarak That's a great point.
 
@Nooble Well you just said it, you have all the positions first then the normals, so the normals start n bytes from the beginning of the buffer, where n bytes is the size taken by all the positions (3 floats per position times n)
and since theyre tightly packed the stride is 0
 
Ah.
 
otherwise its like i stated earlier (for interleaved data)
 
You see? Also, change that as soon as you can.
 
@ElimGarak I should do interleaved?
 
11:35 PM
Yes! Also, introduce index buffers. That will be the modus operandi for the most of your graphics programming life.
Don't go overboard with triangle strips, they're not a good idea for complicated reasons (for most things).
 
Also @RenderDoc GitHub page https://github.com/baldurk/renderdoc … says OpenGL 3.2 core+, it actually supports GL 4.5 core and most ARB extensions.
 
Stick with triangles and index buffers.
 
Great success \o/
 
@ElimGarak Ok.
 
RenderDoc is pretty cool.
 
11:36 PM
I've only used APITrace for debugging
I could never get Valve's VOGL thing to build
Pretty jelly of DirectX debugging in all honesty
 
@Prismatic howdy. I am interested in learning C++ to get some more experience with programming. Currently looking through the list of books recommended on SO. Figured I would join this room to chat with you all from time to time.
 
DirectX debugging tools are awesome, especially with DX12.
 
@Prismatic A long time ago i tried compiling it on windows only to realize there are static_asserts due to missing features
i gave up on it
 
@JonathanMusso Feel free, welcome!
 
OpenGL sounds like a nightmare to code
 
11:38 PM
@TonyTheLion It is. It is a remnant of a time long past.
 
@JonathanMusso Sounds good! Please check out the rules: loungecpp.net/the-law/the-rules
 
Vulkan can't come soon enough.
 
@ElimGarak yet it is being used today still :/
 
it aint that bad
 
@TonyTheLion As is traditional, nobody's created a replacement, so we're stuck with it.
 
11:38 PM
@ElimGarak thank you!
sure thing @Prismatic, thanks.
 
@Puppy how usual.
 
@JonathanMusso Repeat after me: Nooble Is The Greatest Koala.
 
The only Koala I know that uses OpenGL
 
:)
 
The problem with replacements is that you need IHVs to back you. Otherwise, it would've happened a lot sooner. The only company with enough juice to get their own API was Apple, and they created shit.
 
11:40 PM
lol
 
@ElimGarak Well technically so did AMD, and it gave us Vulkan
 
oh man I am tired
 
lol @Nooble.
 
Well, they're an IHV! :D
 
wtf LLVM
another JIT already?
 
user406009
11:41 PM
@Puppy Isn't Vulkan going to replace some uses of OpenGL? So it does sorta have a replacement in the works.
 
@Puppy they want to keep you on your toes
 
Apple is also hardcore invested in: OpenGL (they're still in the workgroup even if their OS is shitty at supporting it), LLVM and even Clang.
@Lalaland Vulkan is like DirectX 12. Better, but also more complicated. Microsoft stated that it is going to stand by DirectX 12 as an option for advanced folks, DirectX 11 will still remain in use for years to come, especially by indie devs.
 
Apple has to be in the OpenGL ARB until they have enough pull to force devs to use their own APIs
I feel like they thought they were getting close to that, especially for iOS so they dropped Metal
Even though they without a doubt knew about Vulkan and its progress
 
is the fact that OpenGL is a big state machine under the hood a sign of the times it was created in, or more because it is technically sensible to solve a problem such as this with a state machine?
 
Metal would be good, had they not fucked up the binding model.
 
user406009
11:43 PM
@chmod711telkitty Ah, come on, StarGazer is hilarious. All the info it collects is public anyways. StarGazer only makes it easier to see. Like I said, I can blacklist you if you really want me to.
 
@Lalaland She just wants to be able to troll the starboard without consequence
 
user406009
Well some people were being dicks. For example:
 
user406009
> Telkitty star alert.
 
That's me!
 
Telkitty is well aware what we like and don't like
I have no sympathy
 
11:45 PM
@TonyTheLion Does she really? She posted a beheading video once and was surprised at our negative reaction IIRC
 
@Borgleader well... maybe I overstated it
I was trying not to be too negative
 
@TonyTheLion OpenGL is first and foremost a C API. Folks behind it wanted to be "open", cross platform and stuff and that also expanded into language choice. Which was a terrible idea from the get go.
 
@TonyTheLion I commend your efforts ;)
 
@Borgleader thanks :)
@ElimGarak ah terrible ideas in software, I would have never thought....
 
But it got the job done, so people rolled with it. Also, back in the day, while it was not ideal, it was great (relative to what everyone else was doing). And it preceded DirectX. It was the first API that wasn't shit or some proprietary low level atrocity.
 
11:47 PM
yea makes sense
 
Back in the day, it was an unstandardized cluster fuck. And costs of porting software were enormous. You also had to target your users individually, a terrifying notion. Everyone's hardware required love on its own. Some market trends made that easier, but it was terrible.
 
user406009
I still think C api's are a good thing.
 
user406009
It's the only well supported ABI.
 
@Lalaland for very small values of "good"
and only good until you have to use it
C has its uses
 
user406009
Let me clarify: System C APIs.
 
11:49 PM
One of the worst things about OGL is all that extension bullshit stuff.
 
but it also rips all sanity out of you
 
user406009
The implementation language doesn't really matter. But C has a really well defined, stable ABI.
 
@ElimGarak I found the client/system model to be pretty confusing. Never got my head around how that shit worked
 
You need to have a consistent feature set, highly defined and readily available. We could've all appreciated it a bit more had we not been forced to chase API function addresses at runtime.
 
> been forced to chase API function addresses at runtime.
rip sanity
 
11:51 PM
github pls
 
@Borgleader That was a good idea initially, but it was terribly executed and almost never used to my knowledge (as intended).
 
user406009
Is there really a good alternative to chasing API functions at runtime? OpenGL is one case where dynamic linking is really necesary.
 
@ElimGarak Oh, I liked the idea. It just... was confusing to me how that could work
 
@Rapptz not sure I get what you're trying to say?
 
Its Steam in house streaming 30 years prior ;)
 
user406009
11:52 PM
@ElimGarak What would you have us do instead?
 
they changed the UI
used to look like this
 
Guys, I am entrenched in the DX (DX12 to be specific) camp. I just love it. I am not much for cross platforming, especially as the user base of my interest is all on Windows.
 
Why aren't you using a dank dark theme, anyway, @Rapptz?
 
user406009
@ElimGarak How does DX 12 deal with extensions?
 
11:54 PM
@ElimGarak Who (outside of Valve) isnt? :P
 
@Lalaland It has strictly defined feature sets. No extensions.
Everyone conforming to a particular feature set must support it completely, but to variable performance levels.
 
user406009
I guess that's reasonably effective.
 
Its sibling is also behind the Xbox consoles (right now a modified version of DirectX 11.3 with specifics targeting the unique hardware, moving towards 12).
And the PS4 has a weirdly named new API, can't remember the acronym right now.
 
alex and rapptz pls
 
GNM I think. Yes. Checked. GNM is the low level one, and a special shading language.
 
11:56 PM
 
user406009
@Prismatic Their avatars are even doing similar poses.
 
user406009
 
user406009
Problem solved.
 
lol
 

« first day (1784 days earlier)      last day (3164 days later) »