Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2005-05

Fixes to OpenGL bindings

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michalis Kamburelis

Hi

I'm attaching a trivial patch for OpenGL bindings that

1. Fixes declarations of glGetMapiv, glGetMaterialiv and glLightiv to take pointer as the last parameter.

2. Changes glGetString, gluErrorString and gluGetString to return PChar instead of PGLubyte. After all, GLubyte and Char are the same thing internally but for Pascal declaration PChar is more comfortable than PGLubyte, since these functions always return null-terminated strings. This is even proved in GLext unit implementation where you have to explicitly cast result of glGetString(GL_EXTENSIONS) to PChar all the time :)

I also submitted these changes to Tom Nuydens and to jedi-sdl (for Delphi/Kylix users that use version of these units from jedi-sdl), so all three copies of these units stay synched.

Michalis

Reply by email

Michael Van Canneyt
to Michalis Kamburelis
Michalis Kamburelis wrote 17 lines
Hi I'm attaching a trivial patch for OpenGL bindings that 1. Fixes declarations of glGetMapiv, glGetMaterialiv and glLightiv to take pointer as the last parameter. 2. Changes glGetString, gluErrorString and gluGetString to return PChar instead of PGLubyte. After all, GLubyte and Char are the same thing internally but for Pascal declaration PChar is more comfortable than PGLubyte, since these functions always return null-terminated strings. This is even proved in GLext unit implementation where you have to explicitly cast result of glGetString(GL_EXTENSIONS) to PChar all the time :) I also submitted these changes to Tom Nuydens and to jedi-sdl (for Delphi/Kylix users that use version of these units from jedi-sdl), so all three copies of these units stay synched.

Thank you. Committed in version 58; merged to fix branch.

Michael.

Reply by email