Delphi and opengl problem

Started by
2 comments, last by Dybbuk 20 years, 11 months ago
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.
Advertisement
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.
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?
I found out that the problem was that I tried to load he textures before creating in the rendering context.

This topic is closed to new replies.

Advertisement