Skip to content
  • If I ever wanted to hurt a company

    The Lounge design com graphics iot sales
    3
    0 Votes
    3 Posts
    0 Views
    T
    honey the codewitch wrote: Which I will *never* *ever* use now. I've been saying this for years, and I plan to stick by it, too! No sense in reinforcing bad behavior by shopping for their products...
  • 0 Votes
    3 Posts
    6 Views
    D
    Don't use the word "register". It doesn't apply in this case. Search for "BIOS and DOS interrupts" and you'll find what you're looking for. Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
  • I'm a bit overwhelmed

    The Lounge graphics design com iot algorithms
    16
    0 Votes
    16 Posts
    0 Views
    H
    The issue with fixed size is non-monospaced fonts requiring varying glyph sizes, and while I could use the "largest" size for each, rendering the transparency map to the screen requires alpha-blending - non-trivial. So the smaller the glyphs the better. I found in my tests that I had a memory leak. Haven't seen many of those in recent years, but here we are. I fixed that, sorted my cache problem, and wrote a screen full of text in about 17KB of cache, truetype. Heap frag wasn't as big an issue as I thought - the leak was. What I'm currently doing is I allocate a buffer for the first glyph. I render the glyph as an alpha transparency map, and then send that to the draw callback which puts in on the display. If the next glyph is bigger, I realloc() the buffer, and go for it again. None of this happens if I find it in the cache first. The callback never gets called, nor does the glyph copy memory get allocated (if everything is already cached) This takes a small amount of memory for the (uncached) rendering on a glyph per glyph basis and seems to work well. Caching improves the results significantly (a factor of 2 at least) when it doesn't have to expire, and moderately when it does. So I'm ready to move on to the next thing for now. Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
  • 0 Votes
    2 Posts
    0 Views
    pkfoxP
    So you should be :thumbsup: In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
  • Inheritance and STL containers

    C / C++ / MFC question c++ graphics docker oop
    4
    0 Votes
    4 Posts
    10 Views
    M
    Let me expand a bit on my previous answer[^]. As I said, you can convert a pointer (or reference) to pointer (or reference) to the base class. This called "upcasting" because you are moving "up" in the inheritance tree. The conversion is "non-destructive", in other words you can later on "downcast" (move from base to derived) as long as you know what type of object was in the first place. An example: struct Unit { Unit (int tag) : dog_tag(tag){}; virtual std::string kind () = 0; int dog_tag; }; struct Soldier : public Unit { Soldier (int tag) : Unit(tag) {}; virtual std::string kind() {return "soldier";}; float running_speed; } struct Sailor : public Unit { Sailor (int tag) : Unit(tag) {}; virtual std::string kind() {return "sailor";} int life_jackets; }; std::vector actors {new Soldier(555), new Sailor(666);}; int main () { Unit* u0 = actors[0]; std::cout << "Actor 0 is a " << u0.kind() " with tag " << u0.dog_tag << std::endl; If you would look with a debugger at u0 you would see a memory layout something like this: u0 0x1234 -------> pointer to vtable of Soldier dog_tag ----------------------------- running_speed ------------------------------ You can see now why the code works: no matter what kind of object you deal with, the first part of the memory layout is the same. Compiler simply ignores whatever is after the dog_tag field. A few more lines of code (please ignore that I didn't initialize other fields): Soldier *s = (Soldier *)u0; std::cout << "Running speed " << s->running_speed << std::endl; s has exactly the same value as u0 but compiler considers it a pointer to a Soldier object so it uses the value from the running_speed field. I could have written: Sailor *ss = (Sailor*)u0; std::cout << "Sailor has " << ss->life_jackets << " life jackets"; And compiler wouldn't have cared at all. It would have accessed the memory at lif
  • 0 Votes
    7 Posts
    0 Views
    G
    :-D Software Zen: delete this;
  • 0 Votes
    6 Posts
    0 Views
    N
    Yeah, a former co-worker of mine changed to their beta tester unit for the new versions M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.
  • 0 Votes
    3 Posts
    0 Views
    O
    More evidence that Microsoft needs to force third parties out of the Windows kernel. Notice that Hyper-V never suffered from these types of issues. It's because Microsoft vetted every single kernel driver before allowing it onto a Hyper-V server.
  • 0 Votes
    1 Posts
    7 Views
    No one has replied
  • dialog color

    C / C++ / MFC c++ com graphics help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • dialog color

    C / C++ / MFC c++ com graphics help
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • dialog update

    C / C++ / MFC c++ com graphics help question
    2
    0 Votes
    2 Posts
    0 Views
    OriginalGriffO
    2 Things: 1) Please don't repost if your question does not appear immediately: all of these went to moderation and required a human being to review them for publication. In order to prevent you being kicked off as a spammer, both had to be accepted, and then I have to clean up the spares. Have a little patience, please! I've deleted the 3 identical spares ... 2) Don't post this under Quick Answers - if you got the code from an article, then there is a "Add a Comment or Question" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to speak to them. Posting this here relies on them "dropping by" and realising it is for them. However, given that the article is 22 years old it's unlikely that anyone is going to know or remember details of how it works! "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
  • dialog color

    C / C++ / MFC c++ com graphics help
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • 0 Votes
    9 Posts
    0 Views
    H
    Mainly because Atmel tools stink. However, you can run Arduino on most of them rendering the issue largely moot, as long as you're willing to use Arduino. Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
  • 0 Votes
    9 Posts
    0 Views
    J
    Lol wut? I wonder if that dates to really old ASCII based UI. It's the only thing off the top of my head that makes it make sense. Hasbro bought a bunch of IP from Atari. Amongst it, I think, was Pac-Man. This led to a short-lived claim and series of suits which were premised on the idea that any game featuring a protagonist in a maze like environment was a derivative work. Bold move, Cotton.
  • One of my clients reached out to me unprompted

    The Lounge design com graphics iot
    11
    0 Votes
    11 Posts
    0 Views
    D
    Part of my job at the tiny company I work for is to look after the licenses we sell our customers and to help them get going, or upgrade to newer versions, that sort of thing, and I can absolutely do some of the more advanced tech support for any part of the code that I've actually written (and some I haven't). Throughout the years some customers have gone out of their way to say how impressed they are with the support they're getting, our dedication to quickly finding solutions or going right ahead and implementing a bug fix that gets released within hours of a problem being reported. Those always make my day. I never use a condescending tone, or treat customers like they're idiots, and always try to walk them through solutions just as if I was sitting right next to them at their desk and having a conversation.
  • New Linux box - my First pick

    The Lounge graphics linux business help question
    18
    0 Votes
    18 Posts
    0 Views
    D
    This looks an awful lot like the pair I got, and are currently both hosting my VMs after a 64GB RAM upgrade. And with the £100 voucher right now on the page you linked to, you can't go wrong. Heck, the same page has the same thing but with 16GB, at £315 and an extra £80 off. Personally I'd go with that, and buy a separate 64GB kit (2x32GB DDR4).
  • Spelunking

    The Lounge design visual-studio com graphics hardware
    4
    0 Votes
    4 Posts
    0 Views
    J
    "SERCOM7 was my huckleberry" Old west expression of "I like it because it works." Had not heard that expression in a long time. BTW. Actual Huckleberry Jam and Preserves is quite good with a very unique flavor. "A little time, a little trouble, your better day" Badfinger
  • Taking a bite out of bad standards

    The Lounge design visual-studio com graphics iot
    12
    0 Votes
    12 Posts
    0 Views
    J
    And thus mismatches are to be expected.
  • Philosophizing with my compiler

    The Lounge design c++ com graphics iot
    14
    0 Votes
    14 Posts
    0 Views
    FreedMallocF
    Quote: Imagine lobbying a government to pass stricter laws and longer sentences so you can lock more people up in your prisons. In the 50's and 60's Larry Niven wrote a bunch of short stories on using prison inmates as a sort of living organ bank to draw on when a contributing member of society needed a transplant. He wrote that as the need for transplant organs grew, lesser and lesser crimes sentenced you to prison. One of his stories was about a man arrested that knew he would be sentenced to the organ bank. He escaped, caused murder, mayhem and destruction, then was insulted that when he was caught again they only convicted him for his original crime - his 3rd minor traffic offense.