An open API service indexing awesome lists of open source software.

https://github.com/ScanMountGoat/SFGraphics

Object oriented OpenGL wrapper and rendering library using OpenTK
https://github.com/ScanMountGoat/SFGraphics

graphics opengl opentk windows

Last synced: 2 months ago
JSON representation

Object oriented OpenGL wrapper and rendering library using OpenTK

Awesome Lists containing this project

README

          

# SFGraphics
[![Build status](https://ci.appveyor.com/api/projects/status/2u86186wtxiq77jw/branch/master?svg=true)](https://ci.appveyor.com/project/ScanMountGoat/sfgraphics/branch/master)

### Getting Started
See the provided example project (SFGraphics GUI) for information on basic usage and how to render model and texture data.

### Requirements
| Component | Minimum Required Version |
| --- | ---------------------- |
| .NET | 4.6.1 |
| OpenGL / GLSL | 3.30 |
| OpenTK | 3.0 |

# Projects
## SFGraphics
Object oriented wrappers that take advantage of C# language features for OpenGL objects such as textures, shaders, buffers, etc. The wrapper classes provide a safer and simpler way of working with OpenGL objects.

Method and class names closely match the OpenGL specification in most cases. Wrapper classes expose the integer ID generated by OpenGL for when calling OpenGL functions directly is required.

## SFGraphics.Utils
Contains helpful methods for working with colors and vectors. Provides methods to facilitate working with `Bitmap` and `Color` objects in the `System.Drawing` namespace. Provides methods for generating tangent, bitangent, and normal vectors.

## SFGenericModel
Provides classes for rendering generic vertex data of a specified struct. The `GenericMesh` class handles the management of buffers and vertex attributes internally. This class can be subclassed to allow for simplified rendering of vastly different vertex data.

## SFShapes - WIP
Uses the SFGenericModel classes to provide rendering of basic 3d geometric primitives.

## SFShaderLoader
Provides methods for simplifying shader loading from text and precompiled binary sources. Note that shader binaries require more modern versions of OpenGL.

## SFGraphics GUI
An simple example of using the provided libraries in a WPF application to open and display Obj and Collada files using various debug rendering modes for vertex attributes.

# Issues
Please report all bugs or feature requests in the [bug tracker](https://github.com/ScanMountGoat/SFGraphics/issues).

# Building
Open the .sln and build in Visual Studio 2017 with .NET framework 4.0 or later.

# Releases
[Latest Commit](https://github.com/ScanMountGoat/SFGraphics/releases)
The latest commit to master built by Appveyor. These builds are unstable.

# Credits
### OpenTK
Used as the C# wrapper for OpenGL functions. Provides vector and matrix types.
* [Github](https://github.com/opentk/opentk)
* [License](https://github.com/opentk/opentk/blob/develop/License.txt)

### Smash Forge
Much of the OpenGL object wrappers and utility code is adapted from code I originally wrote for Smash Forge.
* [Github](https://github.com/jam1garner/Smash-Forge)
* [License](https://github.com/jam1garner/Smash-Forge/blob/master/License.txt)