PDA

View Full Version : SDL 1.2.6 Is Out Why No Update to JEDI-SDL 0.5?



WILL
08-01-2004, 02:48 AM
OK, I know I'm asking for it but; JEDI-SDL has not been updated for almost 2 years now and there have been at least 2 versions since with the SDL API it supports. Why no updates? At least a minor one updaing the documentation or the supplied libraries or something.

It's a shame that it has been neglected thus far.

Clootie
08-01-2004, 10:15 AM
May be it it's better to ask here: http://sourceforge.net/projects/jedi-sdl/

WILL
09-01-2004, 02:22 AM
Perhaps you're right. I left a message there. Though, I know that our friend Mr. savage is a major contributor to SDL(if not more, forgive me if so ;)).

A widely used API from what I can see. I can't honestly see why it's not a bit more popular with the Delphi Gaming world.

Almindor
14-01-2004, 07:05 PM
You're right it's a good library. Probably the only one that does the bussiness. Easy to use too if you ask me. I don't know why it isn't popular but I have my theories.

Most delphi people just stick with Winshit and thats the reason to use DirectX or DelphiX. SDL comes to mind only with cross platforms, altough it's quite good if not better with combo with opengl than DirectX is(if you don't believe see UT2003)

I actualy view C++(or C) as a bigger problem with the programming industry. It's a bloated overextended language with primitive IDEs no control and a bad pointer relationship system(not to mention references) and altough SDL itself has been(as many other things like systems) written with C or C++ I think it would end up much better written in Pascal or some other nice language. Just my 2 cents

WILL
14-01-2004, 09:32 PM
Most delphi people just stick with Winshit and thats the reason to use DirectX or DelphiX. SDL comes to mind only with cross platforms, altough it's quite good if not better with combo with opengl than DirectX is(if you don't believe see UT2003)

I've seen, I believe. :) Almost ever commercial game that I have seen that has used OpenGL, ran extreemly well. Esp. UT & UT2003. :) I personally think that programmers need to think more cross-platform in coding practices, esp with all the availability that Borland has provided us with now.


I actualy view C++(or C) as a bigger problem with the programming industry. It's a bloated overextended language with primitive IDEs no control and a bad pointer relationship system(not to mention references) and altough SDL itself has been(as many other things like systems) written with C or C++ I think it would end up much better written in Pascal or some other nice language. Just my 2 cents

The JEDI-SDL project is to make the wrapper or interface for the SDL library not recreate it, just to be on the same page. I never liked programming in C much myself. Object Pascal is so much easier to look through and code. ;)

Clootie
16-01-2004, 07:38 AM
I've seen, I believe. :) Almost ever commercial game that I have seen that has used OpenGL, ran extreemly well. Esp. UT & UT2003. :)IIRC UT2003 by default uses Direct3D renderer :roll:

Almindor
17-01-2004, 03:29 PM
Mayhap, but try running Halflife(1) with Direct3D. You get 1/10 the performance of Direct3D. Perhaps it's some implementation problem but with the professionalizm of that team I doubt that.

Clootie
17-01-2004, 04:36 PM
Mayhap, but try running Halflife(1) with Direct3D. You get 1/10 the performance of Direct3D. Perhaps it's some implementation problem but with the professionalizm of that team I doubt that.
Where have you took these numbers? Take for example above mentioned UT2003 where is almost no difference running either 3D API. Performance in this case is more dependant on driver quality / optimizations in it.

holybyte
17-01-2004, 07:32 PM
Mayhap, but try running Halflife(1) with Direct3D. You get 1/10 the performance of Direct3D. Perhaps it's some implementation problem but with the professionalizm of that team I doubt that.

It's just a question of fine tuning the HL config files. OpenGL has the same performance level as D3D in Halflife. But btw if we talk about what might be the better api.. I experienced graphic errors or slow performance mostly on games using Direct3D, but i cannot really compare (most games use the DX api..) to OpenGL. It's cruel that every time the user (customer) is forced to make these tunings or wait for a specific driver or a better tweak program.. or bugfix. Have you ever heard about such enourmous problems on Linux, i'm no insider. that would be interesting (i'll start a new topic at the right place).
:?:

----------------------------------------------------------------
***entering the GATES to hellfire***

Almindor
20-01-2004, 07:17 PM
Well ok I give up... I was heating my antiMS soup, but seriously most of my friends got big problems with half-life performance thru d3d.(the numbers were guesses). I know this prolly isn't a problem of the API. However considering that openGL is portable and mostly considered peer if not better than D3D I think there is no better alternative. If you know of any pls tell me )

