Search found 20 matches

by SamCam
November 15th, 2020, 4:03 am
Forum: Everything
Topic: Get pixel function for D3D11 backbuffer?
Replies: 4
Views: 109

Re: Get pixel function for D3D11 backbuffer?

Working code! I ended up making two functions, one as a single GetPixel and this one for returning the pointer to the pixels which was much more performant for my needs. Thanks to people on the Discord who helped me move this along. uint8_t* Graphics::GetFramePtr() const { //Create copying/buffer te...
by SamCam
November 13th, 2020, 3:03 pm
Forum: Everything
Topic: Get pixel function for D3D11 backbuffer?
Replies: 4
Views: 109

Re: Get pixel function for D3D11 backbuffer?

This is where I'm at currently. Getting an excpetion thrown at pContext->Map() "Map cannot be called with MAP_READ access, because the Resource was not created with the D3D11_CPU_ACCESS_READ flag. " Which is confusing as the newly created resource has the D3D11_CPU_ACCESS_READ flag enabled. This is ...
by SamCam
November 13th, 2020, 2:09 am
Forum: Everything
Topic: Get pixel function for D3D11 backbuffer?
Replies: 4
Views: 109

Get pixel function for D3D11 backbuffer?

What's up dudes! Has anyone tried/succeeded in making a getpixel type function in the D3D setup? Perhaps it comes later on the course, apologies if so. From reading so far I think I need to: 1. Create a 2Dtexture 2. Fill out descriptor for the 2Dtexture 3. GetBuffer() from the pSwapChain and fill th...
by SamCam
June 28th, 2020, 6:13 pm
Forum: Everything
Topic: Identifier "kbd" is undefined
Replies: 5
Views: 556

Re: Identifier "kbd" is undefined

Righto, Looks like you're using Chili's old video series, but if you followed the link and downloaded the current engine from the link in the video description you've probably downloaded the newer (2016) framework. In which case you may find a lot of things that Chili does wont work right for you. T...
by SamCam
June 28th, 2020, 11:42 am
Forum: Everything
Topic: Identifier "kbd" is undefined
Replies: 5
Views: 556

Re: Identifier "kbd" is undefined

Hey, welcome!

Is your code looking something like this?

Code: Select all

  if (wnd.kbd.KeyIsPressed(VK_LEFT))
    {
        x = x + 100;
    }
   
It's hard to say what your problem is without a little more detail.
by SamCam
June 10th, 2020, 4:12 pm
Forum: Everything
Topic: SFML Project help (or FML project... at the moment)
Replies: 8
Views: 789

Re: SFML Project help (or FML project... at the moment)

That's cool, I've been doing a few of those little coding challenges they have on hackerrank, which seem to do just that. I can see how automated testing would be useful. As the man himself once said, if you can give the user a way to get their dick caught in a ceiling fan they'll do it. I'm still a...
by SamCam
June 9th, 2020, 11:16 pm
Forum: Everything
Topic: SFML Project help (or FML project... at the moment)
Replies: 8
Views: 789

Re: SFML Project help (or FML project... at the moment)

Haha, its a minefield there's probably no correct solution just what works well at the time. I get excited when things are all moving forward but then it feels like a drag to have to move all of the code around and make it play together again. Probably a moderation of excitement and less wasting tim...
by SamCam
June 8th, 2020, 9:36 pm
Forum: Everything
Topic: SFML Project help (or FML project... at the moment)
Replies: 8
Views: 789

Re: SFML Project help (or FML project... at the moment)

Hey, thanks once again, I ran your changes, had a couple of issues but solved them. I think I was probably overthinking things a bit which let to me using unique_ptr which is unnecessary as you say. From now on I'm just going to try and write classes to begin with and not end up with a load of stuff...
by SamCam
June 7th, 2020, 9:46 pm
Forum: Everything
Topic: SFML Project help (or FML project... at the moment)
Replies: 8
Views: 789

SFML Project help (or FML project... at the moment)

Hey guys, I'm looking for a little help with this project/demo I started building with SFML (sorry Chili engine) The aim of this little project is to be able to type in some text to a screen from a remote network source, the text should appear 'live' so you can see the remote users train of thought,...
by SamCam
May 30th, 2020, 11:26 am
Forum: Everything
Topic: Vector of enemies, problems with a surface?
Replies: 4
Views: 599

Re: Vector of enemies, problems with a surface?

Many thanks, just getting an understanding of the issue is really helpful. I'll be trying to take this little project forward using some of the techniques described in the later intermediate series videos. For example, I will want some different enemies to inherit and extend the enemies functionalit...