Jump to content

  • Log In with Google      Sign In   
  • Create Account

Endurion

Member Since 21 Feb 2002
Offline Last Active Today, 01:17 AM

#5272443 Desktop capturing with DirectX 11

Posted by Endurion on 24 January 2016 - 02:01 AM

The problem I think is that you can't simply access the desktop backbuffer (there might not even be one -> classic theme) from DirectX. You best bet is probably using GDI. It's not that performant, but you only need to grab it once:

 

Look at http://stackoverflow.com/questions/5069104/fastest-method-of-screen-capturing, the GID way.




#5263770 loop: for(....) {... continue loop; ....} doesn't work

Posted by Endurion on 27 November 2015 - 01:01 AM

Seriously, stop hammering the Post button if it doesn't work right away.

 

This looks like Java. So the problem probably is the string comparison with the literal. Use this:

 

if ( ze.getName().equals( "_rels/.rels" ) ) continue loop;




#5257858 Problems writing a BMP exporter

Posted by Endurion on 19 October 2015 - 01:21 AM

To add on on the upside down:

 

If you store height as negative the bitmap data is top down instead.

 

Also, for iFileSize you must use the size calculated with scanline size as Gl2eenDl2agon described.




#5255876 What's the best system on which to learn ASM?

Posted by Endurion on 06 October 2015 - 01:29 PM

I'd target the machine you actually want to target :)

 

Obviously I'm biased for the C64, there's documentation abundant and there's no problem getting decent cross compilation tools.

 

<SelfAd>I recommend C64-Studio, my Visual Studio like IDE, which uses (Win)VICE for a neat debugging experience.</SelfAd>




#5254017 sprite render is very slow

Posted by Endurion on 25 September 2015 - 11:30 AM

As BitMaster said, make the PeekMessage check a while. Process all messages from a queue or you have extremely delayed window behaviour (dragging your window should lag like hell). It's not solving the main problem, but could be the cause of a few others.

 

while ( PeekMessage( &message, NULL, 0, 0, PM_REMOVE ) ) 
{ 
  TranslateMessage( &message ); 
  DispatchMessage( &message ); 
}



#5251826 Cursor Position slowly becoming less pixel perfect when moving from origin

Posted by Endurion on 11 September 2015 - 11:57 PM

Did you take in account the window border size? The size you pass to CreateWindow(Ex) is the outer size.

 

You can use AdjustWindowRect(Ex) to calculate the outer size from a wanted client size.




#5248693 Visual Studio 2013 raw string support missing

Posted by Endurion on 24 August 2015 - 11:42 PM

From the MSDN site you seem to have to add brackets inside the quotes:

 

std::string test = R"(\hello)";




#5244129 default install folder for windows game

Posted by Endurion on 02 August 2015 - 04:48 AM

You might try the guest account (or a samey common other user account) for testing. Install the game, run the game under the other account (via Shift-right click, run as...) and see if it works.

 

A bit annoying to debug this way, but doesn't require changing logged in user.




#5243952 Constant speed for dragging of 3D objects by mouse

Posted by Endurion on 31 July 2015 - 11:21 PM

Frame time shouldn't be used here at all?

 

Unless you want to push the object which would then be going on its way all by itself the object should simply be placed under the current location of the mouse.




#5238791 Monogame explorer crashes when doing a simple shader?

Posted by Endurion on 07 July 2015 - 08:59 AM

Just an additional info on fullscreen debugging in VS:

VS does show an error message, which is the actual problem. It displays the "debug or abort" dialog, which cannot be shown in full screen modes (because the main window of an app that goes fullscreen usually gets topmost set)

In such cases press Escape and then try to abort debugging (Shift-F5 is the default debug cancel key AFAIR)


#5238307 2D Platform C++ Templates?

Posted by Endurion on 03 July 2015 - 10:57 PM

Here's an old game I made for Dr. Dobb's Challenge back in the days: It's using DX8 in the back and comes with the full source. No other external libraries are required. You may have to search for an old DX8 SDK though:

 

http://www.georg-rottensteiner.de/en/games.html#Dr._Dobb's_Challenge_




#5238139 How to run a DX8 application on windows 7 64-bit

Posted by Endurion on 03 July 2015 - 02:02 AM

I can run my DX8 apps fine on Win 7 64bit (C++ though).

 

Is there any error code in that exception? That might give some hints on what exactly fails.




#5232533 should WndProc process WM_QUIT?

Posted by Endurion on 03 June 2015 - 01:40 AM

Little note on WM_QUIT: If you have more than one message pumps going (different threads); or nested pumps (modal windows for example), you may have to repost the WM_QUIT message if you receive it in one of the inner loops.

 

Mr. Chen says this: http://blogs.msdn.com/b/oldnewthing/archive/2005/02/22/378018.aspx




#5230785 Platformer movement and collision

Posted by Endurion on 25 May 2015 - 02:16 AM

The code snippet is completely missing the jumping part, so we are bound to guess.

 

My 8ball suggests a common mistake: Turn gravity off when jumping.

 

 

Or post at least the jump code and any code that controls both jumping and falling.




#5226908 DirectInput vs Windows API input

Posted by Endurion on 02 May 2015 - 10:52 PM

Be aware though, some parts of DirectInput are NOT available otherwise: Named controller parts (Axis, buttons, etc.) and calibration data.

 

Unfortunately I can't find the site anymore where they (not MS) explained how to use Raw Input generally but fetch the calibration and controller part info from DirectInput's registry entries.

 

My current library uses Raw Input to fetch HID data plus DirectInput data (not the library itself though) to interpret data. It's nicer for the player to select a named device than "some gamepad at USB port 17".






PARTNERS