PDA

View Full Version : GLXTreem



Andreaz
14-11-2002, 11:26 AM
Have been working on this for a while now. It's a OpenGL component set, mutch like DelphiX but with OpenGL instead, have components for camera controll, lightning, drawing, primitives, MS3D, OBJ, MD3, Raw Terrain Models, Textures and more.

The components as now:

TGLXDraw
TGLXTimer
TGLXCamera
TGLXImageList
TGLXLighting
TGLXMilkshape3D
TGLFont
TGLXTerrain
TGLXParticeSystems
TGLXParticles
TGLXQuake3BSP


Im working on a webpage that will be avaiable soon, also working on improving the texture component, to be able to load graphics from streams. More routines for 2D drawing also needs to be added, as now only the most basic routines as lines, rectangles and circles is avaiable as well as the font component needs major redesign.

Just finsihed the homepage page, download and try it out =)

See this version as somewhat of a public beta, there's still many bugs to be found and features to be added.

Just finished remaking the GLXTextures and renamed it to GLXImageList, has support for many of the features from delphix's imagelist, including patterns, drawalpha, drawmask, strechdraw, drawrotate. Also added support for graphic libs.

http://www.glxtreem.xrs.net

QuazzeMan
14-11-2002, 03:12 PM
Wow, good job Andreas. Looking forward to testing them.

// QuazzeMan

super[x]
16-11-2002, 02:51 PM
Thanks a lot... I just download and install. Some demos cannot be compiled, error looking for glx3dobjects.dcu. Is anything that I missed?

Andreaz
16-11-2002, 05:52 PM
Nope, i guess you did'nty forget anything, just i that forget recompiling the demos after i changed the components, will fix it and upload new demos in an hour or so. Thanks for telling me.

Just uploaded a new version, updated demos and some other minor changes.

iLLUNis
16-11-2002, 10:24 PM
:D good work...

iLLUNis
16-11-2002, 10:42 PM
tried to install....getting message that the specific package cannot be found.. I am using Delphi 7 and it comes up with a message whether i want it to load next time i load Delphi..... :roll:

Andreaz
17-11-2002, 12:10 AM
Very strange, it works in both delphi 6 and 7 when i'm installing it. Don't really know what's wrong, but you can allways install in the old fashion way by opening the dpk file, pressing install and then add the directory GLXTreem\source to the libary paths. Btw, witch os are u using ? I'm oly tested the installation program using WindowsXP, can have someting to do with that =(

Really sorry about the troubles.

iLLUNis
17-11-2002, 10:24 AM
I am using XP also but for some reason whenever i am installing using the setup u have it keeps on saying that the specified .bpl could not be found. Anyways, not to worry...i did it the traditional way and it registered... :lol:

Andreaz
17-11-2002, 10:47 AM
Just found the problem with the installation program, When i tested the installation program I always had glx installed and then removed the package, put it didn't remove the files under Projects\Bpl =)

/Andreas

Andreaz
18-11-2002, 10:00 PM
New version !

Just uploaded the last version to the homepage, updated the TGLXImageList component, now supports saving textures to a large archive file as well as many 2D functions for example:


GLXImageList1.Items.Find('Stone.bmp').Draw(0,0,0);
GLXImageList1.Items[0].DrawMask(0,0,0, GLXImageList1.Items[1]);
GLXImageList1.Items.Find('flare.jpg').DrawAdd(0,0, 0);

Also updated the Milkshape3D component, now supports both loading an saving in streams, it's posssible to save a whole object, textures and model to a stream, no demo on that for the moment however.

And as the final thing i removed the bug in the installer, it should work for delphi 5 to 7 now.

If you find any bugs, improvements or just comments please give me a mess or post in the forum as i'm working on getting GLXtreem as good as posible.

The Source as now:
236 583 bytes in 17 files.
7186 lines with 32,92 chars per line.

Philth
19-11-2002, 06:02 AM
This looks pretty awesome for what you're trying to do. Does this do 3D only? What 2D stuff can you do so far? Lines? Antialias lines? Bitmaps with transparency settings? JPG support? I'm a novice at 3D stuff, so the easier I can implement 3D stuff into my 2D/3D games the better.

Cant seem to download it now.. 800k comes down and completes.. And it's supposed to be around 4MB? Maybe you're sending up a new file.. I'll try tomorrow.

savage
19-11-2002, 08:42 AM
Hi Andreas,
Will GLXTreem be ported to Linux?

Andreaz
19-11-2002, 11:40 AM
This looks pretty awesome for what you're trying to do. Does this do 3D only? What 2D stuff can you do so far? Lines? Antialias lines? Bitmaps with transparency settings? JPG support? I'm a novice at 3D stuff, so the easier I can implement 3D stuff into my 2D/3D games the better.

Cant seem to download it now.. 800k comes down and completes.. And it's supposed to be around 4MB? Maybe you're sending up a new file.. I'll try tomorrow.

No it doesn't do 3D only. It has support for Bitmaps and Jpegs, Animations, maskning, alphablend, rotating, strechdrawing and blending. Bitmaps with transparency isn't supported without aplhamasks, don't really know how to do this. Also some standard functions such as Rectangle, Circles and lines, currently without antialiazing but will be added in the next release.
Also have quite a bit support for 3D rendering, camera controll (need to update the camerapath unit), Milkshape Objects, Quake3 BSP Levels, buggy WavefrontOBJ, Unoptimized Terrains and the standard primitives: Planes, Lines, Qubes, Sheres, Cones. No colision routines are avaiable as now, but im planning on learning it better and then try to implement a class for it.

The upload died, but now it's all there.


Hi Andreas,
Will GLXTreem be ported to Linux?
As i haven't any acces to a Linux computer and never worked i linux i'm afraid that I willn't port it. But it's open source so be my guest =) But i recomend waiting as the component's are so frequently updated.

