2d
comment OpenGL 4.3 in C++ : Drawing static Triangle ("Hello Triangle"). Color does not appear (Triangle is just completely white)
One issue I can see is that you're using the internal pointer of a std::string that gets deallocated as soon as the function returns. This could have something to do with the garbage (which you see commonly with a string that for some reason isn't null-terminated).
2d
answered OpenGL 4.3 in C++ : Drawing static Triangle ("Hello Triangle"). Color does not appear (Triangle is just completely white)
Jan
19
comment Problem with SLD/OpenGL
Okay, I'm not familiar with developing on OSX so I wasn't sure if that was a problem. In SDL you need to explicitly tell the application to handle input events so that your window is responsive. You can do this with a call to SDL_QuitRequested(), SDL_PumpEvents() or with SDL_PollEvent() in a loop.
Jan
18
comment Problem with SLD/OpenGL
Have you acquired an OpenGL context yet using SDL_GL_CreateContext(window)?
Jan
18
answered Problem with SLD/OpenGL
Jan
11
comment Intersperse 2D with 3D opengl
The reason that works is because when you project the 3D scene, everything ends up somewhere between 1 (at the "near" distance) and -1 (at the "far" distance) on the Z-axis. If you draw your 2D objects at a Z of 1, they will always be on top of anything else.
Jan
10
comment How to construct the marching cubes tables algorithmically?
Why would you want to do this? This is the classic problem of reinventing (in this case rediscovering) the wheel. If you really want to write a voxel->mesh algorithm completely from scratch I would recommend using Dual Contouring as there are no lookups required.
Jan
10
answered Edit VBO data or create a new one?
Jan
7
awarded Enlightened
Dec
31
revised Lambda not capturing variable correctly
added 416 characters in body
Dec
31
comment Lambda not capturing variable correctly
I solved it by storing a copy of the event as a member variable and capturing a pointer to that instead.
Dec
31
accepted Lambda not capturing variable correctly
Dec
31
comment Lambda not capturing variable correctly
I updated the question with the boxing code.
Dec
31
revised Lambda not capturing variable correctly
added 517 characters in body
Dec
31
asked Lambda not capturing variable correctly
Dec
16
awarded Popular Question
Nov
30
asked Give protected access to base class without friend
Nov
24
revised GLSL uniform block with layout std140 not behaving properly
added 718 characters in body
Nov
23
asked GLSL uniform block with layout std140 not behaving properly
Nov
23
comment Segmentation fault on glShaderSource()
This is what I ended up doing, but big thanks for the detailed explanation!
1 2 3 4 5