System: Windows XP
Compiler/IDE: Turbo Delphi for Win32
API: OpenGL
As the gl3ds became too large i decided to split it up. But i am running into some problems with that.
The idea is that i have a generic model class named TModel and for Loading i have an inherited class T3dsModel and an TMsaModel and even more file formats are possible this way. For rendering i have a TglModel. A TdxModel could come along too.
In TModel Render and LoadFromFile are virual and abstract.
useage is like this:
mesh1:=TModel.Create(nil);
TMsaModel(mesh1).LoadFromFile('models\hog2.txt');
and rendering like:
TglModel(mesh1).Render;
Things are working just fine, althoug i get a lot of warnings from turbo delphi like:
[Pascal Warning] Model3ds.pas(40): W1010 Method 'LoadFromFile' hides virtual method of base type 'TModel'
and
[Pascal Warning] OpenGL15_MainForm.pas(197): W1020 Constructing instance of 'TModel' containing abstract method 'TModel.LoadFromFile'
and more like those 2 warnings.
How do i fix these? I do like the concept of having a TModel class and use that with typecasting for loading and rendering. Thanks for your ideas in advance.
You can download the complete source here: http://www.noeska.com/downloads/FrameWork3d.zip
Bookmarks