Saving a render to a bitmap..
Saving a render to a bitmap..
Saving a render to a bitmap..
Saving a render to a bitmap..
Saving a render to a bitmap..
Saving a render to a bitmap.. Saving a render to a bitmap.. Saving a render to a bitmap.. Saving a render to a bitmap.. Saving a render to a bitmap.. Saving a render to a bitmap.. Saving a render to a bitmap.. Saving a render to a bitmap..
Saving a render to a bitmap.. Saving a render to a bitmap..
Saving a render to a bitmap..
Go Back  Xtreme Visual Basic Talk > > > > Saving a render to a bitmap..


Reply
 
Thread Tools Display Modes
  #1  
Old 10-23-2006, 03:55 PM
afwasborstel afwasborstel is offline
Centurion
 
Join Date: Apr 2003
Posts: 142
Default Saving a render to a bitmap..


I want to save my rendered device to an bitmap...eg a screenshot...How can we do that? Tried working with this ...but it gives me an eror...

Code:
Public Sub ScreenShot(ByVal fileName As String)
       
        Try
                   Dim surf As Direct3D.Surface = device.CreateOffscreenPlainSurface(640, 480, Direct3D.Format.A8R8G8B8, Direct3D.Pool.SystemMemory)
            device.GetFrontBufferData(0, surf) 'this line generates the error when I comment this line out only a black bitmap appears...
            Direct3D.SurfaceLoader.Save(fileName, Direct3D.ImageFileFormat.Bmp, surf)

            surf.Dispose()
        Catch e As Exception
            MessageBox.Show(e.ToString())
        End Try
    End Sub
And is there also a way to keep a texture in the back of a render fullscreen? And ifso...how?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Saving a render to a bitmap..
Saving a render to a bitmap..
Saving a render to a bitmap.. Saving a render to a bitmap..
Saving a render to a bitmap..
Saving a render to a bitmap..
Saving a render to a bitmap.. Saving a render to a bitmap.. Saving a render to a bitmap.. Saving a render to a bitmap.. Saving a render to a bitmap.. Saving a render to a bitmap.. Saving a render to a bitmap..
Saving a render to a bitmap..
Saving a render to a bitmap..
 
Saving a render to a bitmap..
Saving a render to a bitmap..
 
-->