This might be a stupid questing, but i can’t get the stencil buffer to run faster then 5 FPS. I heard that it is hardware supported, so i don’t know what i’m doing wrong. I program in VB (that might be it) and i have a Radeon 9800, and i’ve also tested it on a GeForece 4 TI, and Geforce 4 440. I use it in 8 bits.
Can someone please tell me what i’m doing wrong.
Thanks in advance
P.S. I have the latest drivers, so please don’t say that.
The stencil buffer is definately suported in hardware on ATI and NVidia cards. I use it on the ATI R9700/9800 and NVidia GeForce 1/2/3/4/FX cards and it’s works flawlessly.
Your framerate drops to 5 fps as soon as you enable stencil test ?
I am using 24 bit colors, 24 bit depth, 8 bit stencil, and 8 bit alpha. The thing is all i do is draw ONE quad with a recording stencil buffer:
glEnable GL_STENCILBUFFER
glStencilFunc cfAlways, 0.5, 1
glStencilOp soReplace, soReplace, soReplace
(Sorry if the code isn’t right, but you get the idea)
And the whole thing just slows down when i usually get over 300 FPS for ONE quad.
I’m trying to do shadows now, and it would look much better with the stencil buffer.
Is the Stencil bits suppose to be 8 bit?
Any sugestions would be useful, even some type of substitute for the stencil would be useful.
Thanks, ZIX
I’ll try 32bpp color now, and i’ll tell you my results with one quad drawing over another w/ stencil.
[This message has been edited by zix99 (edited 07-17-2003).]
I think i feel very stupid right now. I just tested a quad over quad w. stencil and got 1500 FPS! I don;t understand it, before i DID get 5 FPS, but now i get 1500! I guess i’ll just feel happy for myself
Thanks for your help anyway, i don’t know what i did, but it works.
Here is my code if anyone wants it (sorry its in BASIC, but its still very easy to understand)
When I was working with VB with a GL ActiveX control, eventually, maybe after the 1th or 2nd or 3rd run, it ran extremely slow and the vendor was M$.
I guess VB didn’t terminate things correctly.
With VC++, I don’t have problems.
It sounds like you’re gone have a hell of a time with it if this is the problem.
I know how to delete all the textures, and the opengl context at the end, so I usually don’t have any problems. I make sure i erase everything before ending.
The problem is when you Alt-F5 out of the debugger, or your program crashes. At that point, you don’t have good clean-up in 16-bit Windows environments (Win98/WinME).or un-protected environments (MacOS 9). Luckily, 32-bit kernels, such as NT/2000/XP, do a much better job of clean-up, as does Linux and MacOS X.
If you’re running on XP and are still seeing the “die after N iterations” problem, then your development environment probably isn’t creating a new process for you, but instead forces you to live with the dregs of whatever the last invocation left behind. Quitting and re-starting the development environment should then (theoretically) clear it up.
Can anyone tell me any reason why one should choose VB (other than being too stupid for “real” programming language)? At least, when working with OpenGL
and not Excel/Access?
Can anyone tell me any reason why one should choose VB (other than being too stupid for “real” programming language)? At least, when working with OpenGL
and not Excel/Access?
Jan[/b]
Ummm …
Most “management types” will tout ease of use and increased productivity, because VB is supposedly easy to learn.
While I wouldn’t say that VB is exclusively an idiot language, it does go to some measures to prevent people from shooting themselves in the foot. At the same time these measures seem to prevent people from getting things done.
I believe every day spent learning VB is a day wasted. But to answer your question:
Management thinks it’s a good idea.
My POV:
VB has not the same final disallocation than MS VS.
Most of configurations of VS take care about a local garbage collector that free ressources even if you let “some” local array allocated.
(just look at the difference between C++ Compilator from Microsoft VS and Borland.)
May be it’s due to that.
I worked on activeX with OpenGL under VB and VSC++ and a program (quite simple) doesn’t behave alike on both.
Freeing hardware Handle is not always successful under VB (in my case).
NB: I’m not taking part for VSC++ or VB , but some difference must be known.
(Sometimes VSC compilator sucks with 300ko .EXE’s to display a “hello world”)
But , sure that VSC got most of time no problem with freeing ressouces.