WILL
21-01-2004, 05:25 AM
Ok, I get the point about OpenGL vs DirectX, but why has JEDI-SDL not been released since the past year? Perhaps only savage can answer this for me, but I'd really like to use the up-to-date libraries since they have a ton of more features and fixes to the versions supported by JEDI-SDL 0.5.

Zanthos
23-01-2004, 12:54 PM
I'm using SDL and OpenGL at the moment with some little projects I'm dabbling about in, and yeah, I share the feeling :) Although I've not run into any problems with SDL thusfar. And if I do, I'll probably just end up swearing and cursing, switching to another API, and doing the same thing. Before eventually throwing in the towel and moving to C++ :x

WILL
23-01-2004, 09:33 PM
Thats not what I'm saying.

I'm saying that there is a perfectly good API wrapper for Delphi that has been updated since the wrapper's last release why hasn't anyone pushed for a release with all of the supported improvements? I'm not going to switch to another API just because I'm unhappy with the lack of support of a specific project(Did Linux progress as far as it has by taking that method of development?)

I think that SDL should be worked on to provide an update for the modified API. It's not about if it's "good enough" or not. I never settle with 'good enough'. There is simply no such thing.

Zanthos
24-01-2004, 01:19 PM
Well from what it seems is that the JEDI-SDL team have decided to take a break from their work as it stands. They've done a damn good job so far, maybe they're willing to let other people join the team and carry on from where they left off, who knows..

I was considering joining the team myself, I'd hate to see pascal programmers lose out on SDL.

WILL
24-01-2004, 06:23 PM
Well if I weren't commited to too many other projects already I'd try to lend a hand too.

:) I know I keep saying that, but this time I mean it. :?

savage
25-01-2004, 07:55 PM
Hi All,
Sorry for the delay in finding this thread. Work and family have taken a bigger toll on my free time than I expected as well as creating some Delphi for .NET DirectX demos which I ported recently. All these things have kept me away from JEDI-SDL.

Anyway to answer, WILL's question, There has not been a public release of JEDI-SDL because we have been busy adding things to the CVS that Clootie mentioned. Most of the work has been to try and add compiler support for FreePascal, Gnu Pascal and TMT Pascal. I have also been working on an SDLInput and SDLWindow class that basically wraps the Input and Window Management stuff into fairly thin classes.

More Pascal Compiler support was add just in case Borland stop supporting Delphi, and I did not want to leave the Pascal gaming community high and dry. So we now compile on Win32, Linux and I am told FreeBSD due to these changes. There is still more testing and fine tuning to do, but in general I am happy with the cross-compiler support we have so far.

We have also added a bucket load of OpenGL demos since the 0.5 release. But again all this stuff is in the sourceforge CVS. So if you are doing any cross-platform OpenGL programming you should pull them down using your favorite CVS client.

The plan is to release a v1.0 sometime this year and hopefully get it shipping with the next Borland Delphi release, out of the box.

So JEDI-SDL is not dead, it was simply relaxing/regrouping, but we are always looking for more people to help. Most the discussions take place over @ http://groups.yahoo.com/group/JEDI-SDL/. So if you feel so inclined, make sure you join up and make some noise. Work will resume shortly to see what has changed in the SDL 1.2.6 release. Usually they are internal fixes rather than fixes to the SDL.pas header.

I hope this answers some of your questions. If you have more, fire away.

savage
17-03-2004, 11:52 PM
Just so everyone is updated
There is now a new v1.0 branch of the JEDI-SDL headers that supports SDL 1.2.7, which was released a few weeks back.

Public beta testing of the version 1.0 branch will begin in about 1 month, so hang in there guys.

paul_nicholls
06-07-2006, 02:28 AM
Hi all,
I am using the 1.0 version headers of JEDI-SDL (but not the new branch version a few weeks old) so I can use the SDL dlls (currently using version 1_2_8).

I am running it under Delphi 5 Professional.

It was all working nicely, but now I am trying to do some shader stuff and am getting an access violation crash in the 'nvoglnt.dll' when I try to run the code below to load and compile shader code:


Function TGL_ARB_Shader.LoadAndCompileShaderSource(AFileNam e: String): Boolean;
Var
ShaderSource : TStringList;
Source : String;
LinkStatus : GLint;
CompileStatus : GLint;
Begin
Result := False;

