Sign in to follow this  

Problems using glMultMatrixf in Delphi

This topic is 4592 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Because the Tut about Quaternions didn't have a source for Delphi users, like myself, I tried to write a conversion. But I've got some problems with the glMultMatrixf function Vic Uses in his funtion to the new prespective on the world. When I use the function there is no drawing at all and the screen stays black. glMultMatrixf wants PGLfloat as I understood this shall be a pointer that points to the first element of an Array, because C++ uses pointers to represent arrays. But Delphi does not, so I created a pointer myself that points to my array and give it to the function. No Error is created but there is, as I said nothing on the screen when I use this function, although I tested it using a Identity Matrix I created, which once given to glMultMatrixf should not change anything at all. The Code is much the same of Vic's exept that I changed it to Delphi and use my function to load Textures which is working properly since i dont know. So this is not the poblem I think. Please anyone tell me what I am doing wrong, because I loved to use Quaternions in my Projects. Sincerly Scrooby

Share this post


Link to post
Share on other sites
procedure glCamera.setPrespective();
var Matrix : array[0..15] of GLfloat;
pMatrix :pointer;
begin
[...]
pMatrix := @Matrix;
// Opengl set new prespective

// Problem somewhere here:
glMultMatrixf(pMatrix);
[...]
end;

And the problem rows vs. columns came to my mind aswell, but for the identity vector it's not important ...

1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1

same if you read it in rows or in columns.

The format Delphi uses to store arrays I'm gonna check now..

Share this post


Link to post
Share on other sites

This topic is 4592 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this