Real Software Forums
http://forums.realsoftware.com/

OpenGL Class #5 - Mesh (Open Source)
http://forums.realsoftware.com/viewtopic.php?f=4&t=33569
Page 1 of 2

Author:  Blake [ Tue Apr 27, 2010 11:22 pm ]
Post subject:  OpenGL Class #5 - Mesh (Open Source)

Here you guys go, a class that should help everyone using opengl get things going quickly! All feedback is welcome :)

Download Version 1.7
Released: 5/28/2010

Download Version 1.6
Released: 5/20/2010

Download Version 1.5
Released: 5/19/2010

Download Version 1.4
Released: 5/11/2010
Note: GL_*_STRIPs will looks a bit awkward since culling has been disabled to show full rotations.

Download Version 1.3
Released: 5/8/2010

Download Version 1.2
Released: 5/6/2010

Download Version 1.1
Released: 5/5/2010

Download Version 1.0
Released: 4/27/2010

Author:  wardy [ Wed Apr 28, 2010 8:37 am ]
Post subject:  Re: OpenGL Class #5 - Mesh (Open Source)

Very useful Blake, thank you. I have learned a great deal about OpenGL from your examples.

Author:  Blake [ Sat May 01, 2010 2:30 pm ]
Post subject:  Re: OpenGL Class #5 - Mesh (Open Source)

Your very welcome, I'm glad they are being useful :)

Author:  jkhendrickson [ Wed May 05, 2010 7:52 am ]
Post subject:  Re: OpenGL Class #5 - Mesh (Open Source)

Nicely done Blake! Very helpful.

Author:  Blake [ Wed May 05, 2010 12:39 pm ]
Post subject:  Re: OpenGL Class #5 - Mesh (Open Source)

Just released an updated version. Added a Scale method and cleaned up a couple of small items including being able to change the pitch (up/down) angle of the camera.

Author:  Blake [ Thu May 06, 2010 10:44 pm ]
Post subject:  Re: OpenGL Class #5 - Mesh (Open Source)

Just released v. 1.2, here are some of the things that were added:

    AppendMesh() - You can add one mesh to another
    AlphaValue() - You can now get/set the alpha value at each vertex, this is based on 0 = Opaque, 255 = Transparent
    AutoCheckAlpha [Default: True] - You can have the mesh class set the alpha value to Opaque by default when setting a color

Edit: Forgot to add that I added support in the Render method for glDrawRangeElements. You can specify what the lowest/highest vertex you will call within the passed Indices (if not drawing the entire mesh), this gives room for optimization in the video card due to a smaller amount of memory needed.

Author:  Blake [ Sat May 08, 2010 9:29 pm ]
Post subject:  Re: OpenGL Class #5 - Mesh (Open Source)

Just released v 1.3, here are the things that were added:

    Attach() - You can combine one mesh with another
    Copy() - Returns a copied version of the mesh, you can pass a start/count value to get just a portion of the mesh
    Detach() - Returns the the mesh requested by the start/count values and removes the portion from the mesh.
    Duplicate() - Copies all of the properties from the passed mesh.
    IndicesInRange() - Returns a memoryblock with the range of index values requested by the start/count parameters
    Move() - Moves the mesh by the passes x, y and z values. Optional parameters of Indices so you can move only a portion of the mesh if you wish.
    Remove() - Removes the portion of the mesh as requested by the start/count parameters.

Updates:

    Scale() - You can now pass an optional list of indices to be scaled if you do not want the entire mesh to be scaled.

Author:  Blake [ Tue May 11, 2010 4:42 pm ]
Post subject:  Re: OpenGL Class #5 - Mesh (Open Source)

Just released version 1.4, added a Rotate function as well as cleaned up some notes.

Author:  Blake [ Wed May 19, 2010 12:48 am ]
Post subject:  Re: OpenGL Class #5 - Mesh (Open Source)

Just released version 1.5, here are some of the things that have been updated or changed.

New:
    CalculateNormals() - The mesh class can now calculate its own normals, optional parameter is a list of Indices.

Updated:
    Rotate() - Rotations are now done via a rotation matrix, over 2x faster than previously coded.
    Scale() - Changed from one Scaler parameter to X, Y and Z parameters, you can specify how to scale each axis.

Author:  wardy [ Wed May 19, 2010 3:17 am ]
Post subject:  Re: OpenGL Class #5 - Mesh (Open Source)

Nice work Blake.

Author:  Blake [ Thu May 20, 2010 11:51 pm ]
Post subject:  Re: OpenGL Class #5 - Mesh (Open Source)

Thanks :)

Just released version 1.6, here is what is new/updated

New:
    FocalPoint() - Returns the center point of the mesh or the optional list of indices
    GroupSetup() - If you are going to draw multiple pieces of the mesh begin with this to enable the proper client states
    GroupRender() - Does not set up any of the client states as Render() does, only does the drawing.
    GroupCleanup() - Disable the proper client states

Updated:
    IndicesInRange() - There was a small error in the looping that was causing there to be to many index values returned in the memoryblock

Author:  Blake [ Fri May 28, 2010 8:22 pm ]
Post subject:  Re: OpenGL Class #5 - Mesh (Open Source)

Version 1.7 is up, changes:

Added:
    Rotatem() - Allows you to pass a OpenGLMatrix that already had the rotation matrix calculated.

Updated:
    Scale() - Added an optional origin parameter so you can scale around a point instead of always scaling around 0, 0, 0

Also the OpenGLMatrix class has been beefed up, enjoy :)

Author:  realguru [ Tue Jun 01, 2010 9:27 am ]
Post subject:  Re: OpenGL Class #5 - Mesh (Open Source)

This is looking very good and useful. I'd like to see a LoadFromOBJ and SaveToOBJ method (in my copious free time I might write them...).

Have you considered hosting all this in an online open source repository like SourceForge or code.google.com?

Author:  Blake [ Tue Jun 01, 2010 3:21 pm ]
Post subject:  Re: OpenGL Class #5 - Mesh (Open Source)

I actually have OpenAsOBJ in the OpenGLModel class (which is currently under development) but if you want to write a SaveAsOBJ function I would be happy to include it (giving you full credit for it naturally).

As for the open source repository, I haven't really given it a thought mainly because I've never used them before.

Author:  pregan [ Tue Jun 01, 2010 4:31 pm ]
Post subject:  Re: OpenGL Class #5 - Mesh (Open Source)

Blake wrote:
As for the open source repository, I haven't really given it a thought mainly because I've never used them before.


Doing so would make your managing of updates and us watching for them much easier.

Page 1 of 2 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/