Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24

Thread: This is easiest way to make screenshoots of your game.

  1. #11

    This is easiest way to make screenshoots of your game.

    Quote Originally Posted by cairnswm
    How do you get the info from a stream into a TBitmap object?

    If we could do this then you can use the more standard Delphi calls to save JPEG and PNG.
    i don't use VCL, i have a bmp header structure record and fill it and write the file manually.
    This is my game project - Top Down City:
    http://www.pascalgamedevelopment.com...y-Topic-Reboot

    My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
    http://www.pascalgamedevelopment.com...source+manager

  2. #12
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    This is easiest way to make screenshoots of your game.

    Quote Originally Posted by Delfi
    Quote Originally Posted by cairnswm
    How do you get the info from a stream into a TBitmap object?

    If we could do this then you can use the more standard Delphi calls to save JPEG and PNG.
    i don't use VCL, i have a bmp header structure record and fill it and write the file manually.
    I know. But can you get it into a TBitmap object?
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  3. #13

    This is easiest way to make screenshoots of your game.

    Don't forget that if your in SDL mode you can't use the methods Delfi has provided, instead you have to use SDL_SaveBMP()

    So, I've set my code up so that it checks a global InOpenGL flag and then calls the proper storage routine

  4. #14

    This is easiest way to make screenshoots of your game.

    Quote Originally Posted by jdarling
    Don't forget that if your in SDL mode you can't use the methods Delfi has provided, instead you have to use SDL_SaveBMP()

    So, I've set my code up so that it checks a global InOpenGL flag and then calls the proper storage routine
    what has that to do with anything? o_O the code will work independently of SDL, VCL or any other library you can find out there, it will work if you even compile it into a DLL and inject it into quake3 or something like that, it uses it's own, pure opengl and just Tmemorystream routines to make a bitmap and save it to a file...
    This is my game project - Top Down City:
    http://www.pascalgamedevelopment.com...y-Topic-Reboot

    My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
    http://www.pascalgamedevelopment.com...source+manager

  5. #15
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    This is easiest way to make screenshoots of your game.

    If using SDL and OpenGL you may not actually be in OpenGL - in which case the SDL_SaveBMP is needed instead
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  6. #16

    This is easiest way to make screenshoots of your game.

    Quote Originally Posted by cairnswm
    If using SDL and OpenGL you may not actually be in OpenGL - in which case the SDL_SaveBMP is needed instead
    not sure what you mean.. if you have a sdl opengl ap running and call that code, it will work.
    This is my game project - Top Down City:
    http://www.pascalgamedevelopment.com...y-Topic-Reboot

    My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
    http://www.pascalgamedevelopment.com...source+manager

  7. #17

    This is easiest way to make screenshoots of your game.

    Hate to be a smartass here, but

    Does anyone know that if you press Alt-PrtScn
    You only get a picture of the current foreground window, instead of the whole screen?
    My site: DelphiTuts.com (coming soon)...

    Download Font Studio 4.21 here.

  8. #18
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    This is easiest way to make screenshoots of your game.

    Quote Originally Posted by Delfi
    Quote Originally Posted by cairnswm
    If using SDL and OpenGL you may not actually be in OpenGL - in which case the SDL_SaveBMP is needed instead
    not sure what you mean.. if you have a sdl opengl ap running and call that code, it will work.
    But if its not OpenGL? This solution works for OpenGL windows - not SDL windows (unless using OpenGL)
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  9. #19
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    This is easiest way to make screenshoots of your game.

    Quote Originally Posted by Nitrogen
    Hate to be a smartass here, but

    Does anyone know that if you press Alt-PrtScn
    You only get a picture of the current foreground window, instead of the whole screen?
    But this puts it in a file. Also excludes the Title bar and frame if a windowed app

    So while running the game you can make multiple game shots
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  10. #20

    This is easiest way to make screenshoots of your game.

    Nitrogen:

    Yeah i know, but that's not practical for a game use, a game needs it's own screenshoot saving routine, which can have various use, either for graphical effects or just to let players save screenshoots of various moments in your game.

    Clipboard isn't portable between platforms, and can hold only 1 screenshoot, also the user has to save it to disk himself.

    cairnswm:

    It is not meant to be used with just SDL, it is meant for opengl (and sdl with opengl), i never said it is for SDL :/
    This is my game project - Top Down City:
    http://www.pascalgamedevelopment.com...y-Topic-Reboot

    My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
    http://www.pascalgamedevelopment.com...source+manager

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •