POV-Ray : Newsgroups : povray.programming : Entry point confusion? Server Time
28 Mar 2024 13:30:36 EDT (-0400)
  Entry point confusion? (Message 1 to 7 of 7)  
From: Aidy
Subject: Entry point confusion?
Date: 23 Feb 2011 15:35:01
Message: <web.4d656eb48c266d86d3fa8b3e0@news.povray.org>
Hi guys.

Quick question. I'm working on pov-ray for my final year project at uni, and am
getting a little lost. I posted a while ago about class diagrams and entry
points and was pointed at the TracePixel::Operator() method, however I was using
3.7 beta at the time. I've now switched down to the current stable release but I
now don't seem to have that class?? Is it a new thing in 3.7 or am I just
missing something?

Also what is the main entry point on windows? I found the povray.cpp which
contains a main method inside an #ifndef but when i attempted to place something
in this (cout for instance) I never saw it so I assume it never got executed.

Any help?
Thanks


Post a reply to this message

From: Le Forgeron
Subject: Re: Entry point confusion?
Date: 23 Feb 2011 16:22:37
Message: <4d657a9d$1@news.povray.org>
Le 23/02/2011 21:31, Aidy nous fit lire :
> Hi guys.
> 
> Quick question. I'm working on pov-ray for my final year project at uni, and am
> getting a little lost. I posted a while ago about class diagrams and entry
> points and was pointed at the TracePixel::Operator() method, however I was using
> 3.7 beta at the time. I've now switched down to the current stable release but I
> now don't seem to have that class?? Is it a new thing in 3.7 or am I just
> missing something?

Spell it correctly when searching

./source/backend/render/tracepixel.cpp:void TracePixel::operator()(DBL
x, DBL y, DBL width, DBL height, Colour& colour)

(that's in 3.7RC3) (notice the lower 'o', it's a c++ keyword)

If you are looking at 3.6, well, that's a bit of different story.
the local function trace_pixel() is in render.cpp


> 
> Also what is the main entry point on windows? I found the povray.cpp which
> contains a main method inside an #ifndef but when i attempted to place something
> in this (cout for instance) I never saw it so I assume it never got executed.

The source is available for unix (and alike).
For Windows, well... it's windows, and the usual entry point for an
application would be main() as usual for a console application, but
something totally different for the graphical part. (something like
WinMain... or some other sillyness, I just cannot remember from my
traumas with the various Visual Studio... )

Anyway, the virtual front-end is defined in the vfe subpart (and only
unix part is delivered), with a definition of ALTMAIN and its own main().


Post a reply to this message

From: Aidy
Subject: Re: Entry point confusion?
Date: 24 Feb 2011 09:05:01
Message: <web.4d6665262d7a67ded3fa8b3e0@news.povray.org>
as I say I've already found the operator code in 3.7 but now I'm using 3.6 so
could find it but I've found it all now thanks.

I have another problem though. I've got it compiling and to try and test I've
added some std::cout lines in the code, including the trace_pixel method, but
they never appear anywhere? any way I can get these to be shown somewhere? they
don't show in the output of visual studio and they don't show in a command
prompt :(

Le_Forgeron <jgr### [at] freefr> wrote:
> Le 23/02/2011 21:31, Aidy nous fit lire :
> > Hi guys.
> >
> > Quick question. I'm working on pov-ray for my final year project at uni, and am
> > getting a little lost. I posted a while ago about class diagrams and entry
> > points and was pointed at the TracePixel::Operator() method, however I was using
> > 3.7 beta at the time. I've now switched down to the current stable release but I
> > now don't seem to have that class?? Is it a new thing in 3.7 or am I just
> > missing something?
>
> Spell it correctly when searching
>
> ./source/backend/render/tracepixel.cpp:void TracePixel::operator()(DBL
> x, DBL y, DBL width, DBL height, Colour& colour)
>
> (that's in 3.7RC3) (notice the lower 'o', it's a c++ keyword)
>
> If you are looking at 3.6, well, that's a bit of different story.
> the local function trace_pixel() is in render.cpp
>
>
> >
> > Also what is the main entry point on windows? I found the povray.cpp which
> > contains a main method inside an #ifndef but when i attempted to place something
> > in this (cout for instance) I never saw it so I assume it never got executed.
>
> The source is available for unix (and alike).
> For Windows, well... it's windows, and the usual entry point for an
> application would be main() as usual for a console application, but
> something totally different for the graphical part. (something like
> WinMain... or some other sillyness, I just cannot remember from my
> traumas with the various Visual Studio... )
>
> Anyway, the virtual front-end is defined in the vfe subpart (and only
> unix part is delivered), with a definition of ALTMAIN and its own main().


Post a reply to this message

From: Le Forgeron
Subject: Re: Entry point confusion?
Date: 24 Feb 2011 10:00:23
Message: <4d667287@news.povray.org>
Le 24/02/2011 15:03, Aidy a écrit :
> I have another problem though. I've got it compiling and to try and test I've
> added some std::cout lines in the code, including the trace_pixel method, but
> they never appear anywhere? any way I can get these to be shown somewhere? they
> don't show in the output of visual studio and they don't show in a command
> prompt :(

Nah, you will need another Windows' expert for that one.
std::cout is not really friendly with graphic widgets... may be just
check in your project setting about the application mode (console/...),
it might be as simple as toggling a setting... or not.

Or dive deeper in code and get inspiration from the #debug processing.



-- 
Software is like dirt - it costs time and money to change it and move it
around.

Just because you can't see it, it doesn't weigh anything,
and you can't drill a hole in it and stick a rivet into it doesn't mean
it's free.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Entry point confusion?
Date: 24 Feb 2011 16:15:11
Message: <4d66ca5f@news.povray.org>
Le_Forgeron wrote:
> Le 24/02/2011 15:03, Aidy a écrit :
>> I have another problem though. I've got it compiling and to try and test I've
>> added some std::cout lines in the code, including the trace_pixel method

GUI application usually don't show an output stream under
Windows but using a pipe sometimes works. Try starting from
command line with "pvengine.exe | more".


Post a reply to this message

From: Darren New
Subject: Re: Entry point confusion?
Date: 24 Feb 2011 17:12:16
Message: <4d66d7c0@news.povray.org>
Christian Froeschlin wrote:
> Le_Forgeron wrote:
>> Le 24/02/2011 15:03, Aidy a écrit :
>>> I have another problem though. I've got it compiling and to try and 
>>> test I've
>>> added some std::cout lines in the code, including the trace_pixel met
hod
> 
> GUI application usually don't show an output stream under
> Windows but using a pipe sometimes works. Try starting from
> command line with "pvengine.exe | more".

You basically have to invoke AllocConsole() early in your processing for 
a 
GUI application to not throw away stdout.

-- 
Darren New, San Diego CA, USA (PST)
  "How did he die?"   "He got shot in the hand."
     "That was fatal?"
          "He was holding a live grenade at the time."


Post a reply to this message

From: Aidy
Subject: Re: Entry point confusion?
Date: 25 Feb 2011 12:35:00
Message: <web.4d67e75b2d7a67ded3fa8b3e0@news.povray.org>
Ah thanks for the help! The | more trick worked :D


Post a reply to this message

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