Details
-
AboutGame Developer
-
SkillsASM, C/C++, C#, Java, JavaScript, HTML, CSS, GLSL, OpenGL, Tomcat, NodeJS, Vue, WebAssembly
Joined devRant on 2/10/2017
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
So I was wondering if any of you know if any good ways to inject additional functionality into a function in CPP. My use case is injecting a counter into an OpenGL draw function to see how many times per frame it's called. I know I can do this using assembly Inca more hacky manner as you might do for cheats in games(code caves), but I'm more interested in adding is for debugging/statistics for the game engine I'm working on. Basically im looking for a portable stable way of doing it that when I compile as a debug build, the code gets added to various functions, and when I compile under release, it doesn't.
Example:
glDraw();
Would call
glDraw() {
drawCount++; //some debug stuff
glDraw(); //call the real one internally
}
I should mention with code caves you can do this by saving the original address of the function, patching the vTable to point to your new function that has the same parameters etc, then all calls to that function are redirected to yours instead and then you simply call the original function with the address of the function you originally saved. That said, I'm not sure how to access vTable, etc the "normal" way...2 -
So I'm doing some OpenGL stuff in C++, for debugging I've created a macro that basically injects my error check code after every OpenGL API call. Basically I don't want any of the code in release builds but I want it to be in debug. Also it needs to be usable inline and accept any GL function return type. From what I can tell I've satisfied all requirements by making the macro generate a generic lambda that returns the original function call result but also creates a stack object that uses the scope to force my error check after the return statement by using the destructor.
Basically I can do:
Log(gl(GetString(...));
gl(DeleteShader(...));
Etc where the GL call can be a function parameter or not.
So my question is, is the code shown in the picture the best way to achieve my goals while providing the behaviour im going for?13 -
Anyone know of any good reference material that teaches you how to implement and train your own Yolo object localization neural network? (Preferably for tensorflow) I'm not looking for pretrained models that you just downloaded and run, rather a tutorial that walks you step by step through the implementation of the network, the reasoning behind the architecture, and examples of the training data used for the training as well as the process of training?
I know it's a lot to ask but it's really frustrating when ever example is just "clone this repo, hit run and use the pretrained models" sure it might get you up and running quickly but it doesn't really teach you anything...
P.s. - seems like every educational post goes from super simple to super complex without any middle ground and the super complex stuff doesn't tell you why its used the way way it is.5 -
Anyone here use the NodeJS HTTP/2 API? I started working with it the other day and I can get static files served fine with it but when I try and use it's push feature to "bundle" additional resources that the page will need, it doesn't seem to work, the client still requests the resources from the server instead of looking in the "push" cache. Also the load time seems longer when using http/2 vs 1, was wondering if anyone else had come across these issues and found workarounds. P.S. - I'm using Chrome to test on, with https://localhost and some self-signed certs as http/2 isn't implemented in browser unless using https1
-
Why the fuck is it Impossible to get crisp font rendering on chrome (widows desktop), Firefox looks sooooo much more crispy... Get your shit together Google, also while your at it, catch up to Firefox with WebAssembly loading time.
And Firefox, it would be really nice if you could start supporting brotli compression... Just saying.2 -
Does anyone know any good resources that walk you through building a image localization neural network(preferably in tensorflow)? Something that talks you through the though process behind the network design decisions and perhaps examples of training data used to train the network? It seems like every search result is just an example of how to download a premade network and it's weights which from a learning perspective is not very helpful. I'de really love to see one of the Yolo version walked through and trained but honestly any localization would be helpful.
-
So I'm target multiple platforms with one of my c++ projects and on one of the platforms I the window manager is quite different, and one of the libraries can't be used. Thats fine for my needs, I'm just wondering what the typical way to allow for these differences is. Basically currently I've created 2 "main" files that have preprocessor code to only use he one that's right for the platform by having ifdefs at the beginning of each, I've kinda followed that methodology for the other files that are totally platform specific also. Is there a better way to go about this? Currently using msvc for windows compilation and a gcc-esqu compiler for one of the other platforms, where the compile command is built by a home made build tool.
-
So I was working on a Web Assembly project and when I ran my build chain everything compiled fine, when I would run it however, I'de get random exception when I changed things like a value of a float. After 3 hours I realized the build chain had been "finished" while it was actually still writing out a file, and when I was accessing the web page, the file was corrupt for the first 30 seconds or so. Spent so long trying to fix something that actually wasn't broken FML.4
-
So someone just beat my highscrore i held for over 2 years in a game I release on Google Play. On one hand I'm happy some put a lot of effort into playing my game😆, on the other hand I'm sad I no longer have the highscrore😢...4
-
Is there a simple CPP equivalent to a tree node in Java that has a parent and a arraylist of children? Or will I have to write out a 500+ line class to get the same functionality? 🤔12
-
So I just installed Elementary OS Loki on my older desktop and for that the wifi is incredibly slow, like 30 seconds to load googles home page. It also randomly stops working, and gives a no network connection. When this system was on windows I would average 50~ mb/s down speed, changing it to Linux I'm lucky to maintain 2mb/s. I've been googling for hours and nothing I try seems to work, any Linux pros here able to give me some suggestions. The network card in the PC is an Aetheros one, I it supports a,b,g,n and Bluetooth, I'm currently using the desktop with a Bluetooth mouse / kbd. (None of the hardware/setup has changed since using windows)2
-
I'm porting an OpenGL project to work with WebAssembly, I'm using emscripten to compile/generate the 'glue' to JS. Sofar I'm able to render my gl code properly through the glfw3 framework. I know you can use emscripten callbacks for input, however I was hoping to keep my existing glfw3 callback setup, that said the only callback that seems to be working properly is mouse position, window resize, keyboard, etc never get called. If anyone knows how to enable these I'd be super greatful!1
-
So for the past day I've been obsessed with adding compression into my build pipeline for web dev, I've implemented html minify, babel JS minify, gzip and made the server specify content length to prevent chunking and shave off a few unused bytes. Is there anything else anyone can think of to get even more gains? Sofar my project went from 1.33mb to 180kb transferred. It's a huge win, just wondering if I can push it further somehow?1
-
Anyone know of any GPU accelerated Machine Learning libraries that DON'T need Python, something maybe using C/C++, C# or Java?12
-
Be me half asleep wondering if the other instances of me will be able to figure out the solution... Suddenly I realize I'm the only me. Shit. Wtf have you done to me programming!?1
-
Anyone know a good site to ask programming questions that are more on the looking for suggestions side of things rather than explicit answers? Apparently Stackoverflow mods would rather wave there mighty e-peen and close a thread if your looking for suggestions on how to go about something... 😕7
-
Always fun to come back to an older project to update stuff only to find your IDE and SDK updates have broke your old code base and you now need to debug and update a lot more then you initially wanted to. 😣1
-
There's nothing quite like an app force closing for no apparent reason, and no error log info.
Just spent an hour figuring out that one of the device I test on doesn't like linking GLSL shader programs if it contains a loop even know every other devices I've tested on are totally fine with it. 😑