view-obj-3d
Description
View is a lightweight standalone Windows application for viewing 3D models, written in pure C. It loads Wavefront .obj models (with .mtl materials and textures) and displays them in real time on the classic OpenGL fixed-function pipeline.
The project is a single-task desktop app: you hand it a model file, and it opens a window where the model is shown - lit, textured and slowly rotating. No menus, UI frameworks or external 3D libraries: only Win32 API, classic OpenGL and its own model loader. On launch the model is automatically centered in the window, scaled to the window size and oriented so its largest dimension points up. The model then rotates continuously around the vertical axis (36°/s). A held left mouse button stops auto-rotation and allows free orbiting; rotation resumes on release.
Technologies
- C (MinGW-w64 build)
- Win32 API (window class, message loop, WinMain)
- Classic OpenGL - fixed-function pipeline, client-side vertex arrays
- stb_image (single-file library, public domain) - image loading
- Wavefront OBJ + MTL model format (own parser, no external 3D libraries)
- Build: MinGW-w64 gcc, -O2 -mwindows, linking opengl32 and gdi32
- Platform: Windows