Author Topic: Glut Demos  (Read 2270 times)

0 Members and 1 Guest are viewing this topic.

Peter

  • Guest
Glut Demos
« on: June 23, 2012, 08:22:58 AM »
Deleted
« Last Edit: April 26, 2015, 06:31:29 AM by Peter »

Charles Pegge

  • Guest
Re: Glut Demos
« Reply #1 on: June 23, 2012, 01:23:35 PM »

Hi Peter,

Problem here running your Glut Demos. I will try to find out why. (GPF)

I am going to adopt Glut as part of the Oxygen package, (as well as the Opengl headers), so they will always be available if you want to use them with your demos.

I found freeGlut pretty easy to use and it's cross-platform so the code is easy to share code with the wider programming community.

Charles

Charles Pegge

  • Guest
Re: Glut Demos
« Reply #2 on: June 23, 2012, 02:39:00 PM »

Peter, just looking at your code: the callbacks need to be cdecl. Important when params are passed.

function f cdecl (...) callback

Charles Pegge

  • Guest
Re: Glut Demos
« Reply #3 on: June 24, 2012, 09:23:25 AM »

To get my GLUT demos to work, I created an extern cdecl block for the callbacks. Otherwise crashes within 1 second! It shows up very rapidly with mouse moves.

extern cdecl

...

end extern


Charles

Charles Pegge

  • Guest
Re: Glut Demos
« Reply #4 on: June 24, 2012, 10:33:59 AM »
Best to get to get the whole header and clean it up, as I have done with the FreeGlut header.

All pointers and handles  should be declared sys, long or dword for 32 bits, short or word for 16 bits.

once the base types have been typedef'd, very little needs to be changed in the header

example:

typedef dword uint32
typedef word   uint16
typedef byte    uint8
...