Sly
21-11-2002, 06:39 AM
Nice work, Andreas.

Some tips for the next release:
- delete all the backup files (the files with a tilde (~) in the extension).
- the DOF, CFG, DDP, DCU and JBF files can go as well.
- limit the size of the textures. One of the demos has a 769KB texture (512x512 24-bit) that could quite easily by reduced to 256x256 with little loss in quality, but a huge reduction in file size.
- Demos\Models\Quake3BSP is missing Unit1.pas
- Provide the Terrain demo as a separate downloadable ZIP. It is by far the largest single module in the distribution.

Useless Hacker
21-11-2002, 02:00 PM
I downloaded it, and it seems to work pretty well. A couple of the demos complained about the lack of GLXTextures though. One demo (can't remember which one) crashed with an access violation, as well.

Andreaz
21-11-2002, 03:52 PM
I'll go over all the demos, TGLXTextures is now more, TGLXImageList has replaced. Is working on the ide editable parts of the components, for GLXLightning all properties is now editable from the ide, also made that GLXTextures automatically changes to orto mode when drawing. Added a program for editing the texturefiles. Will update the components witin a couple of hours.

If anyone has any ideas for component's or functions please post a mess.

Heard of lack of support for delphi 5, will se if i can install D5 and fix it.

Andreaz
22-11-2002, 08:39 AM
Just uploaded the new version. Many nice things added, but much more to add =)

Useless Hacker
22-11-2002, 09:13 AM
BTW, shouldn't GLXLightning be called GLXLighting?

Andreaz
22-11-2002, 12:00 PM
BTW, shouldn't GLXLightning be called GLXLighting?
Why should'n it ?

Useless Hacker
22-11-2002, 12:19 PM
BTW, shouldn't GLXLightning be called GLXLighting?
Why should'n it ?
It is, is it not, a component to handle lighting? Whereas lightning is that phenonemon you get in electrical storms. Therefore, it would seem logical to name the component "GLXLighting" not "GLXLightning". QED. :D

Andreaz
22-11-2002, 12:34 PM
LOL, now i see what u mean :D :lol:

GL_LIGHTING is the OpenGL name and TGLXLighting is the component, the .pas mane is wrong =)

Kenneth
24-11-2002, 03:59 PM
Awesome Component m8, I just love it :D keep up the good work :)

Philth
24-11-2002, 10:09 PM
Trying to install the package in Delphi 5 (dpk file) it says the rtl in the USES cannot be found .. Where do I get this rtl?

super[x]
25-11-2002, 04:06 AM
The lastest version cannot be installed unless I uninstall glscene package. Is there anyway to install both packages?

Andreaz
25-11-2002, 06:07 AM
Trying to install the package in Delphi 5 (dpk file) it says the rtl in the USES cannot be found .. Where do I get this rtl?
Don't know where, if, you can get it, but don't think it's required, delphi added it when i created the package. Just remove it.


"]The lastest version cannot be installed unless I uninstall glscene package. Is there anyway to install both packages?
It complained about GLScreen i guess ? I can fix this by renaming the unit.

Found another bug in the installation program today =/ I'll fix it and upload later.

