Re: openGL problem
From: Richard Harke (rharke_at_earthlink.net)
Date: 06/27/05
- Previous message: Dances With Crows: "Re: openGL problem"
- In reply to: Dances With Crows: "Re: openGL problem"
- Next in thread: Dances With Crows: "Re: openGL problem"
- Reply: Dances With Crows: "Re: openGL problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 27 Jun 2005 05:39:24 GMT
Dances With Crows wrote:
> On Sat, 25 Jun 2005 20:54:14 GMT, Richard Harke staggered into the Black
> Sun and said:
>> I am trying to draw a hyperbola. I have very simple code to draw the
>> three axes and that displays. if I add a call to sinh and cosh to
>> calculate a point on the hyperbola, I get nothing, not even my
>> coordinate axes.
>
> You Mean "if I *draw* the points I receive from sinh() and cosh(), I get
> a black screen", right? You may wish to fprintf() the values you're
> getting from sinh() and/or cosh() to stderr, just to make sure the
> functions aren't returning "domain error" or "range error" or NaN or
> something that isn't what you're expecting.
>
>> Window opens but is just the background. Some times white, correct.
>> some times black which is wrong. I rearranged code so calls to sinh
>> and cosh are not between glBegin and glEnd -- doesn't help.
>
> No, it wouldn't, not really.
>
>> Either way, calls to sinh and cosh are in the display callback
>> Video is Nvidia FX5300 (5200 with PCI Express)
>> Using Nvidia's driver 6111
>>
>> Any one have a clue??
>
> (POVRay terminology, sorry, I don't know the OpenGL equivalents, but the
> concepts should transfer.)
>
> If this is 3D, you need to make sure the shape you're drawing isn't
> between the camera and the light source. Try restricting the X..Y range
> from -1..1 and moving the camera to 1.5,1.5,1.5 look_at 0,0,0. If that
> works more like what you want, you've got a camera positioning problem.
> POVRay warns you if the camera is inside an object, but I'm pretty sure
> OpenGL won't. HTH anyway,
>
Thanks for your reply. I know my image is in the right place
wrt the camera because with the calls to sinh and cosh it is fine.
I can substitute an expression using calls to exp and get the image
I want. But it also appears that the problem has nothing to do
with openGL but something is badly wrong with sinh and cosh.
I have tried a little test program with no openGL, just printf.
The expression with exp is fine but sinh and cosh give crap.
But if I have a call to sinh or cosh in the same program with the
expression using exp, then that returns crap as well.
I guess I need a more appropriate forum to follow up.
Richard
- Previous message: Dances With Crows: "Re: openGL problem"
- In reply to: Dances With Crows: "Re: openGL problem"
- Next in thread: Dances With Crows: "Re: openGL problem"
- Reply: Dances With Crows: "Re: openGL problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|