This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <chrono> | |
#include <iostream> | |
#include <thread> | |
#include <atomic> | |
#include <cmath> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
using namespace std::chrono; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////////////////////////////////////////////////////////////////// | |
#include "pch.h" | |
#include <string> | |
#include <stdexcept> | |
#include <cstdlib> | |
#include "GrowableArray.h" | |
#include "base64.h" | |
#include "PlistReader.h" | |
#include "PlistBuilder.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void RenderingCommandList::beginRendering(RenderTarget *target, uint32_t imageIndex) | |
{ | |
VkClearValue &clearColorValue = target->getClearColorValue(), &clearDepthValue = target->getClearDepthValue(); | |
VkRenderingAttachmentInfo attachmentInfo = {}, depthAttachmentInfo = {}; | |
attachmentInfo.sType = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO; | |
if(!target->getImages().empty()) | |
{ | |
attachmentInfo.imageView = target->getImages()[imageIndex]->getImageView(); | |
attachmentInfo.imageLayout = VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//vs | |
#ifdef GL_ES | |
//precision mediump float; | |
#else | |
#define highp | |
#define lowp | |
#define mediump | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Full lighting shader template | |
// Verto Studio 3D | |
// Created by Mike Farrell | |
// | |
// Please read the shader section of the user-guide | |
// for more information on shader programming | |
// within Verto Studio | |
precision mediump float; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static const int currentAnimation = 0; | |
typedef unordered_map<aiString, const aiNodeAnim *> NodeAnimMap; | |
void EntityModel::boneAnimTransform(float timeInSeconds, vutil::GrowableArray *transforms, aiScene *aiSceneObj, const float16 *globalInverseTransform, bool loop) | |
{ | |
const aiScene *scene = aiSceneObj; | |
mat4 identity = mat4Identity; | |
if(!nodeAnimMapPtr) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <fstream> | |
#include <utility> | |
using namespace std; | |
int main(int argc, char **argv) | |
{ | |
auto loadSPIRV = [](const string &spirvPath) -> pair<uint8_t *, size_t> { | |
ifstream file(spirvPath, ios::ate | ios::binary); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Bilboard shader | |
//draw sprites in 3D from any angle | |
const vec2 pos[6] = vec2[]( | |
vec2(0, 0), | |
vec2(1, 0), | |
vec2(0, 1), | |
vec2(0, 1), | |
vec2(1, 0), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Bilboard shader | |
//draw sprites in 3D from any angle | |
in vec4 position; | |
in vec2 texcoord0; | |
out vec2 varTexcoord; | |
out flat float varDistanceToCamera; | |
out flat float varAlpha; | |
out flat float textureCutoffT; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int Logger::Buffer::flushBuffer() | |
{ | |
int num = (int)(pptr()-pbase()); | |
/*if(cout.write(buffer, num) != num) | |
{ | |
return EOF; | |
}*/ | |
#if (defined WIN10_BUILD) || (defined WIN32) |
NewerOlder