Philth
25-11-2002, 06:29 AM
Well, removed all the uses ... It still tries installing, but gets stuck on some internal error .. So much for doing it by hand. :) No idea why this wont go in Delphi5..

Andreaz
25-11-2002, 06:36 AM
I don't have D5 myself, tried with D4 but that will never work so D4 is excluded from the version supported list, where lies the problem in D5 ?

Philth
25-11-2002, 06:44 PM
Well, going through the DPK file ... I need to remove the 'requires' stuff out entirely.. D5 doesnt have any of that .. After that, it complains that GLFont.pas is not found, when it should be GLXFont.pas .. So i fixed that type in the DPK (Looks like its also a typo in the D6 DPK also) .. So then I try and install once more and it looks like it almost gets through it all till it gets to GLXScreens.pas .. Line 228 - Internal Error ..

Paste:

[Fatal Error] GLXScreens.pas(228): Internal error: C10652

Section of code:

//------------------------------------------------------------------------------
function TGLXDrawDisplay.GetMode: TGLXDisplayMode;
begin
Result:=FModes[FCurrentMode];
end;

.... the end; is line 228 .. This is almost the end of the file.


Hope this helps as i'm really interested in getting this to work in Delphi5 if possible.

Useless Hacker
25-11-2002, 08:06 PM
I had a similar problem with installing Omega when PowerDraw was already installed. The problem then was because the DirectX header files were contained in both libraries. I created a separate library called 'DirectX' containing the DirectX headers, and then added that to the requires clause of the Omega and PowerDraw libraries. I guess if you do something similar with the OpenGL header, you should be able to get it to work.

Andreaz
25-11-2002, 11:02 PM
I don't thing it's a header problem because the OpenGL headers v1.0 wich i'm using is included with delphi. The Internal Error is wery strange, need to get a copy of d5 and test it out. Going to look trough all my uses etc and remove al unused and wrong includes, hopefully this gets rid of many of these dumb errors.

Have patience :D

Fixed the D5 error, i never used the function so just deleted it and the assosiated property, will upload a new version tomorrow. it's midnight here now, soon time to sleep =)

Andreaz
26-11-2002, 12:38 PM
New version =)

Uploaded new version to the page, all demos is in seperate files, many small updates to the components, removed the d5 bug above, added fullscreen demo, removed many invalid files and includes.

Download and se if there's any bugs left, and add requests of components and functions if you want.

The todos' list:

Fix the filesize of the texurefiles, all textures are saved as 32 bit arrays.
Support for Frustum in the Quake3BSP class (can take time)
Component for MD3's
CLOD or another optimizion in the Terrain
Multitexturing in the terrain
Camerapaths and editor


That's what i can thing of now, if you want's anything more or have any ideas or thoughts, just post a reply

Philth
26-11-2002, 11:36 PM
Well, Delphi5 still refuses to work with that .. The Install.exe doesn't work..

"The Delphi Compilator dcc32.exe not found; \bin\dcc32.exe"

My dcc32.exe is located in C:\Program Files\Borland\Delphi5\bin so I don't know where it's looking ..

So trying it by hand.. I open the DPK file .. The requires are still not found in D5 .. I remove all of that .. Then it complains about the {ALIGN=8} (I think thats its, the first one in the {} list .. So I comment it out with the \\ .. The I click install again and run into the same error I posted before..

[Fatal Error] GLXScreens.pas(228): Internal error: C10652

..................

So ANYWAYS .. I got a hold of the free Delphi 6 Personal Edition Borland was giving away .. Got a registration key from them and i'm going to give it a go in D6 Personal .. I figure if I ever end up making something that I want to actually sell, i'll go ahead and buy D7 Professional and ditch D5 Professional anyways .. ;) .. If you'd like to keep trying to fix this, I still have D5 installed and would be happy to keep trying.

Andreaz
27-11-2002, 05:57 AM
It seems like i have to find a working copy of d5, seems like the registry settings differs from the d6-d7 version, that's why the installation program doesn't work. Seams there was more than just one bug in glxscreens =/

Vill look over it when i get a working copy of d5 until then use d6 or d7.

Andreaz
06-12-2002, 09:05 AM
Direct Input or not ?

What's your opinion, shall i add DirectIput functions into GLXtreem ?

Andreaz
02-01-2003, 12:25 PM
There's soon a new release of GLXTreem, many small changes , so i just wonder, just for fun:

Anyone uses GLX, for demos, games etc ?

