« first day (477 days earlier)      last day (2600 days later) » 

00:09
So I know Dynamic variables are placed on the heap unlike normal variables that are placed on the stack. How does the compiler know to place it on the heap?
It's trivial
(Ctrl+F for "Storage duration")
@Pouya Most compilers don't know. Instead, you have a function that returns a pointer to the heap (aka malloc or new), and another one that releases that pointer.
 
4 hours later…
04:40
@Justin True. More generally, any standard header is allowed to include any or alll others.
What are the differences between iterator and const iterator?
05:03
@Pouya An iterator will usually (but not always) allow you to change the item to which it refers. A const_iterator definitely won't.
05:22
Why does it sometimes fail to compile when you have enable_if as a template parameter? On MSVC, I had template <typename T, std::enable_if_t<some_condition_v<T>, int> = 0> bool operator==(T const&, T const&) and that failed to compile (it acted as if the function didn't exist. I had to move the enable_if to the return type for it to compile
 
5 hours later…
10:18
@Justin MSVC vOv
I preemptively avoid aliases and template variables
Especially when used with SFINAE
 
3 hours later…
13:07
Is anyone good with OpenGL or can maybe help me with a small thing? I've got my models loaded in my scene with a texture etc and its all working fine. However, the texture is just so bright. I want to add directional lighting of some sort, to mimic the face of the planet. (yes, the model is a planet)
Do I have to implement a separate object to cast the light? Or can i simply just add and modify the fragment and vertex shaders of the planet model?
2 messages moved from Lounge<C++>
you would need to adjust the fragment shader to deal with the light anyway
opengl just draws triangles
lots of them with colors decided per-pixel by a programmable shader
I just dont understand any of the things I've read about the lights to add them to light up my planet model
so in the end you need to adjust the shader to calculate the color that you actually need shown at that pixel, which in the case of light depends on the light direction, color, triangle normal at the fragment,
So I'm only changing the fragment shader
13:31
that's all you need to change, (plus sending the related data to the fragment shader of course)
I've tried something but its still now just appearing black
13:50
Hi, I'm trying to create a simple 'makefile' :
`cx17.8 : cx17.c libfonctions.so
gcc -Wall cx17.c libfonctions.so -o cx17.8
libfonctions.so : cx17_fonctions.c
gcc -Wall -fpic -shared cx17_fonctions.c -o libfonctions.so`
but I guess these erros:
$ make -f "cx17.8"
cx17.8:1: warning: NUL character seen; rest of line ignored
cx17.8:1: *** missing separator. Stop.
1 message moved from Lounge<C++>
14:41
Hi everyone
if there's a Qt guru around, I might have some questions :D
err, I'm new here I wasn't sure I could use those chats for help. thanks
With Qt, I'm trying to embed an exe into another (using QProcess, Window::fromWinId, QWidget::createWindowContainer). The child exe is sending his winId to the parent exe, which then create a container for it and display the result.
everything looks to be working, but I have a blank widget as a result.
The winId is correct, the child exe is working on its own, I don't know what is going on
15:05
I don't think the WinId can be shared accross processes by default
Hm, I made the child exe ? I build a QApplication with a QMainWindow and I give QMainWindow::winId() to the parent exe.
in windows you need to DuplicateHandle (assuming it's a actually HWND but it most likely is)
do you think it's the wrong one ?
I'll look into this, thanks
16:06
@ratchetfreak sooo It took me a while to try out but it's not working. The difference with what I was doing before : the child window does not close, it just stays there.

« first day (477 days earlier)      last day (2600 days later) »