Click here to Skip to main content
15,885,278 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: I never liked writing graphics libraries Pin
Rick York11-Mar-21 11:00
mveRick York11-Mar-21 11:00 
GeneralRe: I never liked writing graphics libraries Pin
honey the codewitch12-Mar-21 3:38
mvahoney the codewitch12-Mar-21 3:38 
GeneralRe: I never liked writing graphics libraries Pin
Rick York12-Mar-21 6:15
mveRick York12-Mar-21 6:15 
GeneralRe: I never liked writing graphics libraries Pin
honey the codewitch12-Mar-21 8:22
mvahoney the codewitch12-Mar-21 8:22 
GeneralRe: I never liked writing graphics libraries Pin
Daniel Pfeffer11-Mar-21 22:21
professionalDaniel Pfeffer11-Mar-21 22:21 
GeneralRe: I never liked writing graphics libraries Pin
honey the codewitch12-Mar-21 3:29
mvahoney the codewitch12-Mar-21 3:29 
GeneralRe: I never liked writing graphics libraries Pin
Gary R. Wheeler12-Mar-21 10:35
Gary R. Wheeler12-Mar-21 10:35 
GeneralRe: I never liked writing graphics libraries Pin
honey the codewitch12-Mar-21 10:46
mvahoney the codewitch12-Mar-21 10:46 
I'm on the fence about using templates for that. flash program space is almost more valuable than RAM so templates are problematic because of the code bloat they tend to introduce. I'm not fully opposed to them in this case, and i've used one or two little ones (mainly for templating a piece of hardware's physical pin assignments) but I haven't been doing any generic programming as a rule.

The driver does exactly what you're talking about. And the challenge is coming up with something high level enough that it satisfies the better devices in terms of being able to use their hardware features like line drawing, without incurring a bunch of overhead for most drivers that don't have it and typically just deal in bltting.

My attempted approach right now is to build the fundamentals into the library such that the compiler and linker can eliminate what's not used - for example, if your hardware supports line drawing the software won't link the line drawing code into the library.

I'm doing this by creating static helpers that do basic drawing. The drivers call the hardware or return a not_supported result. If it's not supported, a canvas can fallback on using the software, at which point it will be included in the final source.

This is tricky. The other thing I'm running into is if I expose a canvas from a given bitmap, then I have to support any graphics features used by that canvas in software, since no video card is involved, leading to potential inclusion of much of the library under many situations. =(
Real programmers use butterflies

GeneralStart baking a pie Pin
Cp-Coder11-Mar-21 4:54
Cp-Coder11-Mar-21 4:54 
GeneralRe: Start baking a pie Pin
OriginalGriff11-Mar-21 5:15
mveOriginalGriff11-Mar-21 5:15 
GeneralRe: Start baking a pie Pin
Cp-Coder11-Mar-21 5:29
Cp-Coder11-Mar-21 5:29 
GeneralRe: Start baking a pie Pin
OriginalGriff11-Mar-21 5:46
mveOriginalGriff11-Mar-21 5:46 
GeneralRe: Start baking a pie Pin
DRHuff11-Mar-21 6:51
DRHuff11-Mar-21 6:51 
GeneralRe: Start baking a pie Pin
theoldfool11-Mar-21 5:57
professionaltheoldfool11-Mar-21 5:57 
GeneralRe: Start baking a pie Pin
W Balboos, GHB11-Mar-21 6:22
W Balboos, GHB11-Mar-21 6:22 
GeneralRe: Start baking a pie Pin
DRHuff11-Mar-21 6:49
DRHuff11-Mar-21 6:49 
GeneralRe: Start baking a pie Pin
Richard MacCutchan11-Mar-21 6:25
mveRichard MacCutchan11-Mar-21 6:25 
JokeRe: Start baking a pie Pin
PIEBALDconsult11-Mar-21 5:15
mvePIEBALDconsult11-Mar-21 5:15 
GeneralRe: Start baking a pie Pin
OriginalGriff11-Mar-21 5:47
mveOriginalGriff11-Mar-21 5:47 
GeneralRe: Start baking a pie Pin
Eddy Vluggen11-Mar-21 6:29
professionalEddy Vluggen11-Mar-21 6:29 
GeneralRe: Start baking a pie Pin
Sander Rossel11-Mar-21 8:44
professionalSander Rossel11-Mar-21 8:44 
GeneralRe: Start baking a pie Pin
jeron111-Mar-21 9:40
jeron111-Mar-21 9:40 
GeneralRe: Start baking a pie Pin
Sander Rossel11-Mar-21 20:49
professionalSander Rossel11-Mar-21 20:49 
GeneralRe: Start baking a pie Pin
jeron112-Mar-21 5:45
jeron112-Mar-21 5:45 
GeneralThought of the Day Pin
OriginalGriff11-Mar-21 4:33
mveOriginalGriff11-Mar-21 4:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.