tumitoto
03-01-2003, 04:03 AM
I am watching your progress and see if your compoenents will 'enable' me to start my project. I been searching for a suitable game engine. Other than rendering 3d scenes and objects, I am looking for:
1. A good level editor (or can use the output from a good level editor).
2. Mouse pick object.
3. Model import convetor (like MD2/MD3, 3dsmax..).
4. fonts + gui

A5 is lacking on the control side, you have to use their C script and you have to let its engine drive your game. 3dState is lacking on the level editor (indoor) and font supprt. 6dx is also lacking level editor, I can not get the quark to install properly. fly3d is promising but lack on mouse pick object callback/messaging.

I will have to read up more on your components since there are not a lot of docs on them.

Andreaz
03-01-2003, 05:58 AM
I am watching your progress and see if your compoenents will 'enable' me to start my project. I been searching for a suitable game engine. Other than rendering 3d scenes and objects, I am looking for:
1. A good level editor (or can use the output from a good level editor).
2. Mouse pick object.
3. Model import convetor (like MD2/MD3, 3dsmax..).
4. fonts + gui

A5 is lacking on the control side, you have to use their C script and you have to let its engine drive your game. 3dState is lacking on the level editor (indoor) and font supprt. 6dx is also lacking level editor, I can not get the quark to install properly. fly3d is promising but lack on mouse pick object callback/messaging.

I will have to read up more on your components since there are not a lot of docs on them.

Well, isn't documentation just soo booring =) Have, started on it a bit, but i let the demos stand as the major source of understandment for the moment.

Of what you mentioned above GLXTreem supports the following:

1> Has a Quake3 .BSP Loader, so you can use an Quake3 Level editor such as Q3Radiant to build your maps, then GLXTreem can display them.
2> No support for the moment, (There's however support in OpenGL for this).
3> Model import is currently supported as Milkshape3D .ms3d Models (The program can convert from 3ds, md2, md3, obj..) and Wavefront .OBJ files (saved as asci so not as stable as the ms3d). Will also add support for MD3's in the not to distant future.
4> Has support for both system fonts and outlined fonts, the ImageList has the capability of drawing bitmap font aswell, but no builtin support as now (Have to write the textdraw yourself). Other GUI component's isn't there, but has quite a bit of 2D rendering functions to play with.

There's another thing that's a big diference between GLXTreem and engines like 6DX, it comes with full source, so if you find a function that does almost what you want you can always just copy the function and make the changes you want.

Useless Hacker
07-01-2003, 09:44 AM
I've recently installed Kylix, and I was wondering if you had thought about porting GLXtreem to Linux. It shouldn't be too much trouble, since OpenGL is available on Linux.

Andreaz
07-01-2003, 10:39 AM
I've recently installed Kylix, and I was wondering if you had thought about porting GLXtreem to Linux. It shouldn't be too much trouble, since OpenGL is available on Linux.

Well, i havn't any access to an computer with Linux and it get's kindof tricky when you cant test it. I never worked under linux either. So I von't be able to do it, not that i don't want to..

Andreaz
16-01-2003, 05:38 PM
Released a new version, finally added SOME help but not mutch, check the layout of it.

http://www.glxtreem.xrs.net

M109uk
11-02-2003, 07:16 PM
downloaded and installed great, but some of the demos need to be updated. All that use lights, i changed most of them by hand:
From:

GLXLighting1.Enable / Disable

To:

GLXLighting1.EnableLighting / DisableLighting


and the terrain demo needs some work, i get errors with these:

GLXTerrain1.Data.HeightData:=ImportHeightFromRaw(' heightmap.raw');
GLXTerrain1.Data.LightData :=ImportLightFromBmp ('texturemap.bmp');

The import functions no longer exists?!?

beside from them its looking great :)

will you place in support for Lightwave anytime?

Andreaz
11-02-2003, 10:08 PM
Well, i have changed from Enable to EnableLightning a couple of times now, just can't make up my mind =) The terrain error seems odd, they should be in GLXTerrain.pas but i have redone the terrain engine completly so that will be updated. And, yes i'm currently working on lightwave support, it will be done in the next release =) And there will also be some basic collision detection routines added.

SuperEly
26-02-2003, 06:12 AM
Hello! I am Brazilian.

I made a change in the routine DrawAdd, in GLXImageList.pas:

//----------------------------------------------------------------------------
procedure TGLXImageItem.DrawAdd(X, Y, PatternIndex: Integer; Alpha: Single);
begin
glEnable(GL_BLEND);
glColor4f(1.0,1.0,1.0,Alpha);
glBlendFunc(GL_SRC_ALPHA,GL_ONE);;
Draw(X,Y, PatternIndex);
glDisable(GL_BLEND);
end;



