| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
|
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 drawin g 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 buffe r > >> draw the scrolling text > >> draw other 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 (Mac-opengl@l ists.apple.com) > 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! |
_______________________________________________ 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: Daniel Koch <email@hidden>) | |
| >Re: glClear(GL_DEPTH_BUFFER_BIT) (From: Lorenzo <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.