Board index » delphi » TBaseGraphics

TBaseGraphics

Hello,

I'm in the process of making a base graphics class that will work in either
DirectX/3D or OpenGL.  The DirectXGraphics or OpenGLgraphics will inherit
this object.  The base object will have a bunch of different ways of drawing
shapes with textures.

I've never used OpenGL before nor does my graphics card support it
currently, but I just want future support for it in the game project we are
working on.

The baseGraphics object has these types of method which will support DirectX
fully for what I need the game to do...

Create
Destroy

BeginScene
EndScene

DrawPoly(Points : array of TPoint, Texture : Pointer);
DrawRect

Property FullScreen : Boolean read GetFullScreen write SetFullScreen;
Width, Height, etc.

Canvas : TCanvas

The question is: Is there anything else I need besides a BeginScene and
EndScene in OpenGL?  The Create will handle the initialization in DirectX.
A surface can be attached to a canvas in DirectX as well so that delphi's
VCL drawing methods can be used to draw text or whatnot.

Thanks in advance,
Steve

 

Re:TBaseGraphics


Quote
> The question is: Is there anything else I need besides a BeginScene and
> EndScene in OpenGL?  The Create will handle the initialization in DirectX.
> A surface can be attached to a canvas in DirectX as well so that delphi's
> VCL drawing methods can be used to draw text or whatnot.

Take a look at the Full Screen Demo on the Samples page of my site for a
very simple but complete OpenGL program. Perhaps the InitOpenGL routine is
what you are seeking...

http://home1.gte.net/jqjacobs/index.htm

Jon

Other Threads