And to call the function:

//----------------------------------------------------------------------------
GLXImageList1.Items.Find('PacMan.bmp').DrawAdd(10, 10, 0, 0.3);

The last parameter controls the transparency, of 0.0 (transparent) up to 1.0 (opaque).


A simple, but very useful change (at least for me).

BojZ
26-02-2003, 12:43 PM
Great work! Been w8ing to get into 3d for quite some time now,...

If you keep adding fuctionality like collision detection and demos to GLX I'll almost certainly use it to make a simple game for a start. PacMan? =)

Keep up the good work!

SuperEly
26-02-2003, 08:12 PM
The routine DrawRotate is not working together with StrechDraw. Then I altered the code of GLXImageList.pas:


//---------------------------------------------------------------------------
procedure TGLXImageItem.DrawRotate(X, Y, Width, Height, PatternIndex: Integer;
CenterX, CenterY: Double; Angle: Integer);
var Rect: TRect;
RenderState: TGLXRenderState;
begin

glPushMatrix();
glLoadIdentity();
Rect.Left :=-Round( CenterX * PatternWidth );
Rect.Top :=-Round( CenterY * PatternHeight);
Rect.Right := Round((1-CenterX) * PatternWidth );
Rect.Bottom:= Round((1-CenterY) * PatternHeight);
glPopMatrix();

RenderState:= GLXDraw.RenderState;
GLXDraw.RenderState:=rs2D;
glPushAttrib(GL_TEXTURE_BIT);
glEnable(GL_TEXTURE_2D);
Bind;

glTranslate(X,Y,0);
glRotate(Angle, 0,0,1);

glBegin(GL_QUADS);
with FPatterns[PatternIndex] do begin
glTexCoord2f(Left , Bottom); glVertex2i(Rect.Left , Rect.Top);
glTexCoord2f(Right, Bottom); glVertex2i(Rect.Right, Rect.Top);
glTexCoord2f(Right, Top ); glVertex2i(Rect.Right, Rect.Bottom);
glTexCoord2f(Left , Top ); glVertex2i(Rect.Left , Rect.Bottom);
end;
glEnd();
glPopAttrib();
GLXDraw.RenderState:=RenderState

end;

SuperEly
26-02-2003, 08:44 PM
I am wanting to use that library in my game of ships, then I added more two routines that will be useful for me: Rotation Add and with Mask:


//------------------------------------------------------------------------------
procedure TGLXImageItem.DrawRotateAdd(X, Y, Width, Height, PatternIndex: Integer;
CenterX, CenterY: Double; Angle: Integer; Alpha: Single);
var Rect: TRect;
RenderState: TGLXRenderState;
begin

glPushMatrix();
glLoadIdentity();
Rect.Left :=-Round( CenterX * PatternWidth );
Rect.Top :=-Round( CenterY * PatternHeight);
Rect.Right := Round((1-CenterX) * PatternWidth );
Rect.Bottom:= Round((1-CenterY) * PatternHeight);
glPopMatrix();

glEnable(GL_BLEND);
glColor4f(1.0,1.0,1.0,Alpha);
glBlendFunc(GL_SRC_ALPHA,GL_ONE);;

RenderState:= GLXDraw.RenderState;
GLXDraw.RenderState:=rs2D;
glPushAttrib(GL_TEXTURE_BIT);
glEnable(GL_TEXTURE_2D);
Bind;

glTranslate(X,Y,0);
glRotate (Angle, 0,0,1);

glBegin(GL_QUADS);
with FPatterns[PatternIndex] do begin
glTexCoord2f(Left , Bottom); glVertex2i(Rect.Left , Rect.Top);
glTexCoord2f(Right, Bottom); glVertex2i(Rect.Right, Rect.Top);
glTexCoord2f(Right, Top ); glVertex2i(Rect.Right, Rect.Bottom);
glTexCoord2f(Left , Top ); glVertex2i(Rect.Left , Rect.Bottom);
end;
glEnd();
glPopAttrib();
GLXDraw.RenderState:=RenderState;
glDisable(GL_BLEND);

end;


//------------------------------------------------------------------------------
procedure TGLXImageItem.DrawRotateMask(X, Y, Width, Height, PatternIndex: Integer; CenterX, CenterY: Double; Angle: Integer; Mask: TGLXImageItem);
begin
glPushAttrib(GL_DEPTH_BUFFER_BIT);
glEnable(GL_BLEND);
glDisable(GL_DEPTH_TEST);

