- procedure TGLSLProgram.SetF(aname: string; arg: GLFloat);
- begin
- glUniform1fARB(glGetUniformLocationARB(FProgramObject, @aname ), arg);
- end;
DGL https://delphigl.com/forum/ |
|
delphi2009 string vs opengl shader commands problems https://delphigl.com/forum/viewtopic.php?f=19&t=8861 |
Seite 1 von 1 |
Autor: | noeska [ Mo Dez 14, 2009 14:57 ] |
Betreff des Beitrags: | delphi2009 string vs opengl shader commands problems |
I am puzzled again with the new delphi string and the likes ![]() On calling a shader with parameters the actual parameter is never set. Code:
But when is use the variable name directly here: Code:
Then it does works. But for now i am unable to provide a working type. String / AnsiString / PChar / PAnsiChar but none seem to work ![]() |
Autor: | Coolcat [ Mo Dez 14, 2009 15:08 ] |
Betreff des Beitrags: | Re: delphi2009 string vs opengl shader commands problems |
I'm not a Delphi user, but google found this link which looks helpful: http://compaspascal.blogspot.com/2008/1 ... ed-by.html Maybe rawbytestring or utf8string? |
Autor: | noeska [ Mo Dez 14, 2009 15:51 ] |
Betreff des Beitrags: | Re: delphi2009 string vs opengl shader commands problems |
Hmm, that only confuses me more ... (if only there was a way delphi2009 could behave like delphi always did on only support fancy string when needed) Looking at the type of the command i came up with this: Code:
![]() But i dont like using PGLcharARB in a class it want to use string or ansistring there. But again this does NOT work: Code:
|
Autor: | noeska [ Mo Dez 14, 2009 16:02 ] |
Betreff des Beitrags: | Re: delphi2009 string vs opengl shader commands problems |
Ok final working version: Code:
|
Autor: | Lord Horazont [ Mo Dez 14, 2009 17:13 ] |
Betreff des Beitrags: | Re: delphi2009 string vs opengl shader commands problems |
Yep, the problem is, that the newer delphis use WideString instead of AnsiString when you just say "String". So if you explicitly need an AnsiString, you should tell this to Delphi. Probably even in the method declaration. greetings |
Seite 1 von 1 | Alle Zeiten sind UTC + 1 Stunde |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |