Advertisement

Lesson 26 stencil buffer issue...

Started by February 04, 2003 03:01 PM
3 comments, last by Tuvok5 22 years ago
Hi, I am having a problem with the stencil buffer of lesson 26. When I compile the Borland project of this lesson, a second shpere appears under the floor, but I see the reflection fine. But when I execute the included pre-compiled application it works fine, i.e. no second sphere and nice reflection. Also the included application is 165k and the project creats one of 27K... Question what are the libraries that are linked into it ? Thanks for anyones help ! Cheers
Jean Drolet, ing.
one of the thing that you do for the stencil buffer is make a second but not visible object which you write to the buffer itself. now what you probably did is forget to glColorMask (0,0,0,0) before drawing the sphere in your stencil buffer. remember to set it back to 1,1,1,1 after the sphere.

As for the whole size change, it might have been made using Debug info and yours release...big size difference.

Linkings are usually
OPENGL32.LIB glu32.lib glaux.lib

but keep in mind I use VC6++ and not borland so I might be wrong
Advertisement
The size of the exe in BC++ builder depends on
if you have in project settings -> packages checked
the build with runtime packages checkbox. It has nothing to do with OpenGL, opengl.lib or glu.lib.
But if it is checked, you exe will be smaller and functional on your computer as the bigger one, without runtime packages. However, it will be functional only on computers which have these packages (.dlls) installed. i.e. intalled BC++ builder.
And the example you''ve downloaded is compiled for all machines.
With or without BC++ builder.
Hi

Found the problem !

The GL_STENCIL_BUFFER_BIT was not cleared at the begining of the drawscene function...

Beware the source code for borland also has this error !

Cheers !
Jean Drolet, ing.
submit it as a bug report to nehe. Otherwise eventually someone else will run into the same problem.

| - Project-X - my mega project.. yup, still cracking along - | - adDeath - an ad blocker I made - | - email me - |

This topic is closed to new replies.

Advertisement