If (Not FileExists(AFileName)) Then
Exit;

ShaderSource := TStringList.Create;

Try
ShaderSource.LoadFromFile(AFileName);

If (ShaderSource.Text = '') Then
Exit;

Source := ShaderSource.Text;

glShaderSourceARB&#40;FHandle,1,@Source&#91;1&#93;,Nil&#41;; // <---blowing up here!!

glCompileShaderARB&#40;FHandle&#41;;

glGetObjectParameterivARB&#40;FHandle,GL_OBJECT_LINK_S TATUS_ARB , @LinkStatus&#41;;
glGetObjectParameterivARB&#40;FHandle,GL_OBJECT_COMPIL E_STATUS_ARB, @CompileStatus&#41;;

Result &#58;= &#40;LinkStatus = 1&#41; And &#40;CompileStatus = 1&#41;;
Finally
ShaderSource.Free;
End;
End;

I have deduced that it is blowing up on the 'glShaderSourceARB()' call line :(

All the procedures and function have been initialized ok, I have checked if they are assigned as part of the debugging.

Any ideas as to why it is blowing up there?

Do I need to get and possible beta test the new code that supports SDL 1_2_7 to make this work?

cheers,
Paul.

paul_nicholls
06-07-2006, 04:30 AM
Hi all,
I am using the 1.0 version headers of JEDI-SDL (but not the new branch version a few weeks old) so I can use the SDL dlls (currently using version 1_2_8).

I am running it under Delphi 5 Professional.

It was all working nicely, but now I am trying to do some shader stuff and am getting an access violation crash in the 'nvoglnt.dll' when I try to run the code below to load and compile shader code:

[code]Function TGL_ARB_Shader.LoadAndCompileShaderSource&#40;AFileNam e&#58; String&#41;&#58; Boolean;
Var
ShaderSource &#58; TStringList;
Source &#58; String;
]

I have deduced that it is blowing up on the 'glShaderSourceARB()' call line :(

All the procedures and function have been initialized ok, I have checked if they are assigned as part of the debugging.

Any ideas as to why it is blowing up there?

Do I need to get and possible beta test the new code that supports SDL 1_2_7 to make this work?

cheers,
Paul.

Hi all, I have now gotten it working, it was a coding error on my part :)

I wasn't passing in the correct parameters into the glShaderSourceARB() call...D'OH!

The corrected code is below:


Function TGL_ARB_Shader.LoadAndCompileShaderSource&#40;AFileNam e&#58; String&#41;&#58; Boolean;
Var
ShaderSource &#58; TStringList;
Source &#58; String;
LinkStatus &#58; GLint;
CompileStatus &#58; GLint;
SourceLength &#58; Integer;
Begin
Result &#58;= False;

If &#40;Not FileExists&#40;AFileName&#41;&#41; Then
Exit;

ShaderSource &#58;= TStringList.Create;

Try
ShaderSource.LoadFromFile&#40;AFileName&#41;;

If &#40;ShaderSource.Text = ''&#41; Then
Exit;

Source &#58;= ShaderSource.Text;

SourceLength &#58;= Length&#40;Source&#41;;

glShaderSourceARB&#40;FHandle,1,@Source,@SourceLength&#41; ;

glCompileShaderARB&#40;FHandle&#41;;

glGetObjectParameterivARB&#40;FHandle,GL_OBJECT_LINK_S TATUS_ARB , @LinkStatus&#41;;
glGetObjectParameterivARB&#40;FHandle,GL_OBJECT_COMPIL E_STATUS_ARB, @CompileStatus&#41;;

Result &#58;= &#40;LinkStatus = 1&#41; And &#40;CompileStatus = 1&#41;;
Finally
ShaderSource.Free;
End;
End;

I hope this helps someone else!! :)

I have to thank vgo for the the source code that was posted in the thread:

http://www.pascalgamedevelopment.com/forums/viewtopic.php?t=3169&highlight=glshadersourcearb

cheers,
Paul.

paul_nicholls
07-07-2006, 12:36 AM
Here is my GL Shader objects unit (used with the SDL OpenGL extensions, etc.) if anyone is interested :)


Unit GL_Shaders;
&#123;................................................. ......&#125;
// created by Paul Nicholls
// Copyright 2006
// Use for anything that you want, but
// please email me with any improvements that you may make &#58;&#41;
//
// Email&#58;
// paul_nicholls.hotmail.com
&#123;................................................. ......&#125;
Interface

