Thursday, February 03, 2005

OpenGL 2.0

Over the past few days I've been searching the net to learn about OpenGL version 2.0 . Basically OpenGL 2.0 is OpenGL 1.5( the previous version) but with support for the OpenGL Shading Language. Here is a brief summary of the new features( taken from http://www.opengl.org/ ):

  • Programmable shading - With the new release, both OpenGL Shading Language and its APIs are now core features of OpenGL. New functionality includes the ability to create shader and program objects; and the ability to write vertex and fragment shaders in OpenGL Shading Language.
  • Multiple render targets that enable programmable shaders to write different values to multiple output buffers in a single pass.
  • Non-power-of-two textures for all texture targets, thereby supporting rectangular textures and reducing memory consumption.
  • Two-sided stencil with the ability to define stencil functionality for the front and back faces of primitives, improving performance of shadow volume and constructive solid geometry rendering algorithms.
  • Point sprites which replace point texture coordinates with texture coordinates interpolated across the point. This allows drawing points as customized textures, useful for particle systems.

Having used texture mapping in CMSI371, I'd be able to benefit from the ability to use non-power-of-two textures. Also, I recall having used the stencil buffer, not in my final program for the class, but just for experimentation. Therefore I could possibly make use of the new two-sided stencil feature in some programs I already have coded.

Now comes the problem of how I can actually start experimenting with these features. In order to take advantage of OpenGL 2.0, the video card on the system being programmed on needs to support the new extensions/features. As of the moment my Intel 855GM graphics accelerator on my laptop only supports up to OpenGL 1.3. I found this out using the call:

gl.glGetString(GL.GL_VERSION)

in a JOGL gears demo I've been messing around with. I also found a nifty little program called OpenGL Extensions viewer (http://www.realtech-vr.com/glview/) That gives details on every extension that your 3D card supports. I've yet to run this on my desktop, but I'm quite sure that my supported version of OpenGL will not be very high as I have a somewhat old Nvidia GeForce 3.

This may be a bit of a problem, as I won't be able to use the new extensions unless I update my card( or try to find the newest drivers, but I doubt Nvidia has released any newer drivers for such an old card ). I plan on checking which version the Dells in the Keck lab have, but considering OpenGL 2.0 is less than a year old, they may not support it either. Until I can find a work around to this roadblock, I plan on continuing to research and play around with some more of the advanced features of OpenGL that are documented in the two textbooks we used for CMSI 371. Recently I've spent some time brushing up on lighting( materials, normals, etc ), and I plan on working on some advanced texture mapping to come up with some nice visuals. These features will be things that I can use for the JOGL portion of my senior project, so the benefit is two-fold.

Stay tuned for another update, which tentatively will be in 2-3 days.

P.S. I just read the comment posted from my first post. Thanks for the advice, I'll look into those ideas.

0 Comments:

Post a Comment

<< Home