DGC3DRMSCREEN Component
Notice !!!!
This is an Alpha Release you will almost certainly Crash it so you use at
your own risk.
I will not be reading any emails to do with release as I Know it has Bugs
and i am only releaseing it to try to stop the persistant stream of poeple
emailing to release it.
Please Try to remember I am only one person I work as Network and software
manager in a major university department, as well as currently studying for my
MSC in IT . I do also have a family so Please No Emails Post any queries on the
Message Board and i will answer them as soon as possible.Please also remmber that
you have of the code so please look through it a lot of it is self explanatary.
Thank you Paul

Appoligise for the delay but i did come across a horrible bug just prior to posting
the components.

Introduction
DGC has now got it's first 3D Interface I decided to start with the Retained mode
interface and i have also started working on an immediate mode interface.
The DGC3DRMSCREEN Component is a replacement for the DGC Screen Component. it's
main function is to provide the low - level interface to Direct3DRM it creates
surfaces and the Direct3D devices.It also contains the collections used in your
scene.The frame collection is a collection of Objects heald in a frame these can be
manipulated a number of ways such as rotating , moving ,follwing other objects I have
tried to include a Sample app for most of the functions Note that some of these apps
contain very little code as the operation beeing carried out is done at design time.

The following is a list of Methods,Events and properties in the DGC3DRMSCREEN Component.

Note most of the operations of this component are automatic and instead of playing
with screen item you will manipulate the vieport,Lights,Cameras and Frames.

Installation
=============
Firstly Remove all old versions of DGC and Eriks headers.
Make sure the path to the Components is removed from the Environment
Tools , Environment options.
When the Environment options dialog appears Click the library tab and run through
the library path removing all referances to the headers and DGC Bin Directory.
Now remove the Old package by clicking component , Install Packages you will then see
a list of the installed packages hightlight the DGCB7.BPL and then click the remove
button.

Now install the components as follows
File, Open select the dgc bin directory and select the DGCB7.DPK
a small window will then open compile and then install the new package
you will then get a message saying that the new components have been added
and you should have a new tab on your component pallette DGC3D.
Having done this go to the environment path as detailed above in removing DGC
and ensure the DGC bin directory is in this path. if not the examples will not compile.
Note I have not tested this setup on Delphi 3 or Delphi 5 as i am still waiting for
the copy i have purchased to arrive. as soon as it does i will check it out.
also you can not run DGC on NT4 as it does not have directx 6 , I have checked them
on windows 2000 proffesional shipped to me by Microsoft under the MSDN Scheme and it
does appear to work with no modification.If somebody could do a delphi 3 install please
as i no longer have this on my machine, then send me a copy i will put it up on the
web site  


TDGC3DRMSCREEN
==============

