Downloads
Simple Mesh Viewer
SMV is a simple mesh viewer of OpenMesh 1.0 meshes using OpenGL for rendering. It is intended as a simple bolt-on setup for C++ programmers working on experimental projects where you don't really care about mesh rendering but still need a display.
Features:
- Should be pretty easy to use and modify if necessary
- Rendering of triangles, edges, vertices, vertex colors, face colors, vertex normals, face normals and texture coordinates (parameterization)
- Simple user interaction (rotation, translation, zooming)
- Face and vertex picking
- Annotations to be displayed alongside the mesh, for example colored line segments, points or text. Use this to mark up the mesh with that custom hyper-experimental per-face vector field you've been working on.
- Alternative position, normal or texture coordinate sources, in case you have several alternate sets of vertex positions, etc.
SMV is intended for C++ programmers: download the current source.
Snippets
JPEGReader/JPEGWriter: C++ wrapper for libjpeg
JPEGReader/JPEGWriter are C++ wrappers for the widely-supported libjpeg library by the Independent JPEG Group. It supports querying and loading JPEG images, changing the target colorspace, loading low-resolution previews and quantizing to a fixed number of colors. It has no dependencies apart from libjpeg itself, is thread-safe and comprises of a single source file and header. It includes an example program and an IDE project for XCode 2.4, but should compile on any current C++ compiler.
JPEGLoader
is licensed under a Creative Commons
Public Domain License.
Download
JPEGLoader-1.0.1.tgz or
JPEGLoader-1.0.1.zip.
LinAlg: Fixed-size C++ vector and matrix library
LinAlg is a straight-forward C++ template vector and matrix library that provides fixed-sized linear algebra vectors and matrices, for example, a 3D vector of doubles or a 2D matrix of integers. The type used for an element can be specified. The elements are stored in fixed-sized arrays, so the compiler should have plenty of optimization opportunities. A test suite and example code are provided. You can also take a look at the documentation.
LinAlg is copyright Adrian Secord. Download LinAlg-3.1.tgz or LinAlg-3.1.zip. The previous versions, which included an explicit dimension in the template parameters, are still available: LinAlg-2.0.tgz or LinAlg-2.0.zip.
wxAGG: wxWidgets and the Anti-Grain Geometry Renderer
wxAGG is a simple example showing one way to combine the cross-platform user interface library wxWidgets with the vector Anti-Grain Geometry (AGG) renderer. The interesting class is AGGWindow, a wxWidgets class that stores a bitmap (in the native pixel-format of your platform) and directs AGG to render directly into the bitmap. This bitmap is then used to paint the window when requested by the rest of the wxWidgets framework. The source should hopefully be self-explanatory. Project files are included for Apple's XCode 2.x and Microsoft's Visual Studio 7/8 integrated development environments.
wxAGG
is licensed under a Creative Commons
Public Domain License.
Download
wxAGG-1.1.tgz or
wxAGG-1.1.zip.
glReadPixels() performance timing
Some graphics applications need to read results back from the graphics processor efficiently. This is not a particularly well-supported operation on most hardware, since graphics processors are heavily optimized in the CPU to GPU direction at the cost of the other direction. For the most efficient data transfer you need to choose a pixel format (e.g. RGBA, BGR, etc.) and component storage type (e.g. unsigned char, float, int) that best matches the hardware.
pixel_transfer_test.c is a simple one-file test that will tell you which combination of pixel format and component storage type gives you the best performance using glReadPixels() on a particular machine. It repeatedly calls glReadPixels() using all combinations of pixel format and component storage type and prints out the fastest pair in terms of data transfer rate and pixel transfer rate.
pixel_transfer_test.c
is licensed under a Creative Commons
Public Domain License.
Download
the code.
