Beginner C++ DirectX Game Programming Tutorial: Lesson 13

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

fledgling engineer here. this has been by far the most useful tutorial for me, explaining memory access and graphics processing. thank you for this. ive paged through the series up to this point and intend to watch the rest from here as well as your intermediate tutorial. i like your style. thanks!

pulsefrequency
Автор

Great Tutorials. I made c++ at the university ( only one semester and only console ), and I like it that you really go Step by Step, introducing not only regular C++ but also some DirectX... Thumbs up!!!!

MultiRandomise
Автор

Love the videos Chili, they have really helped me. I would do anything to see one uploaded every few days!

ngInverse
Автор

I only hit the like button on the 1st video and this one but I do actually appreciate all of them, especially this one since it explains A LOT about what goes on behind C++ and the hardware. I may not always hit the like on all of your videos but then again this video would've been WAY less clear without the previous ones so yeah, just thanks for everything so far, every single video, even the ones I didn't "like". I'm sure other viewers who didn't "like" also appreciate these videos as well. Another way to prove that lockRect() makes the program slow, I tried this, and yes it did: 

void D3DGraphics::BeginFrame()
{
pDevice->Clear( 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 0.0f, 0 );
for (int i=0; i++)
{
pBackBuffer->LockRect( &backRect, NULL, NULL );
pBackBuffer->UnlockRect();
}
pBackBuffer->LockRect( &backRect, NULL, NULL );
}

kevinanderson
Автор

i really love how you made another one so soon. these are really helping in understanding the syntax. cant wait till you get to 3d objects, although that might take a while before we are there.

keep up the speed :D

NouKonCrush
Автор

The series is exactly what I was looking for. Thanks for producing this and it is appreciated.

stevedeltoid
Автор

Im gonna share this videos mate, i promise, ur a great teacher u explain with clearance, observation and u compare it to something that we can logically associate with so it makes easier for us to understand those concepts, THANKS A+

darkdevil
Автор

Chilli dude i never had the chance to see my game on your tutorials :)... That was great! Your comments made me proud. You´re the best man! Thanks for this awesome tuts.
I´m back for continue your tutorials after a long absence time.
Thanks for your hard work!
Your friend Luskas

luskas
Автор

Great instructions on the intricacies of the CPU and GPU interaction.

titantim
Автор

Also holding Shift in PS will create a straight horizontal or vertical line, or you can click one point, hold Shift and click another point to make a straight line between points.

erliquin
Автор

Actually, there is no difference between having a separate putpixel function and and simply copying the code from the standpoint of performance. Google 'function inlining'. From the standpoint of maintainability however, putting putpixel in a separate function is highly preferable.

ChiliTomatoNoodle
Автор

not sure if i did it right, but just wrote inline before put pixel function, and it seemed to boost the performance just a tiny bit, altough when just pasting the code of the put pixel function in the square drawing algorithm there's clearly a boost in performance.

lookin back at my post, i see where i was wrong, every situation is diferent, so it requires different fix.

anyway thanks for the great video's so far, they really taught me lots, good luck and keep on going:)

viruskillerful
Автор

Thanks bro, I will try to remember that when I'm making the next video.

ChiliTomatoNoodle
Автор

Took me almost two hours but I DID IT! woooo! I think my way of doing it is probably kinda bad but it gets the job done. This game is actually pretty fun for how simple it is in design.

HankGreenburg
Автор

since you separated the release and lock for the backBuffer, why not just copy the template of the put pixel call and paste it into any object u create further on, i don't see why we should call a function for each pixel we wana draw:), altough i have a feeling later on we gona learn how to draw a full frame in our game first then send it to the back buffer or maybe work with the gpu directly..(i'm still a newbie so i can only guess how stuff works further on and how things can be improved)

viruskillerful
Автор

Instead of defining NPOO, we can simply declare it as: static const int nPoo = 15; , right?

The compiler says "it isn't a static", so I tried making it one, and it worked perfectly. :P

ink
Автор

I was using the old growing square task from an earlier video in the series, and the frame rate dropped to 11 when the square was only a small square in the top corner about 150 by 150 as a rough estimate, now the whole screen covered by the variable sized box remains 60 fps the whole time :) intense speed boost

connorglennon
Автор

I noticed something weird after adding the arrays.
When i'm building it takes forever to get done in release. It stops at "generating code" for like 30 sec+. Changing to debug solves it. Still weird though.

MyLittleMagneton
Автор

Uhm, The speed up doesnt work for me. Ive followed 2 times the EXACT same thing u do in the video to get it faster... it does say 1 Succeded, but when i start it says :
Unhandled exception at 0x772615de in Chili DirectX Framework.exe:
Access violation writing location 0xf9f00220.
Help please :/ ( Btw when i have the normal pixel set function it works just fine )

grymmatarmar
Автор

at 0:15:00 u say third but is actualy fourth since u start at 0, make sure to correct that for ppl to see, it may confuse ppl with no previous knowledge about array's

viruskillerful
visit shbcf.ru