|
Years ago I bought an Atari ST and had fun programming in Assembler making graphics utilities and stuff. The entire graphics interface consisted of single byte address of your buffer in memory that was passed to the OS. Coding was like the freedom of running naked on a tropical island. If you wanted to draw a line across the screen based on one of the 3 modes you'd have to figure out which exact byte and bit of the buffer to turn on and off to make it happen, it was challenging and fun. It was all up to you.
Now today I still have fun coding but I have to admit that things are a bit daunting. To draw that same line using an interface such as DirectX 2D RenderTarget you just call the DrawLine function. Ok, that's easy enough but it takes some serious research just to get the RenderTarget ComPtr initialized. Plus we are stuck with the methods of RenderTarget. Gone are the days where every pixel of the screen was at your code's disposal. DirectX is so complicated it's nearly impossible to figure out every nook and cranny. I'll probably never know why some of my printed characters in DirectX end up a bit garbled despite hours and hours of "googling" for the answer.
Of course if I want that same freedom of yesteryear I can write directly to a bitmap's buffer and bitblt it to a DC, just not as fast as directX. Yes I realize that every graphics card is different and without the drivers I'd be stuck handling graphics modes for every known graphics card on the market.
I don't know, it seems like the finer details DirectX is kind of hidden behind wall of complexity that is hard to breach. If I could figure out how to make a line march across a screen by turning bits on and off in a buffer 35 years ago one would think that I'd be able to code up and down the 3d pipe line and create complex shaders and stuff, but no, it's all just too complicated to even want to figure out anymore. The www seriously lacks examples of all directX features.
I guess I'm just a cranky old man now complaining about how things aren't as easy as it used to be. It's like today's machine isn't really a computer anymore, it's more a service with complicated contracts and laws that you have to sign off on to use. Soon I suppose it will just be a monitor connected to the cloud.
Yeah, I'll admit alpha channels and transparency are pretty cool. I suppose one day I'll have to post my entire RenderTarget .h and .cpp class files to the board and ask why my characters sometimes appear garbled, but not today. I think for now I'll just reminisce about the good old days when it all boiled down to a single address in memory.
|
|
|
|
|
If you want to access the pixels to draw your line, you're better off sticking with GDI/GDI+. With Direct2D DeviceContext (not RenderTarget), you can retrieve the bitmap from the GPU and draw your line on the CPU and send it back to the GPU but it slows down the drawing operation of Direct2D. DeviceContext is a class that inherits from RenderTarget class.
modified 31 mins ago.
|
|
|
|
|
You can draw a line with DirectX or OpenGL with each pixel made up of 2 triangles. I draw the sine curve on the GPU on this Youtube(below). I send a bunch of triangles that form a straight horizontal line. And the DirectX shader transforms the straight line into a sinewave based on elapsed time. With GPU, the thinking must be shifted from pixels to triangles involving shaders which is a steep learning curve and lots of coding involved.
Mandy Frenzy With All Photo Effects Shown - YouTube
|
|
|
|
|
Wordle 594 3/6
🟨⬛🟨🟩⬛
⬛🟩🟩🟩⬛
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 594 4/6
🟨⬜⬜⬜⬜
⬜🟩🟩⬜⬜
⬜🟩🟩🟩🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 594 4/6
⬛⬛🟨⬛⬛
🟨⬛⬛🟨🟨
⬛🟩🟩🟩🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 594 5/6
🟨⬜⬜⬜⬜
🟨🟩⬜⬜🟨
⬜🟩🟩🟩🟩
⬜🟩🟩🟩🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 594 3/6*
🟨⬜⬜🟨⬜
🟨🟩⬜⬜🟨
🟩🟩🟩🟩🟩
"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!
|
|
|
|
|
Roberta Williams, creator of all the great Sierra Online games from the 80's like King's Quest, Space Quest, Leisure Suit Larry, and others, brings the ancient all-text game to the 21st century. I can't wait to play this!
Colossal Cave 3D[^]
There are no solutions, only trade-offs. - Thomas Sowell
A day can really slip by when you're deliberately avoiding what you're supposed to do. - Bill Watterson (Calvin & Hobbes)
|
|
|
|
|
|
#Worldle #377 4/6 (100%)
🟩🟩🟩🟩🟨↖️
🟩🟩🟩🟩🟨↘️
🟩🟩🟩🟩🟨↘️
🟩🟩🟩🟩🟩🎉
https://worldle.teuteuf.fr
binary search - should have gone with first instinct
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
When he got home I asked "Was everything okay?"
"Yes", he replied "well, everything seemed okay until he stuck his finger up my bum."
I laughed "Well, that's a normal procedure at your age!"
"So you don't think I should change my dentist then?" he said.
To err is human. Fortune favors the monsters.
|
|
|
|
|
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Deep Clean?
PartsBin an Electronics Part Organizer - An updated version available!
JaxCoder.com
|
|
|
|
|
Well..
The dentist has the dirtiest hole in from the entire intestinal tract, as most bacteria live there. More than on a bum, so that area is dirtier than a bum. Don't tell that to your dentist btw.
Also, a finger is hardly an examination. They shove two meters of flexible tube up your arse containing a camera.
That's a "normal" procedure for you these days!
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
That's a good thing, right? Where were you bleeding from?
[redacted, short version]
..you might have caused it.
[redacted, lots of cursing]
Men, from around the world, never ask for your chances.
Eleven weeks, six days. 196 days to go.
I have no clue of what to do. She does all. I'm just the panicking idiot at this point.
Pray for me.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Best wishes to her and yourself, a scary thing indeed.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Tx.
It has to be a secret for two more days..
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Your secret is safe with us.
"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!
|
|
|
|
|
Most people in my social life do not visit this board. Just one.
I'm scared shiteless, there's no on/off button or a reset-switch on those critters.
Do you want to proceed? "Yes / Abort".
FFS.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
I'll just share my mother's advice to new parents: Jeanette: "Not to worry, the first eighteen years are the worst - then it gets better quickly!"
"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!
|
|
|
|
|
And you are sure you don't need some professional help? 
|
|
|
|
|
Congrats, that is a wondrous event.
The first 21 years are the hardest.
>64
Some days the dragon wins. Suck it up.
|
|
|
|
|
|