glBlendFunc(GL_DST_COLOR,GL_ZERO);
Mask.DrawRotate(X,Y, Width, Height, PatternIndex, CenterX, CenterY, Angle);
glBlendFunc(GL_ONE, GL_ONE);
DrawRotate(X,Y, Width, Height, PatternIndex, CenterX, CenterY, Angle);

glDisable(GL_BLEND);
glPopAttrib();
end;

----
P.S.: I loved this library!

SuperEly
28-02-2003, 05:30 AM
Two routines, involving fonts, they needed to be modified in GLXFont.pas:

//---------------------------------------------------------------------------
procedure TextOutOutline(Base: glUint; X, Y, Z: Integer; Text : String);
begin
glPushAttrib(GL_DEPTH_BUFFER_BIT or GL_TEXTURE_BIT or GL_LIST_BIT);
glEnable (GL_DEPTH_TEST);
glEnable (GL_TEXTURE_2D);

glPushMatrix();
glTranslatef(X,Y,Z);

glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);

glPushAttrib(GL_LIST_BIT);
glListBase(Base);
glCallLists(Length(text), GL_UNSIGNED_BYTE, PAnsiChar(Text));
glPopMatrix();
glPopAttrib();

glDisable(GL_TEXTURE_GEN_S);
glDisable(GL_TEXTURE_GEN_T);

end;


//---------------------------------------------------------------------------
procedure TGLXFontItem.TextOut(X, Y, Z: Integer; Text: String);
var RenderState: TGLXRenderState;
begin
if (Text = '') then Exit;
SetCurrentColor;
IF FFontType = ftSystem then begin
RenderState:= GLXDraw.RenderState;
GLXDraw.RenderState:=rs2D;
TextOutSystem (Base, X,Y-Font.Height , Text);
GLXDraw.RenderState:=RenderState
end else
IF FFontType = ftOutline then begin
RenderState:= GLXDraw.RenderState;
GLXDraw.RenderState:=rs3D;
TextOutOutline(Base, X,Y ,Z, Text);
GLXDraw.RenderState:=RenderState
end;

glColor3f(1.0, 1.0, 1.0);

end;

Andreaz
03-03-2003, 10:05 AM
Thanks for the modifications, SuperEly I'll add them to the upcoming release.
And for the font support, there's also a number of other things limiting the font component, the font sizes don't resize when the window is resized, just the raster position that is scaled, this makes it wery hard to get the font's where they should be. So my thoughts is to skip the system font support and remake it to bitmap fonts instead (textured ofcourse) wich doesn't have the mentioned problems.

And BojZ, the component GLXColisionTester will also be included in the release. It has support for colisions between Spheres, cubes and points (not 100% accurate for cubes but close to).

I also descided not to add support for lwo objects, (deep exploration and milkshape 3d will do the conversion between lwo and ms3d) the reason is among others this:

http://home.clara.net/paulyg/tte.htm


The Change log for the next release is currently:

-GLXTerrain new uses multitexturing
-Added GLXEnvironment with SkyBoxes and more
-Added GLXCollisions for collision detection
-Multitexture support in GLXImageList
-Entity support in GLXQuake3BSP
-New demo: MultiTexturing
-Changed MessageBoxe's to exeptions

As well as a bunc of minor changes and tweaks.

What really would be needed is a tga loader / saver with the alpha channel, i havn't found any easy to use, singlefiled freeware version and the progress on the ownwritten one is going extreemly slow. Anyone has any suggestions ??

Useless Hacker
03-03-2003, 10:20 AM
What really would be needed is a tga loader / saver with the alpha channel, i havn't found any easy to use, singlefiled freeware version and the progress on the ownwritten one is going extreemly slow. Anyone has any suggestions ??

