A custom 3D game engine written in Java with GLSL shader support, featuring scene management, a shader-based rendering pipeline, and user input handling. This engine is designed for learning and experimentation with core graphics and engine architecture concepts.
- Core Rendering Pipeline: Supports vertex and fragment shaders via GLSL for flexible, real-time rendering.
- Scene Management: Hierarchical scene graph to organize and transform objects.
- Mesh & Texture Handling: Load and render 3D models with texture mapping support.
- Camera System: First-person and orbit-style camera controls.
- Lighting: Basic Phong lighting model with directional, point, and spot lights.
- Input Handling: Keyboard and mouse input for navigation and interaction.
- Utilities: Vector and matrix math classes, GLSL shader loader, and error logging.
- Java Development Kit (JDK) 11 or higher
- GLFW library for window creation and input handling
- LWJGL (Lightweight Java Game Library) for OpenGL bindings
- GLSL-compatible GPU drivers
- Clone the repository:
git clone https://github.com/Azz5/3dGameEngineInJava.git
- Open the project in your IDE (e.g., IntelliJ IDEA or Eclipse).
- Add LWJGL and GLFW dependencies to your build (e.g., via Maven or Gradle).
- Ensure your run configuration uses the correct native library paths for LWJGL.
- Run the
mainmethod incom.engine.Main. - Use W/A/S/D or arrow keys to move the camera.
- Move the mouse to look around.
- Press Esc to exit.
3dGameEngineInJava/
├── src/main/java/com/engine/
│ ├── Main.java # Entry point
│ ├── rendering/ # Shader and OpenGL setup
│ ├── scene/ # Scene graph and object classes
│ ├── input/ # Keyboard and mouse handlers
│ ├── math/ # Vector and matrix math utilities
│ └── utils/ # Shader loader, logger, etc.
├── assets/ # Example models and textures
└── README.md # This file
Contributions are welcome! To contribute:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/YourFeature). - Commit your changes (
git commit -m "Add YourFeature"). - Push to the branch (
git push origin feature/YourFeature). - Open a Pull Request.
This project is open-source and available under the MIT License. See LICENSE for details.