mirror of
https://github.com/opus-tango/IntroductionToVulkan.git
synced 2026-03-20 03:55:26 +00:00
Added tutorials "06 - Descriptor Sets" and "07 - Uniform Buffers". Added functions for projection matrices generation to Tools. Added function for loading images from files (with stb_image library). Updated README.md file with description of Tutorial06.
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <array>
|
||||
#include "vulkan.h"
|
||||
|
||||
namespace ApiWithoutSecrets {
|
||||
@@ -83,6 +84,27 @@ namespace ApiWithoutSecrets {
|
||||
// ************************************************************ //
|
||||
std::vector<char> GetBinaryFileContents( std::string const &filename );
|
||||
|
||||
// ************************************************************ //
|
||||
// GetImageData //
|
||||
// //
|
||||
// Function loading image (texture) data from a specified file //
|
||||
// ************************************************************ //
|
||||
std::vector<char> GetImageData( std::string const &filename, int requested_components, int *width, int *height, int *components, int *data_size );
|
||||
|
||||
// ************************************************************ //
|
||||
// GetPerspectiveProjectionMatrix //
|
||||
// //
|
||||
// Function calculating perspective projection matrix //
|
||||
// ************************************************************ //
|
||||
std::array<float, 16> GetPerspectiveProjectionMatrix( float const aspect_ratio, float const field_of_view, float const near_clip, float const far_clip );
|
||||
|
||||
// ************************************************************ //
|
||||
// GetOrthographicsProjectionMatrix //
|
||||
// //
|
||||
// Function calculating orthographic projection matrix //
|
||||
// ************************************************************ //
|
||||
std::array<float, 16> GetOrthographicProjectionMatrix( float const left_plane, float const right_plane, float const top_plane, float const bottom_plane, float const near_plane, float const far_plane );
|
||||
|
||||
} // namespace Tools
|
||||
|
||||
} // namespace ApiWithoutSecrets
|
||||
|
||||
Reference in New Issue
Block a user