The GraphicEx library supports TGA, along with many other formats. It is open source and can be found here (http://www.delphi-gems.com/Graphics.php).

Andreaz
03-03-2003, 05:30 PM
What really would be needed is a tga loader / saver with the alpha channel, i havn't found any easy to use, singlefiled freeware version and the progress on the ownwritten one is going extreemly slow. Anyone has any suggestions ??

The GraphicEx library supports TGA, along with many other formats. It is open source and can be found here (http://www.delphi-gems.com/Graphics.php).

Thank's it works really nice, now Targa files is supported by the imagelist also. What do you think of the font support ? How should it be implemented, scrap the system fonts and build nice 2D fon support instead ?? Please post your ideas here =)

BojZ
03-03-2003, 10:03 PM
I think it's time to add a (new) "GLX section" under the PROGRAMMING section of the forum, don't you think?

SuperEly
04-03-2003, 08:36 PM
DrawRotate, has a bug that contaminated DrawRotateAdd. It follows the correction:

//------------------------------------------------------------------------
procedure TGLXImageItem.DrawRotate(X, Y, Width, Height, PatternIndex: Integer;
CenterX, CenterY: Double; Angle: Integer);
var Rect: TRect;
RenderState: TGLXRenderState;
begin

glPushMatrix();
glLoadIdentity();
Rect.Left :=-Round( CenterX * Width );
Rect.Top :=-Round( CenterY * Height);
Rect.Right := Round((1-CenterX) * Width );
Rect.Bottom:= Round((1-CenterY) * Height);
glPopMatrix();

RenderState:= GLXDraw.RenderState;
GLXDraw.RenderState:=rs2D;
glPushAttrib(GL_TEXTURE_BIT);
glEnable(GL_TEXTURE_2D);
Bind;

glTranslate(X,Y,0);
glRotate (Angle, 0,0,1);

glBegin(GL_QUADS);
with FPatterns[PatternIndex] do begin
glTexCoord2f(Left , Bottom); glVertex2i(Rect.Left , Rect.Top);
glTexCoord2f(Right, Bottom); glVertex2i(Rect.Right, Rect.Top);
glTexCoord2f(Right, Top ); glVertex2i(Rect.Right, Rect.Bottom);
glTexCoord2f(Left , Top ); glVertex2i(Rect.Left , Rect.Bottom);
end;
glEnd();
glPopAttrib();
GLXDraw.RenderState:=RenderState

end;



//------------------------------------------------------------------------
procedure TGLXImageItem.DrawRotateAdd(X, Y, Width, Height, PatternIndex: Integer;
CenterX, CenterY: Double; Angle: Integer; Alpha: Single);
var Rect: TRect;
RenderState: TGLXRenderState;
begin

glPushMatrix();
glLoadIdentity();
Rect.Left :=-Round( CenterX * Width );
Rect.Top :=-Round( CenterY * Height);
Rect.Right := Round((1-CenterX) * Width );
Rect.Bottom:= Round((1-CenterY) * Height);

glPopMatrix();

glEnable(GL_BLEND);
glColor4f(1.0,1.0,1.0,Alpha);
glBlendFunc(GL_SRC_ALPHA,GL_ONE);;

RenderState:= GLXDraw.RenderState;
GLXDraw.RenderState:=rs2D;
glPushAttrib(GL_TEXTURE_BIT);
glEnable(GL_TEXTURE_2D);
Bind;

glTranslate(X,Y,0);
glRotate (Angle, 0,0,1);

glBegin(GL_QUADS);
with FPatterns[PatternIndex] do begin
glTexCoord2f(Left , Bottom); glVertex2i(Rect.Left , Rect.Top);
glTexCoord2f(Right, Bottom); glVertex2i(Rect.Right, Rect.Top);
glTexCoord2f(Right, Top ); glVertex2i(Rect.Right, Rect.Bottom);
glTexCoord2f(Left , Top ); glVertex2i(Rect.Left , Rect.Bottom);
end;
glEnd();
glPopAttrib();
GLXDraw.RenderState:=RenderState;
glDisable(GL_BLEND);

end;

Andreaz
05-03-2003, 11:10 AM
SuperEly, wasn't the code:

Rect.Left :=-Round( CenterX * PatternWidth );
Rect.Top :=-Round( CenterY * PatternHeight);
Rect.Right := Round((1-CenterX) * PatternWidth );
Rect.Bottom:= Round((1-CenterY) * PatternHeight);

from the beginning, what's the bug with that ??

I have started rewritten the homepage is approx 40% done, when the page is ready the new version is released.


Edit:

Found what bug you ment, it's when the patternwidth or patternheight is 0 but the drawrotate funktion is correct, it in UpdatePatterns the bug was..

SuperEly
05-03-2003, 05:46 PM
See the parameters of the procedure:

DrawRotate(X, Y, Width, Height, PatternIndex: Integer;
CenterX, CenterY: Double; Angle: Integer);

Width and Height are not used like this:

Rect.Left :=-Round( CenterX * PatternWidth );
Rect.Top :=-Round( CenterY * PatternHeight);
Rect.Right := Round((1-CenterX) * PatternWidth );
Rect.Bottom:= Round((1-CenterY) * PatternHeight);

But they are used like this:

Rect.Left :=-Round( CenterX * Width );
Rect.Top :=-Round( CenterY * Height );
Rect.Right := Round((1-CenterX) * Width );
Rect.Bottom:= Round((1-CenterY) * Height );

:wink:

Andreaz
06-03-2003, 08:05 AM
:roll:
Well, what can i say, stupid me =)

Andreaz
08-03-2003, 12:05 PM
I think it's time to add a (new) "GLX section" under the PROGRAMMING section of the forum, don't you think?

I wouldn't mind, but it's up to the moderators =)

