Tweaks to B3D accelerator code.
bert at impara.de
Wed Mar 9 20:49:50 UTC 2005
Am 09.03.2005 um 15:26 schrieb Alan Grimes:
> I got my build working well enough that I was able to play around with
> some of the Baloon3D code. (Ask Ian why you are having problems
> building B3D on unix... it's his fault!)
Didn't know I had problems ... but blaming Ian is always a good bet.
Ian, you're guilty!
> Attached is a new version of the cross-platform code.
1. Please try setting your mail client to not inline attachments. This
is what you sent:
Content-Type: text/plain; name="sqOpenGLRenderer.c"
Content-Disposition: inline; filename="sqOpenGLRenderer.c"
2. Please send diffs in context or unified format. It makes reading
your changes much more efficient for others. I have attached one.
> 1. Removed many error tests... OpenGL is a safe protocol so extra
> error checking is not required. Any sanity checks should be
> accomplished in the gererated portion of the code, before it reaches
> the OpenGL interface anyway. This will allow the code to run smoother,
> especially through deep pipelines.
glGetError() is very cheap if no error happened. If there was one it is
very nice for debugging to see exactly which call caused it. So unless
you can demonstrate this is indeed hurting performance, I'd leave them
> 2. I massacred glSetTransform. It was being overly cautious about
> setting up the matricies, (setting them to identity before doing
> anything), and it was manually transposing the input matrices... The
> version of OpenGL on my system has its own transpose function which,
> presumably, is better tuned for the implementation's internal
> representation format. It also makes the code alot cleaner on the
> client side.
You would need to check for the existence of ARB_transpose_matrix
before using glLoadTransposeMatrix(). I guess this will not even
compile on Windows. Mind, if you touch anything in the platforms/Cross
directory you better make sure it works everywhere.
> The version provided does run both the 3D demos in 3.7 and the teapot
> stuff in Croquet.
Croquet doesn't actually use any of the OpenGL stuff in this file, but
only the GLX code.
> -- the build can't find the croquet sources though I don't know why
> that is...
Did you read the error message thoroughly? I bet it said where it was
looking for which sources file. Make sure it's there.
> In the B3D demos of 3.7, it gets around 21-26 FPS in software
> rendering, and around 48fps in hardware acceleration mode. There are
> some minor glitches with the grass color but otherwise it's a good
Did your changes yield any measurable performance improvement? If so,
on what hardware?
- Bert -
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 18981 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20050309/badcaad4/sqOpenGLRenderer.c.obj
More information about the Vm-dev