Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: glClear(GL_DEPTH_BUFFER_BIT)



Title: Re: glClear(GL_DEPTH_BUFFER_BIT)
Hi Dalal,
go to http://nehe.gamedev.net/
There are many lessons with sample code. They really start from scratch and bring you to a good level.
Then you can buy the Red Book about OpenGL.
On the Apple web site you can find some sample code too.
http://developer.apple.com/samplecode/GraphicsImaging/idxOpenGL-date.html
Also goggle “OpenGL” to find sample code, documents...

As far as your task, is your image a raster image? Or a vectorial image (as made by illustrator)?
Do you need to extrude it or do you need to use e.g. the brightness values to create a kind of mountain?
Or is it a reverse projection as e.g. a photograph of a building ---> 3D model?

Best Regards
--
Lorenzo
email: email@hidden

From: Dalal Al_Ammouri <email@hidden>
Date: Sat, 24 Nov 2007 18:40:38 +0200
To: Lorenzo <email@hidden>, Daniel Koch <email@hidden>
Cc: Mac-OpenGL List <email@hidden>
Subject: RE: glClear(GL_DEPTH_BUFFER_BIT)


hello guys
im really stuck in here
i never worked with open gl
and or any advanced programming essue
and i have a dr who asked us to write a program using c++ and oen gl
that takes an image with 2 dimentions and convert it to 3 dimentions
can any one help ???




 


> Date: Sat, 24 Nov 2007 17:07:59 +0100
> From: email@hidden
> To: email@hidden
> CC: email@hidden
> Subject: Re: glClear(GL_DEPTH_BUFFER_BIT)
>
> Hi Daniel,
> true, if I disable the depth test I don't get the bad intersection.
> This works with the scrolling text which is a 2D object (Quad). But in case
> I draw a 3D object, I get a bad result. The surfaces get all drawn without
> depth. Any solution?
>
>
> Best Regards
> --
> Lorenzo
> email: email@hidden
>
> > From: Daniel Koch <email@hidden>
> > Date: Sat, 24 Nov 2007 10:08:33 -0500
> > To: Lorenzo <email@hidden>
> > Cc: email@hidden
> > Subject: Re: glClear(GL_DEPTH_BUFFER_BIT)
> >
> > Hi Lorenzo,
> >
> > If you just disable the depth test before drawing drawing the! scrolling
> > text, and enable it again afterwards you should be able to accomplish
> > what you want without loosing the contents of your depth buffer.
> >
> > Hope this helps,
> > Daniel
> >
> > Lorenzo wrote:
> >> Hi,
> >> I have to draw a cube in a 3D space using a perspective camera,
> >> then a scrolling text using an orthogonal camera. In some case, when the
> >> cube is too close, it intersects scrolling the text, even if I use 2
> >> cameras. So I used a trick: when I set the ortho camera, before I draw the
> >> scrolling text, I call again glClear(GL_DEPTH_BUFFER_BIT). It works very
> >> well. I do
> >>
> >> clear color buffer and depth buffer
> >> set camera 1 (perspective)
> >> draw the cube
> >> set camera 2 (ortho)
> >> clear depth buffer
> ! >> draw the scrolling text
> >> draw oth er objects (?)
> >> flush
> >>
> >> The problem is that now I have not longer my depth buffer, so I can't
> >> properly draw any other 3D object, not even if I re-set the camera 1.
> >> I cannot change the drawing object order because I can't know in advance.
> >> Reading-Writing the z buffer is time consuming, so please have you a good
> >> idea to draw as on different layers?
> >>
> >>
> >>
> >> Best Regards
> >
> > --
> > Daniel Koch -+- Graphics Technology Lead -+- TransGaming Technologies
> > email@hidden +1 613.244.1111 x352 www.transgaming.com
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Mac-opengl mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>! http://lists.apple.com/mailman/options/mac-opengl/email@hidden
>
> This email sent to email@hidden



Get news, entertainment and everything you care about at Live.com. Check it out! <http://www.live.com/getstarted.aspx >

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden

References: 
 >RE: glClear(GL_DEPTH_BUFFER_BIT) (From: Dalal Al_Ammouri <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.