POV-Ray : Newsgroups : povray.binaries.scene-files : Macro Callbacks in pov SDL : Macro Callbacks in pov SDL Server Time
1 Sep 2024 22:14:59 EDT (-0400)
  Macro Callbacks in pov SDL  
From: Tek
Date: 8 Feb 2004 07:29:52
Message: <40262bc0$1@news.povray.org>
(with reference to my post in povray.advanced-users)

This file demonstrates a way in which a variable can store a reference to a
macro. And this variable can be used to indirectly invoke that macro. This is
equivalent to function callbacks in C, or class methods in C++.

It can be pretty handy if you want to define a lot of different macros with the
same interface, and call them from code which is independant of the macros
themselves.

Let me know if this is any good! :)
-- 
Tek
www.evilsuperbrain.com

P.S. sorry for the double-post, I've been quite productive this evening!


Post a reply to this message


Attachments:
Download 'scratchfile.inc.txt' (1 KB) Download 'scratchfiletest.pov.txt' (2 KB)

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.