Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Sep 1999 21:42:56 -0400
From:      Randall Hopper <aa8vb@ipass.net>
To:        Marc van Woerkom <van.woerkom@netcologne.de>
Cc:        multimedia@FreeBSD.ORG
Subject:   Hardware 3D for FreeBSD (was Re: tee-ing a sound stream)
Message-ID:  <19990921214256.A11482@ipass.net>
In-Reply-To: <199909210812.KAA00797@oranje.my.domain>; from Marc van Woerkom on Tue, Sep 21, 1999 at 10:12:22AM %2B0200
References:  <199909190024.RAA29548@rah.star-gate.com> <199909190034.CAA02916@oranje.my.domain> <14308.15475.162264.375285@avalon.east> <19990919231119.A1295@ipass.net> <199909210812.KAA00797@oranje.my.domain>

next in thread | previous in thread | raw e-mail | index | archive | help

--huq684BweRXVnRxX
Content-Type: text/plain; charset=us-ascii

Marc van Woerkom:
 |> Having a blast over here with hardware accelerated 3D! 
 |
 |Me too. Running something rather simple (compared to most Win32 3d games)
 |like 'sproingies -root -count 20' with FreeBSD suddenly became
 |exciting. Strange, eh? :)

Yep, same here!  I'll have to give that one a try.  

 |> I'll send details and benchmarks off-line when I cook some more 
 |> ports and finish running them.
 |
 |Yes, please!
 |What do you use as benchmark? (gears? "pulsar -fps"? glperf?)

     Well, I'm just getting started really.  So far, xbench and glclock are
the only hefty benchmarks that I've run in FreeBSD (done some MSW benches
too, but we won't talk about that... :-) glclock is very cool!  Worth the
pull.

     This weekend I whipped some of my work-in-progress notes/benchmarks as
well as a few new ports (glclock, togl, pyopengl), and just now put them up
at:

     http://www.ipass.net/~dbhopper/aa8vb/Matrox-G200/index.html

     Overall, I'm pretty pleased with performance, and it's only going to
get better from here (with GLX improvements plus DRI later).  BTW keep in
mind when viewing the numbers that my Matrox G200 is a mere PCI 3D card, so
you AGP2X/4X folk with TNT2s and G400s no doubt will smoke me silly!

 |There are lots of software (e.g. look on www.opengl.org) that
 |would be interesting to put into a port. 

Definitely.  

Speaking of cool, one thing I've really gotten into lately is scripting 3D
interfaces.  With the simplicity and raw capability of languages like
Python and Tcl (vs. C/C++) and GUIs like Tk (vs. X/Motif), it's amazing how
few lines of code (and effort!) it takes to generate useful tools.

Check out the attached Python app that uses PyOpenGL (PyOpenGL and Togl's
port are on my page).  44 lines and you have a little GUI with controls and
can spin a checkerboard and sphere with the mouse.  More samples in the
OpenGL/Demo/tom dir of the PyOpenGL build tree as well as some in the Togl
tree.

And even at 44 lines, we're still down using raw OpenGL (graphics assembly
language).  Stack a graphics toolkit like VTK (www.kitware.com) on top of
that, and things like this turn into 10-15 lines.  VTK is more useful with
more serious vis and imaging jobs though.  VTK works fine in Python with
PyOpenGL BTW (I use this at work occasionally, but haven't gotten to trying
it with HW-3D here at home yet).

BTW, IBM Data Explorer (www.opendx.org) works remarkably well.  I tested it
briefly using the LD_PRELOAD trick.  Use a tool like this and create useful
tools by connecting modules with the mouse.  Running the
AnnotationGlyphs.net for example turns software-only 1 fps into 4-5 fps,
and this is with the Image module (which itself is a bloated macro; better
fps to be had with the Display module)

 |To prevent several people doing similiar work I want to put a 
 |list online on who fiddles with what. I post a link, when
 |done.

Sounds like a good idea.  I'd be interested.

Randall

--huq684BweRXVnRxX
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="checker.py"

#!/usr/bin/env python

from OpenGL.GL import *
from OpenGL.GLUT import *
from OpenGL.Tk import *
import sys

def redraw(o):
  glClearColor(1, 0, 1, 0)
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
  glColor3f(0, 1, 0)
  #draw checkerboard
  N = 4
  glDisable(GL_LIGHTING)
  for x in range(-N, N):
    for y in range(-N, N):
      if (x + y) % 2 == 0:
	glColor3f(1, 1, 1)
      else:
	glColor3f(0, 0, 0)	
      glRectf(x, y, x + 1, y + 1)
  glEnable(GL_LIGHTING)

  glPushMatrix()
  glTranslatef(0., 0., 1.)
  glutSolidSphere(1.0,20,20)
  glPopMatrix()

def main():
  f = Frame()
  f.pack(side = 'top')
  o = Opengl(width = 200, height = 200, double = 1)
  o.redraw = redraw
  quit = Button(f, text = 'Quit', command = sys.exit)
  quit.pack({'side':'top', 'side':'left'})
  help = Button(f, text = 'Help', command = o.help)
  help.pack({'side':'top', 'side':'left'})
  reset = Button(f, text = 'Reset', command = o.reset)
  reset.pack({'side':'top', 'side':'left'})
  o.pack(side = 'top', expand = 1, fill = 'both')
  o.set_eyepoint(20.)
  o.mainloop()

main()

--huq684BweRXVnRxX--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990921214256.A11482>