BlueCat
08-03-2003, 06:24 PM
I think it's time to add a (new) "GLX section" under the PROGRAMMING section of the forum, don't you think?

I wouldn't mind, but it's up to the moderators =)

Yeah just start a thread in the 'Forums' forum :? and see if anyone has any objections. If not.... no problem :D

Andreaz
09-03-2003, 04:26 PM
I have finished the new page and uploaded the new version of glx. Download and have fun =)

SuperEly
09-03-2003, 09:00 PM
:lol: :lol: :lol:

SuperEly
11-03-2003, 08:59 PM
An error happens when compiling Demo of GLXImageList, in GLXImageList.pas:


Code:
var glMultiTexCoord1fARB : PFNGLMULTITEXCOORD1FARBPROC = nil;
var glMultiTexCoord2fARB : PFNGLMULTITEXCOORD2FARBPROC = nil;
var glMultiTexCoord3fARB : PFNGLMULTITEXCOORD3FARBPROC = nil;
var glMultiTexCoord4fARB : PFNGLMULTITEXCOORD4FARBPROC = nil;
var glActiveTextureARB : PFNGLACTIVETEXTUREARBPROC = nil;
var glClientActiveTextureARB : PFNGLCLIENTACTIVETEXTUREARBPROC = nil;


The errors:
[Error] GLXImageList.pas(258): Undeclared identifier: 'PFNGLMULTITEXCOORD1FARBPROC'
[Error] GLXImageList.pas(258): Cannot initialize multiple variables
[Error] GLXImageList.pas(259): Undeclared identifier: 'PFNGLMULTITEXCOORD2FARBPROC'
[Error] GLXImageList.pas(259): Cannot initialize multiple variables
[Error] GLXImageList.pas(260): Undeclared identifier: 'PFNGLMULTITEXCOORD3FARBPROC'
[Error] GLXImageList.pas(260): Cannot initialize multiple variables
[Error] GLXImageList.pas(261): Undeclared identifier: 'PFNGLMULTITEXCOORD4FARBPROC'
[Error] GLXImageList.pas(261): Cannot initialize multiple variables
[Error] GLXImageList.pas(262): Undeclared identifier: 'PFNGLACTIVETEXTUREARBPROC'
[Error] GLXImageList.pas(262): Cannot initialize multiple variables
[Error] GLXImageList.pas(263): Undeclared identifier: 'PFNGLCLIENTACTIVETEXTUREARBPROC'
[Error] GLXImageList.pas(263): Cannot initialize multiple variables
[Fatal Error] GLXImageList.pas(18): Could not compile used unit 'GLXImageList'


Delphi 7 Enterprise

??

Andreaz
11-03-2003, 09:23 PM
That's odd, they are all in the source file glExt.pas.. I also have delphi 7 enterprise and it works fine for me. Make shure that you doesn't have another version of glExt in some other search path.

Andreaz
12-03-2003, 12:59 PM
TGLXObjectEngine:

Started working on an object engine and havn't desided how to build it, either event driven as the particle engine or inherit driven like delphix's spriteengine (every object/sprite is created as a class that inherits from a sprite/object class).

So it's up to u folks to decide, it's approx the same ammount of code for both ways.

SuperEly
13-03-2003, 01:11 PM
That's odd, they are all in the source file glExt.pas.. I also have delphi 7 enterprise and it works fine for me. Make shure that you doesn't have another version of glExt in some other search path.

:roll:
Well, what can i say, stupid me =)

User137
14-03-2003, 11:26 AM
I wonder, if there is Delphi 5 compilant version coming and when? This looks so promising that i might even consider this better than DelphiX :P

Andreaz
17-03-2003, 12:50 PM
I wonder, if there is Delphi 5 compilant version coming and when? This looks so promising that i might even consider this better than DelphiX :P

I just found my old Delphi 5 CD and installed it to se if i could get GLXTreem to work, but i'm sorry, it will not work, Many odd Internal errors and missing Source files. So i say try to get hand on a copy of Delphi 6 or 7...

Btw. This thread is officialy dead, just for backward compability =)