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_.
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(AFileName: 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(FHandle,1,@Source[1],Nil); // <---blowing up here!!
glCompileShaderARB(FHandle);
glGetObjectParameterivARB(FHandle,GL_OBJECT_LINK_STATUS_ARB , @LinkStatus);
glGetObjectParameterivARB(FHandle,GL_OBJECT_COMPILE_STATUS_ARB, @CompileStatus);
Result := (LinkStatus = 1) And (CompileStatus = 1);
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.
Bookmarks