POV-Ray : Newsgroups : povray.programming : POV-Ray source tutorials? : Re: POV-Ray source tutorials? Server Time
28 Jul 2024 20:33:03 EDT (-0400)
  Re: POV-Ray source tutorials?  
From: Lummox JR
Date: 22 Jun 1999 19:00:31
Message: <3770162C.5C87@aol.com>
Chris Huff wrote:
> 
> Are there any tutorials or other sources of information on the POV-Ray
> source yet? Like how to add a keyword, or explanations of the
> structure of the source?

Not that I know of, though I've learned a little bit from working with
it in the few days I've had the source code myself.
To add a keyword, you must do the following:

- Add a token in TOKENIZE.C and PARSE.H, along with the other tokens;
  make sure it goes in the same place in both arrays.
- Add something in one of the Parse_suchandsuch() functions to recognize
  your keyword; there, do any secondary parsing you need, or else
  create a new Parse routine to handle it. (Look through PARSE.C and
  the Superpatch's F_EXPR.C to see what I mean.)

That's all I've learned so far. Not enough for me to create a new
primitive by any means, yet; in fact, I haven't created any new tokens
at all, though I've been tempted.

Lummox JR


Post a reply to this message

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