[QUOTE=Radical_ed;52277486]Array allocation on stack instead of heap[/QUOTE]
What.
If you want array allocation on the stack instead of the heap you use stackalloc.
[thumb]http://carp.tk/$/devenv_2017-05-26_22-28-02.png[/thumb]
[editline]26th May 2017[/editline]
This is invalid for some reason tho.
[thumb]http://carp.tk/$/devenv_2017-05-26_22-32-53.png[/thumb]
[QUOTE=cartman300;52278483]-C# stuff-[/QUOTE]
C# really throws me for a loop with stuff like this. The examples I'm used to seeing all show its abstraction capabilities, but I really like that it exposes stuff like this too. Its making me want to expedite learning C#.
The upside of that abstraction is that you can't do what I did last night with C++, which was crash (I think?) the compiler by doing something really dumb [sp]while drunk[/sp] with templates
doing some live shadercoding
[t]https://my.mixtape.moe/rbnvjj.jpg[/t]
[t]https://my.mixtape.moe/vimhpu.jpg[/t]
People love it, I'm feeling really fucking accomplished for the first time in a long time <3
[QUOTE=DrDevil;52279596]doing some live shadercoding
[t]https://my.mixtape.moe/rbnvjj.jpg[/t]
[t]https://my.mixtape.moe/vimhpu.jpg[/t]
People love it, I'm feeling really fucking accomplished for the first time in my life <3[/QUOTE]
Is that where they filmed the final scenes for Kingsmen?
[QUOTE=paindoc;52278639]C# really throws me for a loop with stuff like this. The examples I'm used to seeing all show its abstraction capabilities, but I really like that it exposes stuff like this too. Its making me want to expedite learning C#.
The upside of that abstraction is that you can't do what I did last night with C++, which was crash (I think?) the compiler by doing something really dumb [sp]while drunk[/sp] with templates[/QUOTE]
Oooh this can be worse. I once did _something_ which made it so that random accesses to the Console class were crashing the runtime. Never figured it out. Deleted the project in the end.
[QUOTE=cartman300;52280183]Oooh this can be worse. I once did _something_ which made it so that random accesses to the Console class were crashing the runtime. Never figured it out. Deleted the project in the end.[/QUOTE]
Something similar happened to me with CUDA. No matter what I did, [I]literally[/I] every byte (bit too i guess) was set to zero when sent to the device. Could never fix it, after talking to my professor, posting on reddit, posting on stackoverflow, and emailing Nvidia.
Deleted the project file, reinstalled the VS plugin, and things worked again. What?
Worked until 11:30pm on an internship(also part of my degree) Android project that I can't show cause of privacy reasons.
Can't help but think if this was my own project I could have gotten so much more out of it. But I have less motivation when I'm not trying to impress anyone but myself.
[editline]27th May 2017[/editline]
It's gorgeous by the way, wish I could show it.
Android Studio's suggestions are super useful.
[IMG]http://i.imgur.com/srmCL9D.png[/IMG]
[IMG]http://i.imgur.com/lewqnsD.png[/IMG]
[QUOTE=reevezy67;52281297]Android Studio's suggestions are super useful.[/QUOTE]
Atom's suggestions in Go are just as "useful".
[img]https://i.imgur.com/VYpoSer.png[/img]
Some impressions from my live shader coding adventures:
[media]https://www.youtube.com/watch?v=C-1WM9SDFiw[/media]
[media]https://www.youtube.com/watch?v=i-FYYPkET14[/media]
Some footage I recorded directly from the render pc:
[media]https://www.youtube.com/watch?v=fQEchKSniSU[/media]
[media]https://www.youtube.com/watch?v=Nne6ePPuIMo[/media]
It was a damn blast to do live shadercoding while some of my favourite musicians were playing live.
TIL that hitting the 4096 allocation limit in Vulkan is actually pretty easy, especially if you use staging buffers. And since you can't destroy these until transfer ops complete, it's easy to forget about these
I'm on mobile and can't get to my videos/gfycats, but I got my LOD system to a state that is almost entirely (but not quite) broken. I spent several hours stuck because I had setup my model matrix order of operations incorrectly, then I was traversing my quadtree in a dumb fashion, and then to finish it off in a way only I can manage I was testing my frustum culling against a sphere... Based at the camera instead of the node. Oops.
[QUOTE=paindoc;52283893]TIL that hitting the 4096 allocation limit in Vulkan is actually pretty easy, especially if you use staging buffers. And since you can't destroy these until transfer ops complete, it's easy to forget about these
I'm on mobile and can't get to my videos/gfycats, but I got my LOD system to a state that is almost entirely (but not quite) broken. I spent several hours stuck because I had setup my model matrix order of operations incorrectly, then I was traversing my quadtree in a dumb fashion, and then to finish it off in a way only I can manage I was testing my frustum culling against a sphere... Based at the camera instead of the node. Oops.[/QUOTE]
Well yeah you wanna get the numbers of buffers down. Ideally you just make like a handful of allocations and then manage buffers within those manually, just as you often do cpu side really. Usually you try to avoid having many buffers anyways.
EDIT: Actually, isn't there an event/signal API for command buffers? Using that you could insert a signal after each transfer operation so you can automatically release a buffer after it has been used. But in general I think you don't wanna do individual allocations for each buffer anways.
[QUOTE=DrDevil;52283052]Some impressions from my live shader coding adventures:
It was a damn blast to do live shadercoding while some of my favourite musicians were playing live.[/QUOTE]
Upload to shadertoy if you can? I don't think youtube compression is doing this any justice
So previously in all my programming, I've almost always used codeblocks with MinGW64. Its pretty solid, although it has a few crash bugs here and there, and its autocomplete sometimes craps out which is my main frustration. The current project I'm working is visual studio (2017). I'd always had the impression that codeblocks was meant to be kind of crap in comparison. Jesus
Miscellaneous problems that I've run into so far:
- MD/MT confusion
- Solutions and projects randomly becoming corrupt and necessitating text editing to fix. Projects and solutions often seem to just randomly break
- No automatic header guard inclusion, swapping to a header file is 4 keys (two chords, ctrl-k and ctrl-o or p or something), swapping from a source file to a header file (or vice versa) which doesn't exist won't prompt you to create one but just goes nope
- The compiler accepts wildly invalid templates and is flat out non conformant
- Invalid symbol . before <. MSVC's error messages seem to be somewhat poorer than GCCs, particularly later versions of GCC, and triply so when it comes to templates
- VS sometimes randomly decides to eat 50% of my cpu. This is somewhat counterproductive to trying to implement multithreaded code as I now have to frequently restart the IDE. The entire IDE in general seems to be fairly heavyweight compared to codeblocks
- Auto formatting seems to be broken, and will randomly insert too many spaces after an if statement (convention is {'s on the same line as declaration)
- By default MSVC seems to allow freer interconversion of types/pointers in situations that I haven't really pinned down yet, but that gcc would error on leading to bugs that I'm used to being compiler caught
- Errors shown in the IDE are often inaccurate - code that will compile and is 100% correct is sometimes highlighted in red in the editor which makes the feature more annoying
- I'm a bit suspicious of the code gen. EG msvc wasn't attempting to inline a function that was purely a wrapper for a second function, and turned out to be a huge bottleneck after labelling it inline
- It also doesn't seem to support any equivalent of -pg which is properly unhelpful for performance profiling as you have no idea how many times a function was called, and I'd like more accurate profile information
- Initially profiling was totally broken, it would just hang. If you profile for too long (> 20 seconds) it seems the whole thing craps out
On the plus side: The type deduction is spot on, and the built in sampling profiling tool has a nicer interface than codeblocks/gprof as it can walk you through which function called x (although currently not *super* useful, its still an improvement). I also like that it shows you ram and cpu usage, which is useful. It also doesn't need to be compiled in debugging mode to get useful debugging information with the debugger attached, as it seems to have symbol stuff which works mostly ok. Fast debug is nice too
Still, my overall first, second, third, and week after impression of msvc's tools is generally fairly negative compared to the available free software!
[QUOTE=aurum481;52284141]Upload to shadertoy if you can? I don't think youtube compression is doing this any justice[/QUOTE]
I don't have the glsl code anymore, as I just kept modifying it without saving inbetween. Sorry!
I will upload the raw screen capture tomorrow, at least that's uncompressed.
it makes me sad that xcode and swift are ios only. i'm about to finish my last assignment and put windows back on my pc. theres so many intuitive things about the language and ide that make it so easy to work with.
[QUOTE=DrDevil;52283052]shader stuff[/QUOTE]
That looks super fun.
Having fun doing network programming, atm fuzzing around with general client/server communication before diving into snapshot based replication with rewind and replay.
Did a super rough master server implementation this morning:
[IMG]https://puu.sh/w4p90/69049f74f0.png[/IMG]
Left side is hosting, right side is what a client sees when requesting a list of active servers.
ATM the master server is just like 80 lines of code so it's only the bare bones, but it's nice to see how easy it is to setup a system like this.
[vid]http://files.1337upload.net/2017-05-29_16-31-22-b8026c.mp4[/vid]
playing around with displacement + normal mapping in opengl using textures captured with photogrammetry, getting some really nice results
[QUOTE=Icedshot;52284824]-vs stuff-[/QUOTE]
I'm always surprised with people having so many negative experiences with MSVC, as it never reflects my own experiences.
Compliance wise, what version of C++ are you using? Afaik MSVC is now fully c++14 compliant. 17 support is wobbly.
Header guard inclusion is something I've had auto generated for me. Debug info can be modified extensively with MSVC, but the compiler switches are fairly obscure. You can try using the profiling toolkit to get more information about which code calls which functions and so on - you're able to customize the tests fairy thoroughly iirc.
Also, if you find bugs filing them on the bug tracker or reporting them to MS is helpful. They're pretty good about responding, and a coherent and detailed bug report or issue report from a sane person like you is so much better to work with than some of the strange comments they get otherwise.
Disclaimer, as always, is that I'm biased because of a relative I'm close with that's fairly senior on that team. But trust me when I say that mode of the VS team is painfully aware of the shortcomings of MSVC (the poor compiler team...). In the meantime, I'd also say give the cmake support in VS a shot since that can be faster, and/or use VS Code which is feature sparse but looks great and just feels good to use.
Thank God you didn't start by using VS 2015 though. Also, I got LOD stuff to the most basic level of functionality:
[video=youtube;eF2SAruLcDk]http://www.youtube.com/watch? V=eF2SAruLcDk[/video]
Now onto generating or importing actual terrain. I really like [URL="https://proland.inrialpes.fr"]Prolands[/URL] approach, which is to use a large height map for an entire planet which is then upsampled and mixed with (usually) procedurally generated "detail" textures of a sort. I'm going to use pre-made stuff until I get rendering working, though.
[editline]29th May 2017[/editline]
[QUOTE=JWki;52283915]Well yeah you wanna get the numbers of buffers down. Ideally you just make like a handful of allocations and then manage buffers within those manually, just as you often do cpu side really. Usually you try to avoid having many buffers anyways.
EDIT: Actually, isn't there an event/signal API for command buffers? Using that you could insert a signal after each transfer operation so you can automatically release a buffer after it has been used. But in general I think you don't wanna do individual allocations for each buffer anways.[/QUOTE]
I've been meaning to write better allocators but there's so much else to work on and implement that I've been saving that for later.
[editline]29th May 2017[/editline]
Push constants are my favorite feature of Vulkan yet
learning networking programming using tokio and rust
[vid]https://dl.dropboxusercontent.com/s/exu5yej2ztudlyd/2017-05-29_15-33-16.mp4[/vid]
[QUOTE=elitehakor;52288444]learning networking programming using tokio and rust
[vid]https://dl.dropboxusercontent.com/s/exu5yej2ztudlyd/2017-05-29_15-33-16.mp4[/vid][/QUOTE]
Lovin the Kendrick Lamar bumping in the background.
Hmmmm, I wonder why the method that contained both of these gems was acting bizarrely/notworkingatall???
[t]http://i.imgur.com/z9R4uo9.png[/t]
[t]http://i.imgur.com/y9mC8Zf.png[/t]
:hurr:
(how did i even write both of these? and in the same method?)
[sp]Without cppcheck I never would've found them[/sp]
[editline]edited[/editline]
I think if I ever have the chance to play a deviously mean prank on a friend's codebase, I'm going to add a function definition for "static_cat<T>" that converts T to be "MEOW" in any possible way it can. That is probably my most common typo, and the chaos it could cause is delightful
[editline]edited[/editline]
there were 4 typos in that edit, what is my life
Are you sure you are sane?
does ReSharper not work for c++? if I opened this code base I would cry
[QUOTE=war_man333;52292127]does ReSharper not work for c++? if I opened this code base I would cry[/QUOTE]
Nope, only works for c# and vb
[QUOTE=Skipcast;52292129]Nope, only works for c# and vb[/QUOTE]
[t]https://www.helifreak.club/image/20170530201408632.png[/t]
:thinking:
[QUOTE=Skipcast;52292129]Nope, only works for c# and vb[/QUOTE]
[URL="https://www.jetbrains.com/resharper-cpp/"]ReSharper++[/URL]
[editline]30th May 2017[/editline]
dammit
[QUOTE=helifreak;52292212][t]https://www.helifreak.club/image/20170530201408632.png[/t]
:thinking:[/QUOTE]
Well, that's a separate software/addon so it doesn't really count [sp]kinda[/sp] :v:
[QUOTE=paindoc;52291567]
[t]http://i.imgur.com/z9R4uo9.png[/t]
[/QUOTE]
Never done C++ but aren't those !data->contains(ln) conditionals both dereferencing a nullpointer? Wouldn't that just segfault or throw an exception?
Sorry, you need to Log In to post a reply to this thread.