Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Glslcookbook | 461 | 4 years ago | 3 | mit | C | |||||
Example code for the OpenGL Shading Language Cookbook - 2nd Edition (3rd Edition now available) | ||||||||||
Opengl 4 Shading Language Cookbook Third Edition | 259 | 3 months ago | 1 | mit | C | |||||
OpenGL 4 Shading Language Cookbook - Third Edition, published by Packt | ||||||||||
Gpuimagegroup | 73 | 6 years ago | mit | |||||||
GPUImage讨论QQ群536987698 | ||||||||||
Opengl Build High Performance Graphics | 70 | 4 months ago | mit | C++ | ||||||
OpenGL Build High Performance Graphics, by Packt | ||||||||||
Juce Cookbook | 18 | 3 years ago | cc0-1.0 | Makefile | ||||||
Collection of tutorials & resources for the C++ library JUCE | ||||||||||
Glslcookbook.rs | 2 | 4 years ago | 8 | Rust | ||||||
A Rust implementation of the book OpenGL 4 Shading Language Cookbook Third Editoin | ||||||||||
Opengl 4 Shading Language Cookbook | 1 | 7 years ago | C++ | |||||||
The example code from the OpenGL 4 Shading Language Cookbook, 3rd Edition, by David Wolff and published by Packt Publishing.
To compile these examples, you'll need the following:
#define GLM_FORCE_RADIANS
prior to including the glm header files.The example code builds with CMake. Note that the examples for Chapter 10 will not function on MacOS due to lack of support for compute shaders on that platform.
make install
) or install GLM from your
favorite package manager. Otherwise, the CMake config files will not be created/available.CMAKE_PREFIX_PATH
to help cmake find them.make
.Any problems, create an issue on github.
When searching for GLM, CMake looks for the files glmConfig.cmake
and glmConfigVersion.cmake
.
If you install GLM using a package manager such as Homebrew on macOS, or a Linux package manager the cmake files should already be included.
Otherwise, if you're using the GLM source distribution, you'll have to run GLM through CMake to get it to
generate the glmConfig.cmake
and glmConfigVersion.cmake
files. It is frustrating, I wish that the GLM
maintainers didn't require this.
GLM_SRC
cd $GLM_SRC
mkdir build
cd build
cmake -D GLM_TEST_ENABLE=OFF -D CMAKE_INSTALL_PREFIX=MY_GLM_LOCATION ..
cmake --build . --target install
Replace GLM_SRC
above with the place where you extracted the GLM zip file, and replace MY_GLM_LOCATION
with the location where you want to install GLM. This should generate the needed cmake files and install
all of GLM to MY_GLM_LOCATION
.
-G "Visual Studio..."
, open the
Visual Studio solution. You should see one project per chapter.An OpenGL header file and a function loader for a 4.3 core profile are included with this project. They were generated using GLAD. This loader should also work on MacOS under a 4.1 core profile, but of course not all functions will load.
The code has been tested with OpenGL 4.3 on Windows/Linux and OpenGL 4.1 on MacOS.
This is the code repository for OpenGL 4 Shading Language Cookbook - Third Edition, published by Packt.
Build high-quality, real-time 3D graphics with OpenGL 4.6, GLSL 4.6 and C++17
OpenGL 4 Shading Language Cookbook, Third Edition provides easy-to-follow recipes that first walk you through the theory and background behind each technique, and then proceed to showcase and explain the GLSL and OpenGL code needed to implement them.
This book covers the following exciting features:
If you feel this book is for you, get your copy today!
All of the code is organized into folders. For example, Chapter02.
The code will look like the following:
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 6);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
GLFWwindow *window = glfwCreateWindow(800, 600, "Title", nullptr, nullptr);
Following is what you need for this book: If you are a graphics programmer looking to learn the GLSL shading language, this book is for you. A basic understanding of 3D graphics and programming experience with C++ are required.
With the following software and hardware list you can run all code files present in the book (Chapter 1-11).
Chapter | Software required | OS required |
---|---|---|
All | GLM Mathematics Library | Windows, Mac OS X, and Linux (Any) |
GLFW | Windows, Mac OS X, and Linux (Any) | |
CMake | Windows, Mac OS X, and Linux (Any) | |
Visual Studio 2017 | Windows, Mac OS X, and Linux (Any) |
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.
David Wolff is a professor in the computer science department at Pacific Lutheran University (PLU). He received a PhD in Physics and an MS in computer science from Oregon State University. He has been teaching computer graphics to undergraduates at PLU for over 17 years, using OpenGL.
Click here if you have any feedback or suggestions.