Well, short of calculating the size of the title bar and border, and than removing those from the image and saving the bitmap that way... Perhaps, simply not creating a window with titlebar/border?
I think WS_POPUP will eliminate the title bar and maybe borders for Win32. Try setting the "border" to "none" with the miscParams when creating the window.
high resolution (I mean REALLY high)?
-
- OGRE Retired Team Member
- Posts: 2543
- Joined: Fri Oct 24, 2003 2:53 am
- Location: San Diego, Ca
- x 2
Have a question about Input? Video? WGE? Come on over... http://www.wreckedgames.com/forum/
-
- Gnoblar
- Posts: 9
- Joined: Thu Dec 21, 2006 6:27 am
- Location: ChengDu,SiChuan,China
-
- Gnome
- Posts: 375
- Joined: Sat Jul 16, 2005 1:42 am
- Location: Montreal
I've greatly modified the wikied function High resolution screenshots in order to automatically stitch the various sub-views/grids.
In my previous post in this thread I mentioned problems with DirectX windowed mode (showing the title bar and sizing border) as well as OpenGL windowed mode (black lines around the sub-views) and fullscreen mode (black lines as well as the first grid not using the proper projection matrix). Those were solved by modifying the DirectX and OpenGL render systems. A patch was submitted or you can edit your version of the code (compatible with both Dagon and Eihort).
In order to fix the problem with the first grid when using the OpenGL render system in fullscreen mode I made a call to glReadBuffer(GL_FRONT). However it is my opinion that this solution is a hack and that it points toward a bug with the OpenGL renderer; it does not behave the same was as the DirectX renderer. Hopefully someone more knowledgeable can look into this.
In my previous post in this thread I mentioned problems with DirectX windowed mode (showing the title bar and sizing border) as well as OpenGL windowed mode (black lines around the sub-views) and fullscreen mode (black lines as well as the first grid not using the proper projection matrix). Those were solved by modifying the DirectX and OpenGL render systems. A patch was submitted or you can edit your version of the code (compatible with both Dagon and Eihort).
Code: Select all
RenderSystems/Direct3D9/src/OgreD3D9RenderWindow.cpp
----------------------------------------------------
void D3D9RenderWindow::writeContentsToFile(const String& filename)
Replaced:
GetWindowRect(mHWnd, &srcRect);
With:
GetClientRect(mHWnd, &srcRect);
POINT point;
point.x = srcRect.left;
point.y = srcRect.top;
ClientToScreen(mHWnd, &point);
srcRect.top = point.y;
srcRect.left = point.x;
srcRect.bottom += point.y;
srcRect.right += point.x;
RenderSystems/GL/src/OgreWin32Window.cpp
----------------------------------------
void Win32Window::writeContentsToFile(const String& filename)
Replaced:
glReadPixels(0,0, mWidth-1, mHeight-1, GL_RGB, GL_UNSIGNED_BYTE, pBuffer);
With:
if (mIsFullScreen)
glReadBuffer(GL_FRONT);
glReadPixels(0,0, mWidth, mHeight, GL_RGB, GL_UNSIGNED_BYTE, pBuffer);
-
- Gnoblar
- Posts: 5
- Joined: Wed Aug 22, 2007 8:20 pm
Added an Example Screenshot class into Wiki
Hi,
i added an example implementation of a screenshot class, which is designed for Shoggoth(1.6.x).
Parts of this class based on the previous Eihort (v1.4.x) code (incl. comments) and the Render to Texture - Tutorial.
The approach is to render into a texture and copy the content to a PixelBox.
Finally use Ogre::Image::loadDynamicImage(params) to store the content of the PixelBox into a file. This is the fastest way we could find to make hires screenshots, if you know what can enhance the performance, please let us know.
Here is the link again http://www.ogre3d.org/wiki/High_resolution_screenshots
i added an example implementation of a screenshot class, which is designed for Shoggoth(1.6.x).
Parts of this class based on the previous Eihort (v1.4.x) code (incl. comments) and the Render to Texture - Tutorial.
The approach is to render into a texture and copy the content to a PixelBox.
Finally use Ogre::Image::loadDynamicImage(params) to store the content of the PixelBox into a file. This is the fastest way we could find to make hires screenshots, if you know what can enhance the performance, please let us know.
Here is the link again http://www.ogre3d.org/wiki/High_resolution_screenshots
-
- OGRE Retired Team Member
- Posts: 3335
- Joined: Tue Jun 21, 2005 8:26 pm
- Location: Rochester, New York, US
- x 3
-
- Greenskin
- Posts: 117
- Joined: Mon Jul 10, 2006 5:37 am
-
- Goblin
- Posts: 205
- Joined: Wed Apr 25, 2007 9:47 pm
- Location: Centallo (I)
- x 2
Re: high resolution (I mean REALLY high)?
hi!
with the new ogre 1.9 the code crashes when update the rt.. any ideas?
with the new ogre 1.9 the code crashes when update the rt.. any ideas?