Uses
gl,
glext;

Type
TGL_Shader = Class
Private
Protected
FHandle&#58; GLuint;
Public

Function LoadAndCompileShaderSource&#40;AFileName&#58; String&#41;&#58; Boolean; Virtual;

Function GetInfoLog&#58; String; Virtual;

Property Handle&#58; GLuint Read FHandle;
End;

TGL_ARB_Shader = Class&#40;TGL_Shader&#41;
Protected
Public
Constructor Create; Virtual;
Destructor Destroy; Override;

Function LoadAndCompileShaderSource&#40;AFileName&#58; String&#41;&#58; Boolean; Override;

Function GetInfoLog&#58; String; Override;
End;

TGL_ARB_Vertex_Shader = Class&#40;TGL_ARB_Shader&#41;
Private
Public
Constructor Create; Override;
Destructor Destroy; Override;
End;

TGL_ARB_Fragment_Shader = Class&#40;TGL_ARB_Shader&#41;
Private
Public
Constructor Create; Override;
Destructor Destroy; Override;
End;

TGL_Program = Class
Private
Protected
FHandle&#58; GLuint;
Public
Constructor Create; Virtual;
Destructor Destroy; Override;

Procedure AttachShader&#40;Const AShader&#58; TGL_Shader&#41;; Virtual;
Procedure Link; Virtual;
Procedure Enable; Virtual;
Procedure Disable; Virtual;

Procedure SetParameter&#40;Const AName&#58; String;
Const AValue&#58; GLint&#41;; Overload; Virtual;
Procedure SetParameter&#40;Const AName&#58; String;
Const AValues&#58; Array Of GLfloat&#41;; Overload; Virtual;
End;

TGL_ARB_Program = Class&#40;TGL_Program&#41;
Public
Constructor Create; Override;
Destructor Destroy; Override;

Procedure AttachShader&#40;Const AShader&#58; TGL_Shader&#41;; Override;
Procedure Link; Override;
Procedure Enable; Override;
Procedure Disable; Override;

Procedure SetParameter&#40;Const AName&#58; String;
Const AValue&#58; GLint&#41;; Overload; Override;
Procedure SetParameter&#40;Const AName&#58; String;
Const AValues&#58; Array Of GLfloat&#41;; Overload; Override;
End;

Implementation

Uses
SysUtils,Classes;

Function TGL_Shader.LoadAndCompileShaderSource&#40;AFileName&#58; String&#41;&#58; Boolean;
Begin
Result &#58;= False;
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Function TGL_Shader.GetInfoLog&#58; String;
Begin
Result &#58;= '';
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Constructor TGL_ARB_Shader.Create;
Begin
Inherited Create;

FHandle &#58;= 0;
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Destructor TGL_ARB_Shader.Destroy;
Begin
If &#40;FHandle <> 0&#41; Then
glDeleteObjectARB&#40;FHandle&#41;;

Inherited Destroy;
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Function TGL_ARB_Shader.LoadAndCompileShaderSource&#40;AFileNam e&#58; String&#41;&#58; Boolean;
Var
ShaderSource &#58; TStringList;
Source &#58; String;
LinkStatus &#58; GLint;
CompileStatus &#58; GLint;
SourceLength &#58; Integer;
Begin
Result &#58;= False;

If &#40;Not FileExists&#40;AFileName&#41;&#41; Then
Exit;

ShaderSource &#58;= TStringList.Create;

Try
ShaderSource.LoadFromFile&#40;AFileName&#41;;

If &#40;ShaderSource.Text = ''&#41; Then
Exit;

Source &#58;= ShaderSource.Text;

SourceLength &#58;= Length&#40;Source&#41;;

glShaderSourceARB&#40;FHandle,1,@Source,@SourceLength&#41; ;

glCompileShaderARB&#40;FHandle&#41;;

glGetObjectParameterivARB&#40;FHandle,GL_OBJECT_LINK_S TATUS_ARB , @LinkStatus&#41;;
glGetObjectParameterivARB&#40;FHandle,GL_OBJECT_COMPIL E_STATUS_ARB, @CompileStatus&#41;;

Result &#58;= &#40;LinkStatus = 1&#41; And &#40;CompileStatus = 1&#41;;
Finally
ShaderSource.Free;
End;
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Function TGL_ARB_Shader.GetInfoLog&#58; String;
Var
InfoLog &#58; PGLcharARB;
InfoLogLength &#58; GLint;
Begin
glGetObjectParameterivARB&#40;FHandle,GL_OBJECT_INFO_L OG_LENGTH_ARB,@InfoLogLength&#41;;

