Original date:2021-02-05 17:26:42 Edited by: ghaberek Subject: Re: FreeGlut Example Not Working

Icy_Viking said...

Thanks for the tips. I tried a more simple idea, but it still isn't working.

atom y = routine_id("Render") 

That needs to be call_back() not call_proc(). They have very similar names but very different purposes. And you need to pass the result of call_back() (not the result of routine_id()) to glutDisplayFunc.

A few notes about the Euphoria internals:

  • routine_id() returns an integer that counts from one, which is the index to an internal routine list that then contains another index to somewhere in the internal symbol table.

  • call_func() and call_proc() take that index value from routine_id() and simply make normal internal routine call to the value at that index in the routine list, the same way you would if you called the routine directly by name.

  • call_back() takes an index value from routine_id() and sets up a small C function in memory and returns an atom that contains the new memory address. You then take that memory address value and give it to some external system so that the system can make a call back into your Euphoria application from the outside.


Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu