glBindTexture with Delphi
Hi.
I downloaded Nehe''s tutorials and Marc Aarts basecode in Delphi and got it to compile. However, when I tried to convert the texture mapping tutorial Delphi said that the glBindTexture() function could not be found.
I included the header OpenGL, but not GLaux, as I could not find it anywhere online.
I even tried updating the OpenGL header from Delphi Jedi. Is the function declared in GLaux? If so, can anyone give me an url that works for it?
Thanks in advance.
Yeah, delphi''s headers are pretty up shit creek.. try defining it yourself like this:
procedure glGenTextures(n: GLsizei; var textures: Gluint); stdcall; external ''opengl32.dll'';
procedure glBindTexture(target: GLenum; texture: GLuint); stdcall; external ''opengl32.dll'';
at the top of your texture unit code where the usual function definitions are located.
procedure glGenTextures(n: GLsizei; var textures: Gluint); stdcall; external ''opengl32.dll'';
procedure glBindTexture(target: GLenum; texture: GLuint); stdcall; external ''opengl32.dll'';
at the top of your texture unit code where the usual function definitions are located.
hey, after i do a glBindTexture, what must i do to turn it off?
(draw faces withou texturing)?
(draw faces withou texturing)?
[Hugo Ferreira][Positronic Dreams][]
"Research is what I''m doing when I don''t know what I''m doing."
- Wernher Von Braun (1912-1977)
quote:
Original post by pentium3id
hey, after i do a glBindTexture, what must i do to turn it off?
(draw faces withou texturing)?
The opposite of what you did to turn it on. glBindTexture doesn''t turn on texturing, glEnable does. So, to turn off texturing we''d use glDisable(GL_TEXTURE_2D).
[Resist Windows XP''s Invasive Production Activation Technology!]
Something weird is going on now with the Delphi header files.
I swapped to the Jedi GL header yeaterday before you people replied trying to fix the Bind Texture problem. My program compiled ok, then when I came to re compile it after shutting down delphi it wouldn''t compile, as it said it could not recognise the function gluPerspective. I swear the header list was the only thin I changed yet when I swap back to the default headers again it still won''t compile? WTF is going on?
Thanks for your help on the other matter.
+MDI
I swapped to the Jedi GL header yeaterday before you people replied trying to fix the Bind Texture problem. My program compiled ok, then when I came to re compile it after shutting down delphi it wouldn''t compile, as it said it could not recognise the function gluPerspective. I swear the header list was the only thin I changed yet when I swap back to the default headers again it still won''t compile? WTF is going on?
Thanks for your help on the other matter.
+MDI
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement