Archived

This topic is now archived and is closed to further replies.

Delphi and opengl problem

This topic is 5309 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

Hello all, For an assignment in my Delphi classes i have to make a Program. I decided to make a little openGL game. But i ran into some trouble. I never combined openGL and delphi before so i used jan horn''s framework and texture loading routine to start with. (http://www.sulaco.co.za/) I bind some textures and draw some stuff, so far so good But now for that problem: When i try to load any textures in an other unit than my main unit the texture won''t load, and my object remain white/gray. I declare all variables in the other unit but it wil still not work. I tough, i''ll try to fix that problem later and coded on. Next i wanted to make a display list and again it didn''t work. When i made an app with only one unit that code worked fine, but when i copy ased it in my project nothing was drawn when i called the list. I guess these problems are related but have no clue what is causing it. Is it a Delphi or openGL related problem? I haven''t got much experience with delphi, but this even stumped my teachers.... If somebody want to review my code, reply and i will email it to you.

Share this post


Link to post
Share on other sites
Does this framework you speak of include built-in display lists? You can''t nest display lists, and the scope of a texture object only extends as far as the display list in which it was created. Sounds like the symptoms you describe might be caused by something like this. Possibly.

Share this post


Link to post
Share on other sites
I can''t help you too much but I do program with Delphi and OpenGL. I always load my textures using another unit (containing my TGLTexture class). Seems to work fine for me. Could we see some code?

Share this post


Link to post
Share on other sites