GetMem&#40;InfoLog,InfoLogLength + 1&#41;;

glGetInfoLogARB&#40;FHandle,InfoLogLength,@InfoLogLeng th,InfoLog&#41;;

Result &#58;= String&#40;InfoLog&#41;;

FreeMem&#40;InfoLog,InfoLogLength + 1&#41;;
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Constructor TGL_ARB_Vertex_Shader.Create;
Begin
Inherited Create;

FHandle &#58;= glCreateShaderObjectARB&#40;GL_VERTEX_SHADER_ARB&#41;;
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Destructor TGL_ARB_Vertex_Shader.Destroy;
Begin
Inherited Destroy;
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Constructor TGL_ARB_Fragment_Shader.Create;
Begin
Inherited Create;

FHandle &#58;= glCreateShaderObjectARB&#40;GL_FRAGMENT_SHADER_ARB&#41;;
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Destructor TGL_ARB_Fragment_Shader.Destroy;
Begin
Inherited Destroy;
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Constructor TGL_Program.Create;
Begin
Inherited Create;

FHandle &#58;= 0;
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Destructor TGL_Program.Destroy;
Begin
If &#40;FHandle <> 0&#41; Then
glDeleteObjectARB&#40;FHandle&#41;;

Inherited Destroy;
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Procedure TGL_Program.AttachShader&#40;Const AShader&#58; TGL_Shader&#41;;
Begin
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Procedure TGL_Program.Link;
Begin
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Procedure TGL_Program.Enable;
Begin
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Procedure TGL_Program.Disable;
Begin
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Procedure TGL_Program.SetParameter&#40;Const AName&#58; String;
Const AValue&#58; GLint&#41;;
Begin
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Procedure TGL_Program.SetParameter&#40;Const AName&#58; String;
Const AValues&#58; Array Of GLfloat&#41;;
Begin
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Constructor TGL_ARB_Program.Create;
Begin
Inherited Create;

FHandle &#58;= glCreateprogramObjectARB;
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Destructor TGL_ARB_Program.Destroy;
Begin
Inherited Destroy;
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Procedure TGL_ARB_Program.AttachShader&#40;Const AShader&#58; TGL_Shader&#41;;
Begin
glAttachObjectARB&#40;FHandle,AShader.Handle&#41;;
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Procedure TGL_ARB_Program.Link;
Begin
glLinkProgramARB&#40;FHandle&#41;;
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Procedure TGL_ARB_Program.Enable;
Begin
glUseProgramObjectARB&#40;FHandle&#41;;
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Procedure TGL_ARB_Program.Disable;
Begin
glUseProgramObjectARB&#40;0&#41;;
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Procedure TGL_ARB_Program.SetParameter&#40;Const AName&#58; String;
Const AValue&#58; GLint&#41;;
Begin
glUniform1iARB&#40;glGetUniformLocationARB&#40;FHandle,PGL CharArb&#40;AName&#41;&#41;,
AValue&#41;;
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
Procedure TGL_ARB_Program.SetParameter&#40;Const AName&#58; String;
Const AValues&#58; Array Of GLfloat&#41;;
Var
ParamCount&#58; Integer;
NameArb &#58; PGLCharArb;
Begin
ParamCount &#58;= Length&#40;AValues&#41;;

NameArb &#58;= PGLCharArb&#40;AName&#41;;

Case ParamCount Of
1&#58; glUniform1fARB&#40;glGetUniformLocationARB&#40;FHandle, NameArb&#41;,
AValues&#91;0&#93;&#41;;
2&#58; glUniform2fARB&#40;glGetUniformLocationARB&#40;FHandle, NameArb&#41;,
AValues&#91;0&#93;,AValues&#91;1&#93;&#41;;
3&#58; glUniform3fARB&#40;glGetUniformLocationARB&#40;FHandle, NameArb&#41;,
AValues&#91;0&#93;,AValues&#91;1&#93;,AValues&#91;2&#93;&#41;;
4&#58; glUniform4fARB&#40;glGetUniformLocationARB&#40;FHandle, NameArb&#41;,
AValues&#91;0&#93;,AValues&#91;1&#93;,AValues&#91;2&#93;,AValues&#91;3&#93;&#41;;
Else
End;
End;
&#123;................................................. ......&#125;

&#123;................................................. ......&#125;
End.