Properties
==========

          Read Only Properties Use With extreme caution
          =============================================

          Property Canvas : TDGC3DCanvas Read FCanvas;

                   This property is Readonly and returns a referance
                   to the Drawing surface. This is the canvas attached to
                   Rendering surface. Note after using canvas in any way you
                   MUST !! call the Canvas Release method.

          Property RenderSurface:IdirectDrawsurface read Frendersurface;

                   This is a read only property returning a referance to the
                   Surface that D3D uses to render.

          Property Scene:Idirect3DRMFrame3 Read FScene;

                   Read Only property exposing the D3DRM Frame used as the master
                   Scene . Note if you wish to create new frames etc they are
                   normally Referanced to Scene.

          Property D3DRM:Idirect3drm3 Read FD3DRM;

                   Read Only property exposing the D3DRM interface
                   if you need more information this i suggest you look
                   at the DirectX SDK Help

          Property D3DRMDevice:Idirect3DRMDevice3 Read FD3DRMDevice;

                   Read Only property exposing the Hardware device
                   Interface . Again for full description Look the
                   SDK Help files.

          Property Viewport:Idirect3dRMViewport2 read FViewport;


          Published Properties
          ====================

          Property DisplayMode:T3DDisplayMode read FDisplayMode write SetDisplayMode;

                   Sets The display mode for Fullscreen Only,You will also notice
                   that All 8 bit modes have been removed.
                   A word of caution setting the display mode on your own machine
                   does not mean that the user of your game has the hardware to
                   support it. At present if you change the display mode whilst
                   running the surfaces will not be redrawn , I am currently working
                   On this.

          Property Fullscreen:Boolean read FFullscreen write FFullscreen;

                   Straignt forward rely runs the Form in either fullscreen
                   or Windows mode. If running in windowed mode you could get
                   an error telling you that the bit depth is not supported if so
                   change the screen resoltion in windows (Not DGC) to a lower resolution
                   i.e. 16 bit

          property Frames:TDGC3DRMFrameCollection read FFrames write FFrames;

                   The Mainstay of the DGC Components the frame ecapsulates a 3D Object
                   See later for description of operation.

          property Lights:TDGC3DRMLightCollection read FLights write FLights;

                   As with Frames there will be a description of the operation of
                   the lights collection. Note that Lights here are created as frames with
                   it's own light source this allows for greater fexibility in manipulating
                   a light.

          Property Camera:TDGC3DRMCAMERACollection read FCamera write Fcamera;

                   Fairly Self explanitary really a camera is the view that the user
                   sees. DGC Allows the use of multiple cameras so you can change
                   views on the fly.

          property FlippingEnabled:Boolean read FFlippingEnabled write SetFlippingEnabled;

                   Same as DGCScreen enables or disables screen flipping;

          property DGCInput:TDGCInput read FDGCInput  write FDGCInput;

                   Same as DGCScreen The name of a DGCInput (Direct input) component
                   note not fully implemented yet.

          property ShowMouse:Boolean  read FShowMouse write FShowmouse;

                   Show the mouse cursor

          property MouseImage:TCursor read FMousepointer write SetMouseCursor;

                   Select Mouse cursor Type

          property MouseButton:Integer read Fmousestate write FMouseState;

                   Return the state of the mouse button a value of 1 is the left button
                   pressed or a value of 2 is the right button pressed

          property ViewportSettings:TDGC3DRMViewport read FViewportSettings write FViewportSettings;

                   Settings used for the viewport such as FOV Front and Back Planes
                   Read The directx Help file full description.

          property Backgroundcolor:TColor read FBackgroundColor write FBackgroundColor;

                   Sets the background color of Window, NOte if background Image is used it will
                   override the color.

          property BackgroundImage:TPicture read FBackground write SetbackgroundImage;

                   Sets The Background image of the screen. this is always drawn first
                   so all objects will be visible.


Methods
=======

         Function CreateFrame:TDGC3DRMFrameItem;

                  Adds a blank frame to the Frame collection at the end of the collection
                  this frame is empty but can be used to load a new object at runtime
                  etc.

          Procedure SetKeys(keyleft,keyright,keyup,keydown,fire1,fire2:word);

                  Sets the keystrokes used by direct input component

          Function Collide(Frame1,Frame2:Integer):Boolean;

                   Returns true if the frame indexed by frame 1 is inside the
                   bounding box of the frame indexed by frame 2.
                   Note this routine will undergo major changes as it is just
                   very basic at pressent.


          Function Keydown(Key:word):Boolean;

                   Same as DGCScreen component it returns true if key has been
                   pressed.

EVENTS
======

           property OnPaint:TNotifyEvent read FOnPaint write FOnPaint;

                    Not currently Used

           property OnFlip:TNotifyEvent read FOnFlip write FOnFlip;

                    Not currently used use on render instead.

           property OnInitialize:TNotifyEvent read FOnInitialize write FOnInitialize;

                    This Event ocurrs as soon as The D3DRM and Directx have been Initialised
                    Use this event to do any one time only initialisation.


           property OnCleanUp:TNotifyEvent read FOnCleanUp write FOnCleanUp;

                    This event is generated during the cleanup process and can be used
                    to remove anything you like prior to shutting down.
                    Note do Not remove any of the directx Objects created by Me.

           property OnRender:TNotifyEvent read FOnRender write FOnRender;

                    This is the main event it occurs every time the render cycle occurs
                    and gives you oppotunity to change an objects posistion or angle etc.


