How to write scalable, modular CSS
{
"name": "Riccardo",
"surname": "Zanutta",
"interests": [
"Web", "Technology", "Sports"
],
"work": [
"@frontend-developer", "@ideonetwork"
],
"tech": [
"HTML", "CSS", "JavaScript", "React.js"
]
}
Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language.
CSS level 1 was released in 1996, and republished with corrections in 1999.
CSS is code as much as JavaScript, PHP or anything else, and we should pay attention to the way we write it.
Otherwise, it may cause things to be more complicated than they should be.
A scripting language that extends the language and gets compiled into regular CSS.
.sass
.foo
color: black
// indentation
.scss
.foo {
color: black;
}
.foo {
color: black;
}
$font-stack: Helvetica, sans-serif;
$primary-color: #333;
body {
font: 100% $font-stack;
color: $primary-color;
}
body {
font: 100% Helvetica, sans-serif;
color: #333;
}
!important! Overly nested rules will result in over-qualified CSS that could prove hard to maintain and is generally considered bad practice.
.foo {
.bar {
margin: 0;
padding: 0;
list-style: none;
}
.baz {
display: block;
padding: 6px 12px;
text-decoration: none;
}
}
.foo .bar {
margin: 0;
padding: 0;
list-style: none;
}
.foo .baz {
display: block;
padding: 6px 12px;
text-decoration: none;
}
.foo {
font-weight: bold;
&:hover {
text-decoration: underline;
}
.in-home & {
font-weight: normal;
}
}
.foo {
font-weight: bold;
}
.foo:hover {
text-decoration: underline;
}
.in-home .foo {
font-weight: normal;
}
/* partial.scss */
.foo {
width: 100%;
}
/* app.scss */
@import "partial";
.bar {
background: white;
}
.foo {
width: 100%;
}
.bar {
background: white;
}
@mixin square($size, $color) {
width: $size;
height: $size;
background-color: $color;
}
.small-blue-square {
@include square(20px, blue);
}
.big-red-square {
@include square(300px, red);
}
.small-blue-square {
width: 20px;
height: 20px;
background-color: blue;
}
.big-red-square {
width: 300px;
height: 300px;
background-color: red;
}
.message {
border: 1px solid #ccc;
padding: 10px;
color: #333;
}
.success {
@extend .message;
border-color: green;
}
.error {
@extend .message;
border-color: red;
}
.warning {
@extend .message;
border-color: yellow;
}
.message, .success, .error, .warning {
border: 1px solid #cccccc;
padding: 10px;
color: #333;
}
.success {
border-color: green;
}
.error {
border-color: red;
}
.warning {
border-color: yellow;
}
.foo {
@if 1 + 1 == 2 {
border: 1px solid;
}
@if 5 < 3 {
border: 2px dotted;
}
@if null {
border: 3px double;
}
}
@for $i from 1 through 3 {
.item- {
width: 2em * $i;
}
}
p {
border: 1px solid;
}
.item-1 {
width: 2em;
}
.item-2 {
width: 4em;
}
.item-3 {
width: 6em;
}
@nice-blue: #5B83AD;
:extend();
.a, #b {
color: red;
}
.mixin-class {
.a();
}
Stylus is a CSS preprocessor written in Node.js.
text-font-stack = 'Helvetica', 'Arial', sans-serif;
size(width, height = width)
width width
height height
.foo
size(100px)
"every piece of knowledge must have a single, unambiguous, authorative representation within a system."
.u-margin-top {
margin-top: 12px;
}
.u-margin-right {
margin-right: 12px;
}
.u-margin-bottom {
margin-bottom: 12px;
}
.u-margin-left {
margin-left: 12px;
}
Variables: why not?
$unit: 12px;
.u-margin-top { margin-top: $unit; }
.u-margin-right { margin-right: $unit; }
.u-margin-bottom { margin-bottom: $unit; }
.u-margin-left { margin-left: $unit; }
"[...] the practice of structuring information models and associated schemata that every data element is stored exactly only once".
If you can generate the same declaration 50 times without manually repeat it is DRY: you are generating repetition without actually repeating yourself.
Repetition in compiled code is fine, just avoid duplication data in source.
It is more a style guide than rigid framework: is an attempt to document a consistent approach to site development when using CSS.
SMACSS just provides basic guidelines. Use your own naming conventions for each of the categories and arrange them in your preferred way, as long as you document your approach so that other developers can follow along.
- Whiskey and Ginger Ale
- Beer
- Vodka
.favorite {
color: red;
font-weight: bold;
}
ul#summer-drinks li {
font-weight: normal;
font-size: 12px;
color: black;
}
The order of selectors in your CSS does play a role and the "further down" one does win when the specificity values are exactly the same.
.favorite {
color: red;
}
.favorite {
color: black;
}
The color will be black.
ul#summer-drinks li.favorite {
color: red;
font-weight: bold;
}
html body div#pagewrap ul#summer-drinks li.favorite {
color: red;
font-weight: bold;
}
.favorite {
color: red !important;
font-weight: bold !important;
}
CSS applies vastly different specificity weights to classes and IDs. In fact, an ID has infinitely more specificity value!
"There are only two hard things in Computer Science: cache invalidation and naming things." -- Phil Karlton
BEM, OOCSS, ACSS
BEM stands for Block Element Modifier and originated at Yandex. It provides a rather strict way to arrange your CSS classes into independent modules.
.block {}
.block__element {}
.block--modifier {}
.block__element--modifier {}
OOCSS is a programming paradigm. OOCSS stands for Object Oriented CSS.
"Basically, a CSS "object" is a repeating visual pattern, that can be abstracted into an independent snippet of HTML, CSS, and possibly JavaScript. That object can then be reused throughout a site. – Nicole Sullivan, Github (OOCSS)"
%icon {
content: '';
display: block;
&--pins {
@extend %icon;
background-image: url('../img/pins.svg');
}
&--heart {
@extend %icon;
background-image: url('../img/heart.svg');
}
}
%icon, %icon--pins, %icon--heart {
content: '';
display: block;
}
%icon--pins {
background-image: url('../img/pins.svg');
}
%icon--heart {
background-image: url('../img/heart.svg');
}
%font-stack--body {
font-family: 'Helvetica Neue','Helvetica', sans-serif;
}
%font-stack--headers {
@extend %font-stack--body;
font-weight: 600;
}
%type--base-body {
@extend %font-stack--body;
}
%type--base-h2 {
@extend %font-stack--headers;
font-size: 1.5em;
}
And now to the molecule! This is where it gets really delicious:
.metadata {
&__pin-type {
@extend %type--base-h2; //extend base header styling
}
&__caption {
@extend %type--base-body; //extending normal body copy
}
&__hearts {
&:hover {
color: red; //unique hover color
}
&:after {
@extend %icon--heart; // extending heart icon on pseudo element
}
}
&__pins {
&:hover {
color: green; //unique hover color
}
&:after {
@extend %icon--pins; // extending pins icon on pseudo element
}
}
}
.metadata__pins:after, .metadata__hearts:after {
content: ';
display: block;
}
.metadata__pins:after {
background-image: url('../img/pins.svg');
}
.metadata__hearts:after {
background-image: url('../img/heart.svg');
}
.metadata__pin-type, .metadata__caption {
font-family: 'Helvetica Neue','Helvetica', sans-serif;
}
.metadata__pin-type {
font-weight: 600;
}
.metadata__pin-type {
font-size: 1.5em;
}
.metadata__hearts:hover {
color: red;
}
.metadata__pins:hover {
color: green;
}
Atomic Design is a systems-thinking methodology solidified by Brad Frost
Create individual molecules or elements which, when combined and placed together, weave a web of modules, components, and eventually entire layout systems.
A good naming convention will tell you and your team:
They actually play together very nicely, especially when you throw Sass into the mix.
PostCSS is not a preprocessor per se; it doesn’t transform CSS. It provides a CSS parser and a framework for creating plugins that can analyse, lint, handle assets, optimise, create fallbacks, and otherwise transform parsed CSS.
PostCSS is agnostic to language format and allows for the syntax style of different preprocessors, like Sass and LESS, if needed.
"Wait! A CSS file?" Yup, a CSS file.
Ever wanted to learn Russian but were too busy writing CSS?
h1 {
размер-шрифта: 20пикселей;
цвет: красный;
цвет-фона: белый;
вес-шрифта: жирный;
}
h1 {
font-size: 20px;
color: red;
background-color: white;
font-weight: bold;
}
Improve the quality of your css with PostCSS: useful plugins.
a {
transition: transform 1s
}
a {
-webkit-transition: -webkit-transform 1s;
transition: -ms-transform 1s;
transition: transform 1s
}
Stylelint allows you to validate your CSS code against a predefined set of rules which can check your code for consistent formatting, usage of certain rules, units or directives, as well as potential mistakes (such as incorrect colors).
CSS4 will soon be upon us, and with it comes features such as native variables, custom media queries, custom selectors and new pseudo-links. While they are not yet supported in all browsers, they will be implemented in modern browsers as the specification gets approved
Over the next few years, the way we use CSS will change in many different ways. Every project will have different requirements, to which we will have to adapt our production methods. Working within a modular ecosystem like PostCSS allows us to pick and choose the features we want to complete a project.


{% set suppress_feedback = true %} {% extends '_layouts/layout.html' %} {% block page_title %}{% endblock %} {% block body_css_classes %}nhsuk-frontend{% endblock %} {% block content %}
7 days
Lots of questions about what happens .. if? Majority of people get better.
If you’re on public transport, go home by the most direct route. Stay at least 2 metres away from people if you can.
If you’re away from home:
To protect yourself and others, do not go to a GP, pharmacy or hospital
If your symptoms are mild, for example you do not have:
You can look after yourself at home as you would do with normal flu.
You will need to speak to 111 about getting tested, but it’s not urgent that you do that right now.
You should keep yourself separate from others in your household (self-isolate) until you have been spoken to 111. Read more details about self-isolation.
The phone service is currently very busy during the evenings and weekends, so try calling during the day instead. When you call, tell them you’ve been told you need a coronavirus test by the online service.
To manage your symptoms while you wait you can:
Call NHS 111 now. The phone service will be very busy, but you must wait until you get through.
Tell 111:
If you hear a recorded message, make sure you select the option to speak to someone.


Topics in Differential Geometry
HOMEWORK
| HW Description | |
|---|---|
| Homework 1: Linear Algebra Review |
There are total 20 problems in the problem set. Please
choose three problems that you are most unfamiliar with and
solve the problems by yourselves. Problems and the
corresponding keys are provided. After you finish the three
problems you choose, please check the solution for the rest
of the problems to review the concepts.
For those students who already did this exercise before, please find a paper using differential geometric techniques in big data analytics (not covered in today's class) to write a 1-2 page summary. Linear Algebra Review Problem Set Linear Algebra Review Solution |
| Homework 2: |
Part 1: Matrix Representation Find matrix representations respectively for three different kinds of data with at least two of them being different from the examples given in the class ● Describe the data, and ● Give matrix representation of the data, then ● Summarize mathematically how those matrices being used in the data analytical algorithm in each of the papers. Part 2: Wedge Product ● Wikepedia to learn more about wedge product ● Choose one property of wedge product to prove it by yourself. |
| Homework 3: |
Part 1: Rotation Group SO(3) ● Understand SO(3) in depth by reading through the Wikepedia page , and ● Prove SO(3) is a manifold (RP3) and a group. ● It follows that SO(3) is a Lie Group (do not need to prove this). Read definition of Lie Group Part 2: Lie Algebra ● Find lie algebra of SO(3). ● Find a basis of the lie algebra of SO(3) Part 3: Curve ● Show that the helix α(t) = (acos t, asin t, bt) is a regular curve. ● Is it parametrized by arc length? If not, please reprametrize it so it will be parametrized by arc length. ● Find the curvature K(s) of the helix α(s). |
| Homework 4: |
Part 1: Surfaces ● Show that "almost" all quadratic surfaces are regular surfaces ● Show that sphere is a regular surface. Part 2: Manifold ● Show that a regular n-dimensional surface is a manifold. Part 3: Project ● Work on your midterm project! Extra Credit ● Let W ∈ so(3) (Lie algebra). Show that Exp W ∈ SO(3) (the Lie group) |
| Homework 5: |
Part 1: Tangent Planes ● Prove that if a regular surface S meets a plane P in a single point p, then this plane coincides with the tangent plane of S at p. Part 2: The First Fundamental Theorem and Riemannian Metric ● You shall compute the first fundamental form of a sphere at a point of the coordinate neighborhood given by the parametrization x(θ, φ) = (sinθcosφ, sinθsinφ, cosθ) ● Show that A(R) is well-defined. The hints for the homework are in the lecture slides. |
| Midterm Project |
Midterm Project Work on your midterm project. Submit a draft presentation slides by the beginning of the class on Monday (email the slides to Prof. Gu). |
| Homework 6: |
Choose one of the following: ● Find the matrix of the second fundamental form and Gaussian curvature, mean curvature and principal curvatures of a Torus. Or ● Find the matrix of the second fundamental form and Gaussian curvature, mean curvature and principal curvatures of the surface of revolution. Final Project Proposal! |
| Homework 7: |
Christoffel Symbols and the Gauss Theorem: ● Compute the Christoffel symbols for a surface of revolution ● Prove Gauss' Theorem stating "The Gaussian Curvature K of a surface is invariant by local isometries". Hints of both problems can be found on the textbook. |
| Homework 8: Due April 9, 2018 |
Geodesic: ● Find the geodesic of a surface of revolution with the parametrization: x=f(v)cos(u), y=f(v)sin(u), z=g(v) Hints of the problem can be found on the textbook. |
| Homework 9: Due April 16, 2018 |
● p=x1 + x2i + x3j +
x4k and q=y1 + y2i +
y3j + y4k. Multiply them out term
by term and reocncile to write in terms of the basis
{1, i, j, k}. Verify that ∥pq∥=∥p∥∥q∥. ●Find the matrix representation of the rotation denoted by q in SP(1). |


A channel to discuss trading. For useful links and more info click the pinned messages to the right.
100 messages
Before 05-Dec-19 12:00 AM
Markus21-Jun-19 12:54 PM
Cryptoon21-Jun-19 12:55 PM
inb4 btc 30k and kmd 120k
MdAmazing21-Jun-19 12:55 PM
Lol
siu - Chainmakers21-Jun-19 12:55 PM
Alts will turn soon
Cryptoon21-Jun-19 12:55 PM
ARRR 20k
siu - Chainmakers21-Jun-19 12:55 PM
ARRR will easily reach $5 soon too
Cryptoon21-Jun-19 12:55 PM
not sure if serious :p
siu - Chainmakers21-Jun-19 12:55 PM
Im serious
Cryptoon21-Jun-19 12:55 PM
Ok, if that happens, I will ship a nice crate of champagne your way :p
siu - Chainmakers21-Jun-19 12:56 PM
Malti21-Jun-19 01:03 PM
based on what exactly @siu - Chainmakers ?
for me it's hard to see what is possible for arrr as it goes to ath's and thus in unexplored territory
Markus21-Jun-19 01:08 PM
@Malti but why do unexplored territory matter? TA doesnt work anyway ! (edited)
1
Malti21-Jun-19 01:08 PM
I think TA works very well based on probabilities and in established markets like BTC and KMD
to find bottoms etc
but for a new coin like ARRR, FA is the way to go
but to decide on a top with FA, seems hard
jl always mentions the 10% marketcap of XMR if I'm not mistaken
siu - Chainmakers21-Jun-19 01:12 PM
Im not calling tops or anything
Malti21-Jun-19 01:12 PM
not calling 5$ the top makes me even happier
siu - Chainmakers21-Jun-19 01:12 PM
Im estimating a fair value given the bull market we seem to be moving in to
Keppie21-Jun-19 01:14 PM
Cme futures trading for 10.000 usd btw
Sherdogz21-Jun-19 01:15 PM
So what do you look for if you're talking about FA for arrr? Biside active development and maybe community... What are the differences between all the ather privacy coins.(edited)
Malti21-Jun-19 01:15 PM
bigger anon set than zcash e.g.
growth potential due to exchange listings
XMR admins admitting ARRR being the superior anon coin over XMR


SN
Home
Projects
Education and Awards
Work while others sleep, stydy while others have fun, live as you want while others just dream!
Education
Maths and Science School in Blagoevgrad
Informatics
2016-present
SoftUni
Software Engineering
2017-present
Certificates
Programming Basics
Programming Fundamentals
Software Technology
JavaScript Fundamentals
Web Fundamentals
JavaScript Advanced
JavaScript for Front-End
JavaScript Applications
C Sharp Advanced
C Sharp OOP Basics
C Sharp OOP Advanced
Database Basics - MS SQL Server
ExpressJS Fundamentals
ReactJS Fundamentals
Database Advanced - Entity Framework
Angular Fundamentals
JavaScript Web Developer
C# Web Developer


WITNESS LIST State Health Care Expenditures, Select Committee March 18, 2003-4:00P HB 728 For: Camacho, Jose E. (Texas Association of Community Health Centers, Inc.) Coleman, Carrie (Texas Association of Health Plans) Dunkelberg, Anne (Center for Public Policy Priorities) McGiffert, Lisa (Consumers Union) Parish, M.D., Michael S. (TMA and TPS) On: Berndt, Trey (Health and Human Services Commission) Gibson, Linda (Comptroller of Public Accounts) HB 1196 For: Bright, Mike (The Arc of Texas) Horton, Colleen (Texas Center for Disability Studies) Marshall, Susan (Texas Council for Developmental Disabilities) HB 1548 For: Lugo, Judy (Texas State Employees Union) On: Dunkelberg, Anne (Center for Public Policy Priorities) McGiffert, Lisa (Consumers Union) Pharmacy Panel On: Cardenas, M.D., Carlos J. (Border Health Caucus) Lestico, Dr. Mitchell (Texas Society of Health System Pharmacists) Oliveira, M.D., Noel (Border Health Caucus) Rumsey, Louis (Self) Solis, Carlos (True Care Pharmacy)


The Arabidopsis Interactions Viewer queries a database of 70,944 predicted and 91,175 confirmed Arabidopsis interacting proteins. We have also included 2.8 million experimentally determined protein-DNA interactions.
The predicted interactions (interologs) were generated by Drs Matt Geisler and Jane Geisler-Lee at the Southern Illinois University (Geisler-Lee et al., 2007). Their current version is Interactome 2.0. The confirmed Arabidopsis interacting proteins come from BioGRID (Chatr-aryamontri et al. 2017), BIND - the Biomolecular Interaction Network Database, from high-density Arabidopsis protein microarrays (Popescu et al., 2007; Popescu et al., 2009), from Braun et al.'s Arabidopsis Interactome 2011 , from Wolf Frommer's Membrane protein INteractome Database MIND, and over 1,190 other literature sources.
The protein-protein interactions in these sources were identified using several different methods, such as yeast two hybrid screens, but also via traditional biochemical methods. Use the links in the reference column that are in the tabular output of this viewer to view further information, or mouse-over the edges.
The DNA-protein data were generously provided by O'Malley et al. (2016), Gaudinier et al. (2011), Taylor-Teeples et al. (2015), Li et al. (2014), and Brady et al. (2011) and were mostly generated by DAP-seq, with some generated by Y1H.
All subcellular localisation data is from SUBA, the Arabidopsis Subcellular Database (Hooper et al., 2017). Additional protein function data is from MapMan (Usadel et al., 2009).
Designed and Developed by Vincent Lau with design consultation from Dr. Nicholas Provart. Built with CytoscapeJS, thanks to Max Franz and Asher Pasha for development advice. Funding provided by Genome Canada and NSERC.
Upload an exported AIV2 cytoscape JSON or your own protein-protein interaction data. For uploading your own data, see the below JSON structure and use the same property names. Also preappend nodes with 'Protein_' in 'id'. The app will then overlay your network with extras such as localization data. Some features are disabled when uploading such as the table view and DNA tooltips.
{
"elements" : {
"nodes" : [
{
"data" :
{
"id" : "Protein_At1g25420",
"name" : "At1g25420"
}
},
{
"data" :
{
"id" : "Protein_At5g49650",
"name" : "At5g49650"
}
},
{
"data" :
{
"id" : "Effector_HARXLL429",
"name" : "HARXLL429"
}
}
],
"edges" : [
{
"data" :
{
"id" : "Protein_At5g49650_Protein_At1g25420",
"source" : "Protein_At1g25420",
"target" : "Protein_At5g49650"
}
},
{
"data" :
{
"id" : "Effector_HARXLL429_Protein_At5g49650",
"source" : "Protein_At5g49650",
"target" : "Effector_HARXLL429"
}
}
]
}
}
Cytoscape app not yet loaded
| Interaction Type | Gene 1 (Source) | Gene 2 (Target) | Gene 1 Annotation | Gene 2 Annotation | Interolog Confidence/S-PPI rank | Pearson Correlation | Reference | MI Term | Gene 1 Localization | Gene 2 Localization |
|---|


|
Vienna Vulkan Engine
|
Classes | |
| struct | QueueFamilyIndices |
| need only for start up More... | |
| struct | SwapChainSupportDetails |
| need only for start up More... | |
| struct | vhMemoryBlock |
| A block of N entries, which are UBOs that e.g. define world matrices etc. More... | |
| struct | vhMemoryHandle |
| A handle into an entry of a memory block. More... | |
| struct | vhVertex |
| per vertex data that is stored in the vertex buffers More... | |
Functions | |
| VkResult | vhBufCreateBuffer (VmaAllocator allocator, VkDeviceSize size, VkBufferUsageFlags usage, VmaMemoryUsage vmaUsage, VkBuffer *buffer, VmaAllocation *allocation) |
| Create a Vulkan buffer. More... | |
| VkResult | vhBufCopyBuffer (VkDevice device, VkQueue graphicsQueue, VkCommandPool commandPool, VkBuffer srcBuffer, VkBuffer dstBuffer, VkDeviceSize size) |
| Copy a buffer from a source buffer to a destination buffer. More... | |
| VkResult | vhBufCreateImageView (VkDevice device, VkImage image, VkFormat format, VkImageViewType viewtype, uint32_t layerCount, VkImageAspectFlags aspectFlags, VkImageView *imageView) |
| Create a view for a Vulkan image. More... | |
| VkResult | vhBufCreateDepthResources (VkDevice device, VmaAllocator allocator, VkQueue graphicsQueue, VkCommandPool commandPool, VkExtent2D extent, VkFormat depthFormat, VkImage *depthImage, VmaAllocation *depthImageAllocation, VkImageView *depthImageView) |
| Create a depth image and a view to be used as depth map. More... | |
| VkResult | vhBufCreateImage (VmaAllocator allocator, uint32_t width, uint32_t height, uint32_t miplevels, uint32_t arrayLayers, VkFormat format, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImage *image, VmaAllocation *allocation) |
| Create a Vulkan image using VMA. More... | |
| bool | hasStencilComponent (VkFormat format) |
| VkResult | vhBufCopyBufferToImage (VkDevice device, VkQueue graphicsQueue, VkCommandPool commandPool, VkBuffer buffer, VkImage image, uint32_t layerCount, uint32_t width, uint32_t height) |
| Copy a buffer to an image (for uploading via a staging buffer) More... | |
| VkResult | vhBufCopyBufferToImage (VkDevice device, VkQueue graphicsQueue, VkCommandPool commandPool, VkBuffer buffer, VkImage image, std::vector< VkBufferImageCopy > ®ions, uint32_t width, uint32_t height) |
| Wrapper for copying a buffer to an image, manages queue submission. More... | |
| VkResult | vhBufCopyImageToBuffer (VkDevice device, VkQueue graphicsQueue, VkCommandPool commandPool, VkImage image, VkImageAspectFlagBits aspect, VkBuffer buffer, uint32_t layerCount, uint32_t width, uint32_t height) |
| Copy a VKImage to a VKBuffer. More... | |
| VkResult | vhBufCopyImageToBuffer (VkDevice device, VkQueue graphicsQueue, VkCommandPool commandPool, VkImage image, VkBuffer buffer, std::vector< VkBufferImageCopy > ®ions, uint32_t width, uint32_t height) |
| Copy a VKImage to a VKBuffer. More... | |
| VkResult | vhBufTransitionImageLayout (VkDevice device, VkQueue graphicsQueue, VkCommandPool commandPool, VkImage image, VkFormat format, VkImageAspectFlagBits aspect, uint32_t miplevels, uint32_t layerCount, VkImageLayout oldLayout, VkImageLayout newLayout) |
| Transition the image layout, causes a pipeline barrier. More... | |
| VkResult | vhBufTransitionImageLayout (VkDevice device, VkQueue graphicsQueue, VkCommandBuffer commandBuffer, VkImage image, VkFormat format, VkImageAspectFlagBits aspect, uint32_t miplevels, uint32_t layerCount, VkImageLayout oldLayout, VkImageLayout newLayout) |
| Transition the image layout, causes a pipeline barrier. More... | |
| VkResult | vhBufCreateTextureImage (VkDevice device, VmaAllocator allocator, VkQueue graphicsQueue, VkCommandPool commandPool, std::string basedir, std::vector< std::string > texNames, VkImageCreateFlags flags, VkImage *textureImage, VmaAllocation *textureImageAllocation, VkExtent2D *extent) |
| Create a texture image from multiple files. More... | |
| VkResult | vhBufCreateTexturecubeImage (VkDevice device, VmaAllocator allocator, VkQueue graphicsQueue, VkCommandPool commandPool, gli::texture_cube &texCube, VkImage *textureImage, VmaAllocation *textureImageAllocation, VkFormat *pFormat) |
| Create an image that is also a cubemap. More... | |
| VkResult | vhBufCreateTextureSampler (VkDevice device, VkSampler *textureSampler) |
| Create an image sampler for samplign textures in shaders. More... | |
| VkResult | vhBufCreateFramebuffers (VkDevice device, std::vector< VkImageView > imageViews, std::vector< VkImageView > depthImageViews, VkRenderPass renderPass, VkExtent2D extent, std::vector< VkFramebuffer > &frameBuffers) |
| Create framebuffers (color + depth), one for each swap chain image. More... | |
| VkResult | vhBufCopySwapChainImageToHost (VkDevice device, VmaAllocator allocator, VkQueue graphicsQueue, VkCommandPool commandPool, VkImage image, VkFormat format, VkImageAspectFlagBits aspect, VkImageLayout layout, gli::byte *bufferData, uint32_t width, uint32_t height, uint32_t imageSize) |
| Copy a swap chain image to a data buffer, after it has been rendered into. More... | |
| VkResult | vhBufCopyImageToHost (VkDevice device, VmaAllocator allocator, VkQueue graphicsQueue, VkCommandPool commandPool, VkImage image, VkFormat format, VkImageAspectFlagBits aspect, VkImageLayout layout, gli::byte *bufferData, uint32_t width, uint32_t height, uint32_t imageSize) |
| Copy a swap chain image to a data buffer, after it has been rendered into. More... | |
| VkResult | vhBufCreateVertexBuffer (VkDevice device, VmaAllocator allocator, VkQueue graphicsQueue, VkCommandPool commandPool, std::vector< vh::vhVertex > &vertices, VkBuffer *vertexBuffer, VmaAllocation *vertexBufferAllocation) |
| Create a Vulkan vertex buffer. More... | |
| VkResult | vhBufCreateIndexBuffer (VkDevice device, VmaAllocator allocator, VkQueue graphicsQueue, VkCommandPool commandPool, std::vector< uint32_t > &indices, VkBuffer *indexBuffer, VmaAllocation *indexBufferAllocation) |
| Create a Vulkan index buffer. More... | |
| VkResult | vhBufCreateUniformBuffers (VmaAllocator allocator, uint32_t numberBuffers, VkDeviceSize bufferSize, std::vector< VkBuffer > &uniformBuffers, std::vector< VmaAllocation > &uniformBuffersAllocation) |
| Create a UBO. More... | |
| VkResult | vhCmdCreateCommandPool (VkPhysicalDevice physicalDevice, VkDevice device, VkSurfaceKHR surface, VkCommandPool *commandPool) |
| Create a new command pool. More... | |
| VkResult | vhCmdCreateCommandBuffers (VkDevice device, VkCommandPool commandPool, VkCommandBufferLevel level, uint32_t count, VkCommandBuffer *pBuffers) |
| Create a number of command buffers. More... | |
| VkResult | vhCmdBeginCommandBuffer (VkDevice device, VkRenderPass renderPass, uint32_t subpass, VkFramebuffer frameBuffer, VkCommandBuffer commandBuffer, VkCommandBufferUsageFlagBits usageFlags) |
| Start a command buffer for recording commands. More... | |
| VkResult | vhCmdBeginCommandBuffer (VkDevice device, VkCommandBuffer commandBuffer, VkCommandBufferUsageFlagBits usageFlags) |
| Start a command buffer for recording commands. More... | |
| VkResult | vhCmdSubmitCommandBuffer (VkDevice device, VkQueue queue, VkCommandBuffer commandBuffer, VkSemaphore waitSemaphore, VkSemaphore signalSemaphore, VkFence waitFence) |
| Submit a command buffer to a queue. More... | |
| VkCommandBuffer | vhCmdBeginSingleTimeCommands (VkDevice device, VkCommandPool commandPool) |
| Begin submitting a single time command. More... | |
| VkResult | vhCmdEndSingleTimeCommands (VkDevice device, VkQueue graphicsQueue, VkCommandPool commandPool, VkCommandBuffer commandBuffer) |
| End recording into a single time command buffer and submit it. More... | |
| VkResult | vhCmdEndSingleTimeCommands (VkDevice device, VkQueue graphicsQueue, VkCommandPool commandPool, VkCommandBuffer commandBuffer, VkSemaphore waitSemaphore, VkSemaphore signalSemaphore, VkFence waitFence) |
| End recording into a single time command buffer and submit it. More... | |
| VKAPI_ATTR VkBool32 VKAPI_CALL | vhDebugCallback (VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objType, uint64_t obj, size_t location, int32_t code, const char *layerPrefix, const char *msg, void *userData) |
| Debug callback. | |
| VkResult | vhDebugCreateReportCallbackEXT (VkInstance instance, const VkDebugReportCallbackCreateInfoEXT *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDebugReportCallbackEXT *pCallback) |
| Get debug callback function handle. | |
| void | vhDebugDestroyReportCallbackEXT (VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks *pAllocator) |
| Remove debug callback. | |
| void | vhSetupDebugCallback (VkInstance instance, VkDebugReportCallbackEXT *callback) |
| Register debug callback. | |
| bool | checkValidationLayerSupport (std::vector< const char * > &validationLayers) |
| Check validation layers of the Vulkan instance. More... | |
| VkResult | vhDevCreateInstance (std::vector< const char * > &extensions, std::vector< const char * > &validationLayers, VkInstance *instance) |
| Create a Vulkan instance. More... | |
| QueueFamilyIndices | vhDevFindQueueFamilies (VkPhysicalDevice device, VkSurfaceKHR surface) |
| Find suitable queue families of a given physical device. More... | |
| bool | checkDeviceExtensionSupport (VkPhysicalDevice device, std::vector< const char * > requiredDeviceExtensions) |
| Check whether a given physical device offers a list of required extensions. More... | |
| SwapChainSupportDetails | vhDevQuerySwapChainSupport (VkPhysicalDevice device, VkSurfaceKHR surface) |
| Query which swap chains a physical device supports. More... | |
| bool | isDeviceSuitable (VkPhysicalDevice device, VkSurfaceKHR surface, std::vector< const char * > requiredDeviceExtensions) |
| Query whether a physical offers all required extensions. More... | |
| VkResult | vhDevPickPhysicalDevice (VkInstance instance, VkSurfaceKHR surface, std::vector< const char * > requiredDeviceExtensions, VkPhysicalDevice *physicalDevice, VkPhysicalDeviceFeatures *pFeatures, VkPhysicalDeviceLimits *limits) |
| Query whether a physical offers all required extensions. More... | |
| VkFormat | vhDevFindSupportedFormat (VkPhysicalDevice physicalDevice, const std::vector< VkFormat > &candidates, VkImageTiling tiling, VkFormatFeatureFlags features) |
| Query a suitable image format that the device supports. More... | |
| VkFormat | vhDevFindDepthFormat (VkPhysicalDevice physicalDevice) |
| Find a suitable format for the depth/stencil buffer. More... | |
| VkResult | vhDevCreateLogicalDevice (VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, std::vector< const char * > requiredDeviceExtensions, std::vector< const char * > requiredValidationLayers, VkDevice *device, VkQueue *graphicsQueue, VkQueue *presentQueue) |
| Create a logical device and according queues. More... | |
| std::vector< char > | vhFileRead (const std::string &filename) |
| Read the contents of a file and return a binary blob with it. More... | |
| std::chrono::high_resolution_clock::time_point | vhTimeNow () |
| Take a time measurment from the high resolution clock. More... | |
| float | vhTimeDuration (std::chrono::high_resolution_clock::time_point t_prev) |
| Use the high resolution clock to calculate a time duration since the last time measurement. More... | |
| float | vhAverage (float new_val, float average, float weight) |
| Apply expoentatial smoothing to given values. More... | |
| VkResult | vhSwapCreateSwapChain (VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkDevice device, VkExtent2D frameBufferExtent, VkSwapchainKHR *swapChain, std::vector< VkImage > &swapChainImages, std::vector< VkImageView > &swapChainImageViews, VkFormat *swapChainImageFormat, VkExtent2D *swapChainExtent) |
| Choose the swapchain. More... | |
| VkResult | vhRenderCreateRenderPass (VkDevice device, VkFormat swapChainImageFormat, VkFormat depthFormat, VkAttachmentLoadOp loadOp, VkRenderPass *renderPass) |
| Create a render pass for a light pass. More... | |
| VkResult | vhRenderCreateRenderPassShadow (VkDevice device, VkFormat depthFormat, VkRenderPass *renderPass) |
| Create a render pass for a shadow pass. More... | |
| VkResult | vhRenderCreateDescriptorSetLayout (VkDevice device, std::vector< uint32_t > counts, std::vector< VkDescriptorType > types, std::vector< VkShaderStageFlags > stageFlags, VkDescriptorSetLayout *descriptorSetLayout) |
| Create a descriptor layout. More... | |
| VkResult | vhRenderCreateDescriptorPool (VkDevice device, std::vector< VkDescriptorType > types, std::vector< uint32_t > numberDesc, VkDescriptorPool *descriptorPool) |
| Create a descriptor pool. More... | |
| VkResult | vhRenderCreateDescriptorSets (VkDevice device, uint32_t numberDesc, VkDescriptorSetLayout descriptorSetLayout, VkDescriptorPool descriptorPool, std::vector< VkDescriptorSet > &descriptorSets) |
| Create a number of descriptor sets, one for each frame in the swapchain. More... | |
| VkResult | vhRenderUpdateDescriptorSet (VkDevice device, VkDescriptorSet descriptorSet, std::vector< VkBuffer > uniformBuffers, std::vector< uint32_t > bufferRanges, std::vector< std::vector< VkImageView >> textureImageViews, std::vector< std::vector< VkSampler >> textureSamplers) |
| Update a descriptor set. More... | |
| VkResult | vhRenderUpdateDescriptorSet (VkDevice device, VkDescriptorSet descriptorSet, std::vector< VkDescriptorType > descriptorTypes, std::vector< VkBuffer > uniformBuffers, std::vector< uint32_t > bufferRanges, std::vector< std::vector< VkImageView >> textureImageViews, std::vector< std::vector< VkSampler >> textureSamplers) |
| Update a descriptor set. More... | |
| VkResult | vhRenderUpdateDescriptorSetMaps (VkDevice device, VkDescriptorSet descriptorSet, uint32_t binding, uint32_t offset, uint32_t descriptorCount, std::vector< std::vector< VkDescriptorImageInfo >> &maps) |
| Update a descriptor set being composed of arrays of textures. More... | |
| VkResult | vhRenderBeginRenderPass (VkCommandBuffer commandBuffer, VkRenderPass renderPass, VkFramebuffer frameBuffer, VkExtent2D extent, VkSubpassContents subPassContents) |
| Start rendering in a command buffer. More... | |
| VkResult | vhRenderBeginRenderPass (VkCommandBuffer commandBuffer, VkRenderPass renderPass, VkFramebuffer frameBuffer, std::vector< VkClearValue > &clearValues, VkExtent2D extent, VkSubpassContents subPassContents) |
| Start rendering in a command buffer. More... | |
| VkResult | vhRenderPresentResult (VkQueue presentQueue, VkSwapchainKHR swapChain, uint32_t imageIndex, VkSemaphore signalSemaphore) |
| Present the result of a render operation to a window. More... | |
| VkResult | vhPipeCreateGraphicsPipelineLayout (VkDevice device, std::vector< VkDescriptorSetLayout > descriptorSetLayouts, std::vector< VkPushConstantRange > pushConstantRanges, VkPipelineLayout *pipelineLayout) |
| Create a pipeline layout for drawing a light pass. More... | |
| VkResult | vhPipeCreateGraphicsPipeline (VkDevice device, std::vector< std::string > shaderFileNames, VkExtent2D swapChainExtent, VkPipelineLayout pipelineLayout, VkRenderPass renderPass, std::vector< VkDynamicState > dynamicStates, VkPipeline *graphicsPipeline) |
| Create a pipeline state object (PSO) for a light pass. More... | |
| VkResult | vhPipeCreateGraphicsShadowPipeline (VkDevice device, std::string verShaderFilename, VkExtent2D shadowMapExtent, VkPipelineLayout pipelineLayout, VkRenderPass renderPass, VkPipeline *graphicsPipeline) |
| Create a pipeline state object (PSO) for a shadow pass. More... | |
| uint32_t | vhMemFindMemoryType (VkPhysicalDevice physicalDevice, uint32_t typeFilter, VkMemoryPropertyFlags properties) |
| Find the right memory type. More... | |
| VkResult | vhMemCreateVMAAllocator (VkPhysicalDevice physicalDevice, VkDevice device, VmaAllocator &allocator) |
| Initialize the VMA allocator library. More... | |
| VkResult | vhMemBlockListInit (VkDevice device, VmaAllocator allocator, VkDescriptorPool descriptorPool, VkDescriptorSetLayout descriptorLayout, uint32_t maxNumEntries, uint32_t sizeEntry, uint32_t numBuffers, std::vector< vhMemoryBlock * > &blocklist) |
| Initialize a list of memory blocks. More... | |
| VkResult | vhMemBlockInit (VkDevice device, VmaAllocator allocator, VkDescriptorPool descriptorPool, VkDescriptorSetLayout descriptorLayout, uint32_t maxNumEntries, uint32_t sizeEntry, uint32_t numBuffers, vhMemoryBlock *pBlock) |
| Initialize a single memory block. More... | |
| VkResult | vhMemBlockListAdd (std::vector< vhMemoryBlock * > &blocklist, void *owner, vhMemoryHandle *handle) |
| Add an entry to a memory block list. More... | |
| VkResult | vhMemBlockAdd (vhMemoryBlock *pBlock, void *owner, vhMemoryHandle *handle) |
| Add an entry to a memory block (not a block list) More... | |
| VkResult | vhMemBlockUpdateEntry (vhMemoryHandle *pHandle, void *data) |
| Update an entry in one of the memory blocks. More... | |
| VkResult | vhMemBlockUpdateBlockList (std::vector< vhMemoryBlock * > &blocklist, uint32_t index) |
| Update all memory blocks by copying them to the GPU. More... | |
| VkResult | vhMemBlockRemoveEntry (vhMemoryHandle *pHandle) |
| Remove an entry from a memory block. More... | |
| VkResult | vhMemBlockListClear (std::vector< vhMemoryBlock * > &blocklist) |
| Delete all entries and all blocks from a block list. More... | |
| VkResult | vhMemBlockDeallocate (vhMemoryBlock *pBlock) |
| Deallocate the memory from a block. More... | |
| VkResult | vhMemBlockMoveEntry (std::vector< vhMemoryBlock * > &dstblocklist, vhMemoryHandle *pHandle) |
| Move a handle from one list to another list. More... | |
| VkShaderModule | vhPipeCreateShaderModule (VkDevice device, const std::vector< char > &code) |
| Create a shader module. More... | |
| VkSurfaceFormatKHR | chooseSwapSurfaceFormat (const std::vector< VkSurfaceFormatKHR > &availableFormats) |
| Choose swapchain format - try to use VK_FORMAT_B8G8R8A8_UNORM. More... | |
| VkPresentModeKHR | chooseSwapPresentMode (const std::vector< VkPresentModeKHR > availablePresentModes) |
| Choose the swapchain present mode - try to use Mailbox. More... | |
| VkExtent2D | chooseSwapExtent (const VkSurfaceCapabilitiesKHR &capabilities, VkExtent2D extent) |
| Choose the 2D extent of the swapchain. More... | |
The Vienna Vulkan Engine
(c) bei Helmut Hlavacs, University of Vienna
| bool vh::checkDeviceExtensionSupport | ( | VkPhysicalDevice | device, |
| std::vector< const char * > | requiredDeviceExtensions | ||
| ) |
Check whether a given physical device offers a list of required extensions.
| [in] | device | A physical device |
| [in] | requiredDeviceExtensions | A list with required device extensions |
| bool vh::checkValidationLayerSupport | ( | std::vector< const char * > & | validationLayers | ) |
Check validation layers of the Vulkan instance.
| [in] | validationLayers |
| VkExtent2D vh::chooseSwapExtent | ( | const VkSurfaceCapabilitiesKHR & | capabilities, |
| VkExtent2D | extent | ||
| ) |
Choose the 2D extent of the swapchain.
| [in] | capabilities | Capabilities of the window surface |
| [in] | extent | Extent of the window |
| VkPresentModeKHR vh::chooseSwapPresentMode | ( | const std::vector< VkPresentModeKHR > | availablePresentModes | ) |
Choose the swapchain present mode - try to use Mailbox.
| [in] | availablePresentModes | A list of available swap chain present modes |
| VkSurfaceFormatKHR vh::chooseSwapSurfaceFormat | ( | const std::vector< VkSurfaceFormatKHR > & | availableFormats | ) |
Choose swapchain format - try to use VK_FORMAT_B8G8R8A8_UNORM.
| [in] | availableFormats | A list of available swap chain formats |
| bool vh::hasStencilComponent | ( | VkFormat | format | ) |
| bool vh::isDeviceSuitable | ( | VkPhysicalDevice | device, |
| VkSurfaceKHR | surface, | ||
| std::vector< const char * > | requiredDeviceExtensions | ||
| ) |
Query whether a physical offers all required extensions.
| [in] | device | A physical device |
| [in] | surface | A window surface |
| [in] | requiredDeviceExtensions | A list of required device extensions |
| float vh::vhAverage | ( | float | new_val, |
| float | average, | ||
| float | weight | ||
| ) |
Apply expoentatial smoothing to given values.
| [in] | new_val | The newest value that was measured |
| [in] | average | The average so far |
| [in] | weight | An averaging weight between 0 and 1 |
| VkResult vh::vhBufCopyBuffer | ( | VkDevice | device, |
| VkQueue | graphicsQueue, | ||
| VkCommandPool | commandPool, | ||
| VkBuffer | srcBuffer, | ||
| VkBuffer | dstBuffer, | ||
| VkDeviceSize | size | ||
| ) |
Copy a buffer from a source buffer to a destination buffer.
| [in] | device | Logical Vulkan device |
| [in] | graphicsQueue | Device queue for submitting commands |
| [in] | commandPool | Command pool for allocating command bbuffers |
| [in] | srcBuffer | Source buffer |
| [in] | dstBuffer | Destination buffer |
| [in] | size | Size in bytes of the data to be copied |
| VkResult vh::vhBufCopyBufferToImage | ( | VkDevice | device, |
| VkQueue | graphicsQueue, | ||
| VkCommandPool | commandPool, | ||
| VkBuffer | buffer, | ||
| VkImage | image, | ||
| uint32_t | layerCount, | ||
| uint32_t | width, | ||
| uint32_t | height | ||
| ) |
Copy a buffer to an image (for uploading via a staging buffer)
| [in] | device | Logical Vulkan device |
| [in] | graphicsQueue | Device queue for submitting commands |
| [in] | commandPool | Command pool for allocating command buffers |
| [in] | buffer | The source buffer |
| [in] | image | The destination image |
| [in] | layerCount | Number of layers in the image |
| [in] | width | Image width |
| [in] | height | Image height |
| VkResult vh::vhBufCopyBufferToImage | ( | VkDevice | device, |
| VkQueue | graphicsQueue, | ||
| VkCommandPool | commandPool, | ||
| VkBuffer | buffer, | ||
| VkImage | image, | ||
| std::vector< VkBufferImageCopy > & | regions, | ||
| uint32_t | width, | ||
| uint32_t | height | ||
| ) |
Wrapper for copying a buffer to an image, manages queue submission.
| [in] | device | Logical Vulkan device |
| [in] | graphicsQueue | Device queue for submitting commands |
| [in] | commandPool | Command pool for allocating command buffers |
| [in] | buffer | The source buffer |
| [in] | image | The destination image |
| [in] | regions | The regions to be copied |
| [in] | width | Width of the image |
| [in] | height | Height of the image |
| VkResult vh::vhBufCopyImageToBuffer | ( | VkDevice | device, |
| VkQueue | graphicsQueue, | ||
| VkCommandPool | commandPool, | ||
| VkImage | image, | ||
| VkImageAspectFlagBits | aspect, | ||
| VkBuffer | buffer, | ||
| uint32_t | layerCount, | ||
| uint32_t | width, | ||
| uint32_t | height | ||
| ) |
Copy a VKImage to a VKBuffer.
| [in] | device | Logical Vulkan device |
| [in] | graphicsQueue | Device queue for submitting commands |
| [in] | commandPool | Command pool for allocating command buffers |
| [in] | image | The source image |
| [in] | aspect | Aspect on how to use the image (color or depth) |
| [in] | buffer | The destination buffer |
| [in] | layerCount | Number of image layers |
| [in] | width | Ímage width |
| [in] | height | Image height |
| VkResult vh::vhBufCopyImageToBuffer | ( | VkDevice | device, |
| VkQueue | graphicsQueue, | ||
| VkCommandPool | commandPool, | ||
| VkImage | image, | ||
| VkBuffer | buffer, | ||
| std::vector< VkBufferImageCopy > & | regions, | ||
| uint32_t | width, | ||
| uint32_t | height | ||
| ) |
Copy a VKImage to a VKBuffer.
| [in] | device | Logical Vulkan device |
| [in] | graphicsQueue | Device queue for submitting commands |
| [in] | commandPool | Command pool for allocating command buffers |
| [in] | image | The source image |
| [in] | buffer | The destination buffer |
| [in] | regions | Copy regions detailing the image parts that should be copied |
| [in] | width | Ímage width |
| [in] | height | Image height |
| VkResult vh::vhBufCopyImageToHost | ( | VkDevice | device, |
| VmaAllocator | allocator, | ||
| VkQueue | graphicsQueue, | ||
| VkCommandPool | commandPool, | ||
| VkImage | image, | ||
| VkFormat | format, | ||
| VkImageAspectFlagBits | aspect, | ||
| VkImageLayout | layout, | ||
| gli::byte * | bufferData, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| uint32_t | imageSize | ||
| ) |
Copy a swap chain image to a data buffer, after it has been rendered into.
| [in] | device | Logical Vulkan device |
| [in] | allocator | VMA allocator |
| [in] | graphicsQueue | Device queue for submitting commands |
| [in] | commandPool | Command pool for allocating command buffers |
| [in] | image | The source image |
| [in] | format | Format of the image |
| [in] | aspect | Color or depth |
| [in] | layout | The layout the image is currently in |
| [in] | bufferData | The destination buffer data |
| [in] | width | Ímage width |
| [in] | height | Image height |
| [in] | imageSize | Size of the image in bytes |
| VkResult vh::vhBufCopySwapChainImageToHost | ( | VkDevice | device, |
| VmaAllocator | allocator, | ||
| VkQueue | graphicsQueue, | ||
| VkCommandPool | commandPool, | ||
| VkImage | image, | ||
| VkFormat | format, | ||
| VkImageAspectFlagBits | aspect, | ||
| VkImageLayout | layout, | ||
| gli::byte * | bufferData, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| uint32_t | imageSize | ||
| ) |
Copy a swap chain image to a data buffer, after it has been rendered into.
| [in] | device | Logical Vulkan device |
| [in] | allocator | VMA allocator |
| [in] | graphicsQueue | Device queue for submitting commands |
| [in] | commandPool | Command pool for allocating command buffers |
| [in] | image | The source image |
| [in] | format | The pixel format of this image |
| [in] | aspect | Color or depth |
| [in] | layout | The layout that this image is currently and should be again after the copy |
| [in] | bufferData | The destination buffer data |
| [in] | width | Ímage width |
| [in] | height | Image height |
| [in] | imageSize | Size of the image in bytes |
| VkResult vh::vhBufCreateBuffer | ( | VmaAllocator | allocator, |
| VkDeviceSize | size, | ||
| VkBufferUsageFlags | usage, | ||
| VmaMemoryUsage | vmaUsage, | ||
| VkBuffer * | buffer, | ||
| VmaAllocation * | allocation | ||
| ) |
Create a Vulkan buffer.
| [in] | allocator | VMA allocator |
| [in] | size | Size of the buffer in bytes |
| [in] | usage | Buffer usage flags |
| [in] | vmaUsage | Usage for VMA |
| [out] | buffer | The created buffer |
| [out] | allocation | The VMA allocation |
| VkResult vh::vhBufCreateDepthResources | ( | VkDevice | device, |
| VmaAllocator | allocator, | ||
| VkQueue | graphicsQueue, | ||
| VkCommandPool | commandPool, | ||
| VkExtent2D | extent, | ||
| VkFormat | depthFormat, | ||
| VkImage * | depthImage, | ||
| VmaAllocation * | depthImageAllocation, | ||
| VkImageView * | depthImageView | ||
| ) |
Create a depth image and a view to be used as depth map.
| [in] | device | Logical Vulkan device |
| [in] | allocator | VMA allocator |
| [in] | graphicsQueue | Device queue for submitting commands |
| [in] | commandPool | Command pool for allocating command bbuffers |
| [in] | extent | Extent of the swap chain images |
| [out] | depthFormat | Depth image format to be used for depth map |
| [out] | depthImage | Depth image to be used as depth map |
| [out] | depthImageAllocation | VMA allocation info |
| [out] | depthImageView | View of the depth image |
| VkResult vh::vhBufCreateFramebuffers | ( | VkDevice | device, |
| std::vector< VkImageView > | imageViews, | ||
| std::vector< VkImageView > | depthImageViews, | ||
| VkRenderPass | renderPass, | ||
| VkExtent2D | extent, | ||
| std::vector< VkFramebuffer > & | frameBuffers | ||
| ) |
Create framebuffers (color + depth), one for each swap chain image.
| [in] | device | Logical Vulkan device |
| [in] | imageViews | Color images from the swap chain |
| [in] | depthImageViews | List with views of the depth images |
| [in] | renderPass | Render pass to be used in |
| [in] | extent | Extent of the swap chain images |
| [out] | frameBuffers | The resulting frame buffers |
| VkResult vh::vhBufCreateImage | ( | VmaAllocator | allocator, |
| uint32_t | width, | ||
| uint32_t | height, | ||
| uint32_t | miplevels, | ||
| uint32_t | arrayLayers, | ||
| VkFormat | format, | ||
| VkImageTiling | tiling, | ||
| VkImageUsageFlags | usage, | ||
| VkImageCreateFlags | flags, | ||
| VkImage * | image, | ||
| VmaAllocation * | allocation | ||
| ) |
Create a Vulkan image using VMA.
| [in] | allocator | Th VMA allocator |
| [in] | width | Width of the image to be created |
| [in] | height | Height of the image to be created |
| [in] | miplevels | Number of miplevels |
| [in] | arrayLayers | Number of image layers |
| [in] | format | Image format |
| [in] | tiling | Ho to layout the image |
| [in] | usage | Usage flags |
| [in] | flags | Create flags |
| [out] | image | The new image |
| [out] | allocation | VMA allocation information |
| VkResult vh::vhBufCreateImageView | ( | VkDevice | device, |
| VkImage | image, | ||
| VkFormat | format, | ||
| VkImageViewType | viewtype, | ||
| uint32_t | layerCount, | ||
| VkImageAspectFlags | aspectFlags, | ||
| VkImageView * | imageView | ||
| ) |
Create a view for a Vulkan image.
| [in] | device | Logical Vulkan device |
| [in] | image | The image for which the view is created |
| [in] | format | Format of the image |
| [in] | viewtype | Vulkan image view type |
| [in] | layerCount | Number of image layers |
| [in] | aspectFlags | Flags for how to use the view |
| [out] | imageView | The created image view |
| VkResult vh::vhBufCreateIndexBuffer | ( | VkDevice | device, |
| VmaAllocator | allocator, | ||
| VkQueue | graphicsQueue, | ||
| VkCommandPool | commandPool, | ||
| std::vector< uint32_t > & | indices, | ||
| VkBuffer * | indexBuffer, | ||
| VmaAllocation * | indexBufferAllocation | ||
| ) |
Create a Vulkan index buffer.
| [in] | device | Logical Vulkan device |
| [in] | allocator | VMA allocator |
| [in] | graphicsQueue | Device queue for submitting commands |
| [in] | commandPool | Command pool for allocating command bbuffers |
| [in] | indices | List of indices |
| [out] | indexBuffer | The new index buffer |
| [out] | indexBufferAllocation | VMA allocation information |
| VkResult vh::vhBufCreateTexturecubeImage | ( | VkDevice | device, |
| VmaAllocator | allocator, | ||
| VkQueue | graphicsQueue, | ||
| VkCommandPool | commandPool, | ||
| gli::texture_cube & | texCube, | ||
| VkImage * | textureImage, | ||
| VmaAllocation * | textureImageAllocation, | ||
| VkFormat * | pFormat | ||
| ) |
Create an image that is also a cubemap.
| [in] | device | Logical Vulkan device |
| [in] | allocator | VMA allocator |
| [in] | graphicsQueue | Device queue for submitting commands |
| [in] | commandPool | Command pool for allocating command bbuffers |
| [in] | texCube | The GLI cubemap information |
| [out] | textureImage | The new image |
| [out] | textureImageAllocation | VMA allocation information |
| [out] | pFormat | The image format (fixed) |
| VkResult vh::vhBufCreateTextureImage | ( | VkDevice | device, |
| VmaAllocator | allocator, | ||
| VkQueue | graphicsQueue, | ||
| VkCommandPool | commandPool, | ||
| std::string | basedir, | ||
| std::vector< std::string > | texNames, | ||
| VkImageCreateFlags | flags, | ||
| VkImage * | textureImage, | ||
| VmaAllocation * | textureImageAllocation, | ||
| VkExtent2D * | extent | ||
| ) |
Create a texture image from multiple files.
| [in] | device | Logical Vulkan device |
| [in] | allocator | The VMA allocator |
| [in] | graphicsQueue | Device queue for submitting commands |
| [in] | commandPool | Command pool for allocating command buffers |
| [in] | basedir | Directoy the files are in |
| [in] | texNames | List of file names holding the textures (should have same resolution) |
| [in] | flags | Image create flags |
| [out] | textureImage | The new image |
| [out] | textureImageAllocation | The VMA allocation info |
| [out] | extent | The extent of the loaded image |
| VkResult vh::vhBufCreateTextureSampler | ( | VkDevice | device, |
| VkSampler * | textureSampler | ||
| ) |
Create an image sampler for samplign textures in shaders.
| [in] | device | Logical Vulkan device |
| [out] | textureSampler | The new sampler |
| VkResult vh::vhBufCreateUniformBuffers | ( | VmaAllocator | allocator, |
| uint32_t | numberBuffers, | ||
| VkDeviceSize | bufferSize, | ||
| std::vector< VkBuffer > & | uniformBuffers, | ||
| std::vector< VmaAllocation > & | uniformBuffersAllocation | ||
| ) |
Create a UBO.
| [in] | allocator | VMA allocator |
| [in] | numberBuffers | The number of UBOs to be created |
| [in] | bufferSize | Size of each new buffer |
| [out] | uniformBuffers | List containing the new buffers |
| [out] | uniformBuffersAllocation | VMA allocation information |
| VkResult vh::vhBufCreateVertexBuffer | ( | VkDevice | device, |
| VmaAllocator | allocator, | ||
| VkQueue | graphicsQueue, | ||
| VkCommandPool | commandPool, | ||
| std::vector< vh::vhVertex > & | vertices, | ||
| VkBuffer * | vertexBuffer, | ||
| VmaAllocation * | vertexBufferAllocation | ||
| ) |
Create a Vulkan vertex buffer.
| [in] | device | Logical Vulkan device |
| [in] | allocator | VMA allocator |
| [in] | graphicsQueue | Device queue for submitting commands |
| [in] | commandPool | Command pool for allocating command bbuffers |
| [in] | vertices | List of vertices and their data |
| [out] | vertexBuffer | The new vertex buffer |
| [out] | vertexBufferAllocation | VMA allocation information |
| VkResult vh::vhBufTransitionImageLayout | ( | VkDevice | device, |
| VkQueue | graphicsQueue, | ||
| VkCommandPool | commandPool, | ||
| VkImage | image, | ||
| VkFormat | format, | ||
| VkImageAspectFlagBits | aspect, | ||
| uint32_t | miplevels, | ||
| uint32_t | layerCount, | ||
| VkImageLayout | oldLayout, | ||
| VkImageLayout | newLayout | ||
| ) |
Transition the image layout, causes a pipeline barrier.
| [in] | device | Logical Vulkan device |
| [in] | graphicsQueue | Device queue for submitting commands |
| [in] | commandPool | Command pool for allocating command buffers |
| [in] | image | The destination image |
| [in] | format | The Image format |
| [in] | aspect | Color or depth |
| [in] | miplevels | Number of image miplevels |
| [in] | layerCount | Number of image layers |
| [in] | oldLayout | Old layout of the image |
| [in] | newLayout | The layout should be transitioned to this new layout |
| VkResult vh::vhBufTransitionImageLayout | ( | VkDevice | device, |
| VkQueue | graphicsQueue, | ||
| VkCommandBuffer | commandBuffer, | ||
| VkImage | image, | ||
| VkFormat | format, | ||
| VkImageAspectFlagBits | aspect, | ||
| uint32_t | miplevels, | ||
| uint32_t | layerCount, | ||
| VkImageLayout | oldLayout, | ||
| VkImageLayout | newLayout | ||
| ) |
Transition the image layout, causes a pipeline barrier.
| [in] | device | Logical Vulkan device |
| [in] | graphicsQueue | Device queue for submitting commands |
| [in] | commandBuffer | Command buffer to record this operation into |
| [in] | image | The destination image |
| [in] | format | The Image format |
| [in] | aspect | Color or depth |
| [in] | miplevels | Number of image miplevels |
| [in] | layerCount | Number of image layers |
| [in] | oldLayout | Old layout of the image |
| [in] | newLayout | The layout should be transitioned to this new layout |
| VkResult vh::vhCmdBeginCommandBuffer | ( | VkDevice | device, |
| VkRenderPass | renderPass, | ||
| uint32_t | subpass, | ||
| VkFramebuffer | frameBuffer, | ||
| VkCommandBuffer | commandBuffer, | ||
| VkCommandBufferUsageFlagBits | usageFlags | ||
| ) |
Start a command buffer for recording commands.
| [in] | device | Logical Vulkan device |
| [in] | renderPass | The render pass that is inherited from the parent command buffer |
| [in] | subpass | Index of subpass |
| [in] | frameBuffer | The framebuffer that is rendered into |
| [in] | commandBuffer | The command buffer to start |
| [in] | usageFlags | Flags telling how the buffer will be used |
| VkResult vh::vhCmdBeginCommandBuffer | ( | VkDevice | device, |
| VkCommandBuffer | commandBuffer, | ||
| VkCommandBufferUsageFlagBits | usageFlags | ||
| ) |
Start a command buffer for recording commands.
| [in] | device | Logical Vulkan device |
| [in] | commandBuffer | The command buffer to start |
| [in] | usageFlags | Flags telling how the buffer will be used |
| VkCommandBuffer vh::vhCmdBeginSingleTimeCommands | ( | VkDevice | device, |
| VkCommandPool | commandPool | ||
| ) |
Begin submitting a single time command.
| [in] | device | Logical Vulkan device |
| [in] | commandPool | Command pool for allocating command bbuffers |
| VkResult vh::vhCmdCreateCommandBuffers | ( | VkDevice | device, |
| VkCommandPool | commandPool, | ||
| VkCommandBufferLevel | level, | ||
| uint32_t | count, | ||
| VkCommandBuffer * | pBuffers | ||
| ) |
Create a number of command buffers.
| [in] | device | Logical Vulkan device |
| [in] | commandPool | Command pool for allocating command bbuffers |
| [in] | level | Level can be primary or secondary |
| [in] | count | Number of buffers to create |
| [in] | pBuffers | Pointer to an array where the buffer handles should be stored |
| VkResult vh::vhCmdCreateCommandPool | ( | VkPhysicalDevice | physicalDevice, |
| VkDevice | device, | ||
| VkSurfaceKHR | surface, | ||
| VkCommandPool * | commandPool | ||
| ) |
Create a new command pool.
| [in] | physicalDevice | Physical Vulkan device |
| [in] | device | Logical Vulkan device |
| [in] | surface | Window surface - Needed for finding the right queue families |
| [out] | commandPool | New command pool for allocating command bbuffers |
| VkResult vh::vhCmdEndSingleTimeCommands | ( | VkDevice | device, |
| VkQueue | graphicsQueue, | ||
| VkCommandPool | commandPool, | ||
| VkCommandBuffer | commandBuffer | ||
| ) |
End recording into a single time command buffer and submit it.
| [in] | device | Logical Vulkan device |
| [in] | graphicsQueue | Queue to submit the buffer to |
| [in] | commandPool | Give back the command buffer to the pool |
| [in] | commandBuffer | The ready to be used command buffer |
| VkResult vh::vhCmdEndSingleTimeCommands | ( | VkDevice | device, |
| VkQueue | graphicsQueue, | ||
| VkCommandPool | commandPool, | ||
| VkCommandBuffer | commandBuffer, | ||
| VkSemaphore | waitSemaphore, | ||
| VkSemaphore | signalSemaphore, | ||
| VkFence | waitFence | ||
| ) |
End recording into a single time command buffer and submit it.
| [in] | device | Logical Vulkan device |
| [in] | graphicsQueue | Queue to submit the buffer to |
| [in] | commandPool | Give back the command buffer to the pool |
| [in] | commandBuffer | The ready to be used command buffer |
| [in] | waitSemaphore | A semaphore to wait for before submitting |
| [in] | signalSemaphore | Signal this semaphore after buffer is done |
| [in] | waitFence | Signal to this fence after buffer is done |
| VkResult vh::vhCmdSubmitCommandBuffer | ( | VkDevice | device, |
| VkQueue | queue, | ||
| VkCommandBuffer | commandBuffer, | ||
| VkSemaphore | waitSemaphore, | ||
| VkSemaphore | signalSemaphore, | ||
| VkFence | waitFence | ||
| ) |
Submit a command buffer to a queue.
| [in] | device | Logical Vulkan device |
| [in] | queue | The queue the buffer is sent to |
| [in] | commandBuffer | The command buffer that is sent to the queue |
| [in] | waitSemaphore | A semaphore to wait for before submitting |
| [in] | signalSemaphore | Signal this semaphore after buffer is done |
| [in] | waitFence | Signal to this fence after buffer is done |
| VkResult vh::vhDevCreateInstance | ( | std::vector< const char * > & | extensions, |
| std::vector< const char * > & | validationLayers, | ||
| VkInstance * | instance | ||
| ) |
Create a Vulkan instance.
| [in] | extensions | Requested layers |
| [in] | validationLayers | Requested validation layers |
| [out] | instance | The new instance |
| VkResult vh::vhDevCreateLogicalDevice | ( | VkPhysicalDevice | physicalDevice, |
| VkSurfaceKHR | surface, | ||
| std::vector< const char * > | requiredDeviceExtensions, | ||
| std::vector< const char * > | requiredValidationLayers, | ||
| VkDevice * | device, | ||
| VkQueue * | graphicsQueue, | ||
| VkQueue * | presentQueue | ||
| ) |
Create a logical device and according queues.
| [in] | physicalDevice | The physical device |
| [in] | surface | Window surface |
| [in] | requiredDeviceExtensions | List of required device extensions |
| [in] | requiredValidationLayers | List of required validation layers |
| [out] | device | The new logical device |
| [out] | graphicsQueue | A graphics queue into the device |
| [out] | presentQueue | A present queue into the device |
| VkFormat vh::vhDevFindDepthFormat | ( | VkPhysicalDevice | physicalDevice | ) |
Find a suitable format for the depth/stencil buffer.
| [in] | physicalDevice | The physical device |
| QueueFamilyIndices vh::vhDevFindQueueFamilies | ( | VkPhysicalDevice | device, |
| VkSurfaceKHR | surface | ||
| ) |
Find suitable queue families of a given physical device.
| [in] | device | A physical device |
| [in] | surface | The surface of a window |
| VkFormat vh::vhDevFindSupportedFormat | ( | VkPhysicalDevice | physicalDevice, |
| const std::vector< VkFormat > & | candidates, | ||
| VkImageTiling | tiling, | ||
| VkFormatFeatureFlags | features | ||
| ) |
Query a suitable image format that the device supports.
| [in] | physicalDevice | The physical device |
| [in] | candidates | A list with candidate formats |
| [in] | tiling | Linear or optimal |
| [in] | features | Usage of the format |
| VkResult vh::vhDevPickPhysicalDevice | ( | VkInstance | instance, |
| VkSurfaceKHR | surface, | ||
| std::vector< const char * > | requiredDeviceExtensions, | ||
| VkPhysicalDevice * | physicalDevice, | ||
| VkPhysicalDeviceFeatures * | pFeatures, | ||
| VkPhysicalDeviceLimits * | limits | ||
| ) |
Query whether a physical offers all required extensions.
| [in] | instance | The Vulkan instance |
| [in] | surface | A window surface |
| [in] | requiredDeviceExtensions | A list of required device extensions |
| [out] | physicalDevice | A physical device that supports all required extensions |
| [out] | pFeatures | The features supported by this device |
| [out] | limits | The physical limits of the physical device |
| SwapChainSupportDetails vh::vhDevQuerySwapChainSupport | ( | VkPhysicalDevice | device, |
| VkSurfaceKHR | surface | ||
| ) |
Query which swap chains a physical device supports.
| [in] | device | A physical device |
| [in] | surface | A window surface |
| std::vector< char > vh::vhFileRead | ( | const std::string & | filename | ) |
Read the contents of a file and return a binary blob with it.
| [in] | filename | Filename |
| VkResult vh::vhMemBlockAdd | ( | vhMemoryBlock * | pBlock, |
| void * | owner, | ||
| vhMemoryHandle * | handle | ||
| ) |
Add an entry to a memory block (not a block list)
This function should only be called for single memory blocks that are not part of a block list. If the block gets full, it is reallocated with twice the old capacity.
| [in] | pBlock | The memory block to be appended |
| [in] | owner | Pointer to the entry owner |
| [in] | handle | A handle to the entry |
| VkResult vh::vhMemBlockDeallocate | ( | vhMemoryBlock * | pBlock | ) |
Deallocate the memory from a block.
| [in] | pBlock | The memory block that is to be deleted |
| VkResult vh::vhMemBlockInit | ( | VkDevice | device, |
| VmaAllocator | allocator, | ||
| VkDescriptorPool | descriptorPool, | ||
| VkDescriptorSetLayout | descriptorLayout, | ||
| uint32_t | maxNumEntries, | ||
| uint32_t | sizeEntry, | ||
| uint32_t | numBuffers, | ||
| vhMemoryBlock * | pBlock | ||
| ) |
Initialize a single memory block.
| [in] | device | The logical Vulkan device |
| [in] | allocator | The VMA allocator |
| [in] | descriptorPool | Descriptor pool for creating descriptor sets |
| [in] | descriptorLayout | Descriptor layout for creating descriptor sets |
| [in] | maxNumEntries | Maximum number of entries in a memory block |
| [in] | sizeEntry | Size of an entry in bytes |
| [in] | numBuffers | Number of buffers (one for each framebuffer) |
| [in] | pBlock | A pointer to the memory block |
| VkResult vh::vhMemBlockListAdd | ( | std::vector< vhMemoryBlock * > & | blocklist, |
| void * | owner, | ||
| vhMemoryHandle * | handle | ||
| ) |
Add an entry to a memory block list.
| [in] | blocklist | The memory block list |
| [in] | owner | Pointer to the entry owner |
| [in] | handle | A handle to the entry |
| VkResult vh::vhMemBlockListClear | ( | std::vector< vhMemoryBlock * > & | blocklist | ) |
Delete all entries and all blocks from a block list.
| [in] | blocklist | The memory block list |
| VkResult vh::vhMemBlockListInit | ( | VkDevice | device, |
| VmaAllocator | allocator, | ||
| VkDescriptorPool | descriptorPool, | ||
| VkDescriptorSetLayout | descriptorLayout, | ||
| uint32_t | maxNumEntries, | ||
| uint32_t | sizeEntry, | ||
| uint32_t | numBuffers, | ||
| std::vector< vhMemoryBlock * > & | blocklist | ||
| ) |
Initialize a list of memory blocks.
| [in] | device | The logical Vulkan device |
| [in] | allocator | The VMA allocator |
| [in] | descriptorPool | Descriptor pool for creating descriptor sets |
| [in] | descriptorLayout | Descriptor layout for creating descriptor sets |
| [in] | maxNumEntries | Maximum number of entries in a memory block |
| [in] | sizeEntry | Size of an entry in bytes |
| [in] | numBuffers | Number of buffers (one for each framebuffer) |
| [in] | blocklist | A reference to the memory block list |
| VkResult vh::vhMemBlockMoveEntry | ( | std::vector< vhMemoryBlock * > & | dstblocklist, |
| vhMemoryHandle * | pHandle | ||
| ) |
Move a handle from one list to another list.
| [in] | dstblocklist | The destination block list |
| [in] | pHandle | Pointer to the handle of the entry that should be moved |
| VkResult vh::vhMemBlockRemoveEntry | ( | vhMemoryHandle * | pHandle | ) |
Remove an entry from a memory block.
| [in] | pHandle | Pointer to the handle of the entry that should be removed |
| VkResult vh::vhMemBlockUpdateBlockList | ( | std::vector< vhMemoryBlock * > & | blocklist, |
| uint32_t | index | ||
| ) |
Update all memory blocks by copying them to the GPU.
| [in] | blocklist | The memory blocks |
| [in] | index | The index of the buffer to use |
| VkResult vh::vhMemBlockUpdateEntry | ( | vhMemoryHandle * | pHandle, |
| void * | data | ||
| ) |
Update an entry in one of the memory blocks.
| [in] | pHandle | Pointer to the handle of the entry |
| [in] | data | Pointer to a block of data that should be written over the entry |
| VkResult vh::vhMemCreateVMAAllocator | ( | VkPhysicalDevice | physicalDevice, |
| VkDevice | device, | ||
| VmaAllocator & | allocator | ||
| ) |
Initialize the VMA allocator library.
| [in] | physicalDevice | Physical Vulkan device |
| [in] | device | Logical device |
| [out] | allocator | The created VMA allocator |
| uint32_t vh::vhMemFindMemoryType | ( | VkPhysicalDevice | physicalDevice, |
| uint32_t | typeFilter, | ||
| VkMemoryPropertyFlags | properties | ||
| ) |
Find the right memory type.
| [in] | physicalDevice | Physical Vulkan device |
| [in] | typeFilter | Memory type |
| [in] | properties | Desired memory properties |
| VkResult vh::vhPipeCreateGraphicsPipeline | ( | VkDevice | device, |
| std::vector< std::string > | shaderFileNames, | ||
| VkExtent2D | swapChainExtent, | ||
| VkPipelineLayout | pipelineLayout, | ||
| VkRenderPass | renderPass, | ||
| std::vector< VkDynamicState > | dynamicStates, | ||
| VkPipeline * | graphicsPipeline | ||
| ) |
Create a pipeline state object (PSO) for a light pass.
| [in] | device | Logical Vulkan device |
| [in] | shaderFileNames | List of filenames for the shaders: vertex, fragment, geometry, tess control, tess eval |
| [in] | swapChainExtent | Swapchain extent |
| [in] | pipelineLayout | Pipeline layout |
| [in] | renderPass | Renderpass to be used |
| [in] | dynamicStates | List of dynamic states that can be changed during usage of the pipeline |
| [out] | graphicsPipeline | The new PSO |
| VkResult vh::vhPipeCreateGraphicsPipelineLayout | ( | VkDevice | device, |
| std::vector< VkDescriptorSetLayout > | descriptorSetLayouts, | ||
| std::vector< VkPushConstantRange > | pushConstantRanges, | ||
| VkPipelineLayout * | pipelineLayout | ||
| ) |
Create a pipeline layout for drawing a light pass.
| [in] | device | Logical Vulkan device |
| [in] | descriptorSetLayouts | Descriptor set layouts |
| [in] | pushConstantRanges | A list with push constant ranges |
| [in] | pipelineLayout | Resulting pipline layout |
| VkResult vh::vhPipeCreateGraphicsShadowPipeline | ( | VkDevice | device, |
| std::string | verShaderFilename, | ||
| VkExtent2D | shadowMapExtent, | ||
| VkPipelineLayout | pipelineLayout, | ||
| VkRenderPass | renderPass, | ||
| VkPipeline * | graphicsPipeline | ||
| ) |
Create a pipeline state object (PSO) for a shadow pass.
| [in] | device | Logical Vulkan device |
| [in] | verShaderFilename | Name of the vetex shader file |
| [in] | shadowMapExtent | Swapchain extent |
| [in] | pipelineLayout | Pipeline layout |
| [in] | renderPass | Renderpass to be used |
| [out] | graphicsPipeline | The new PSO |
| VkShaderModule vh::vhPipeCreateShaderModule | ( | VkDevice | device, |
| const std::vector< char > & | code | ||
| ) |
Create a shader module.
| [in] | device | Logical Vulkan device |
| [in] | code | Blob of bytes that hold the SPIR-V shader code |
| VkResult vh::vhRenderBeginRenderPass | ( | VkCommandBuffer | commandBuffer, |
| VkRenderPass | renderPass, | ||
| VkFramebuffer | frameBuffer, | ||
| VkExtent2D | extent, | ||
| VkSubpassContents | subPassContents | ||
| ) |
Start rendering in a command buffer.
| [in] | commandBuffer | The command buffer to record into |
| [in] | renderPass | The render pass that should be begun |
| [in] | frameBuffer | The framebuffer for the render pass |
| [in] | extent | Extent of the framebuffer images |
| [in] | subPassContents | Specifies whether cmd buffers are inline or use secondary bufers |
| VkResult vh::vhRenderBeginRenderPass | ( | VkCommandBuffer | commandBuffer, |
| VkRenderPass | renderPass, | ||
| VkFramebuffer | frameBuffer, | ||
| std::vector< VkClearValue > & | clearValues, | ||
| VkExtent2D | extent, | ||
| VkSubpassContents | subPassContents | ||
| ) |
Start rendering in a command buffer.
| [in] | commandBuffer | The command buffer to record into |
| [in] | renderPass | The render pass that should be begun |
| [in] | frameBuffer | The framebuffer for the render pass |
| [in] | clearValues | A list of clear values to clear render targets |
| [in] | extent | Extent of the framebuffer images |
| [in] | subPassContents | Specifies whether cmd buffers are inline or use secondary bufers |
| VkResult vh::vhRenderCreateDescriptorPool | ( | VkDevice | device, |
| std::vector< VkDescriptorType > | types, | ||
| std::vector< uint32_t > | numberDesc, | ||
| VkDescriptorPool * | descriptorPool | ||
| ) |
Create a descriptor pool.
| [in] | device | The logical Vulkan device |
| [in] | types | Contains the resource types in the pool |
| [in] | numberDesc | Denotes how many of them are in the pool |
| [out] | descriptorPool | The new descriptor pool |
| VkResult vh::vhRenderCreateDescriptorSetLayout | ( | VkDevice | device, |
| std::vector< uint32_t > | counts, | ||
| std::vector< VkDescriptorType > | types, | ||
| std::vector< VkShaderStageFlags > | stageFlags, | ||
| VkDescriptorSetLayout * | descriptorSetLayout | ||
| ) |
Create a descriptor layout.
| [in] | device | The logical Vulkan device |
| [in] | counts | The number of images in an array |
| [in] | types | Contains the resource types for the increasing bindings |
| [in] | stageFlags | Denotes in which stages they should be used |
| [out] | descriptorSetLayout | The new descriptor set layout |
| VkResult vh::vhRenderCreateDescriptorSets | ( | VkDevice | device, |
| uint32_t | numberDesc, | ||
| VkDescriptorSetLayout | descriptorSetLayout, | ||
| VkDescriptorPool | descriptorPool, | ||
| std::vector< VkDescriptorSet > & | descriptorSets | ||
| ) |
Create a number of descriptor sets, one for each frame in the swapchain.
| [in] | device | The logical Vulkan device |
| [in] | numberDesc | Number of sets to be created |
| [in] | descriptorSetLayout | The layout for the set |
| [in] | descriptorPool | The pool from which the set is drawn |
| [out] | descriptorSets | Vector with desriptor sets, the new sets will be appended to this vector |
| VkResult vh::vhRenderCreateRenderPass | ( | VkDevice | device, |
| VkFormat | swapChainImageFormat, | ||
| VkFormat | depthFormat, | ||
| VkAttachmentLoadOp | loadOp, | ||
| VkRenderPass * | renderPass | ||
| ) |
Create a render pass for a light pass.
| [in] | device | The logical Vulkan device |
| [in] | swapChainImageFormat | The swap chain image format |
| [in] | depthFormat | The depth map image format |
| [in] | loadOp | Operation what to do with the framebuffer when starting the render pass: clear, keep, or dont care |
| [out] | renderPass | The new render pass |
| VkResult vh::vhRenderCreateRenderPassShadow | ( | VkDevice | device, |
| VkFormat | depthFormat, | ||
| VkRenderPass * | renderPass | ||
| ) |
Create a render pass for a shadow pass.
| [in] | device | The logical Vulkan device |
| [in] | depthFormat | The depth map image format |
| [out] | renderPass | The new render pass |
| VkResult vh::vhRenderPresentResult | ( | VkQueue | presentQueue, |
| VkSwapchainKHR | swapChain, | ||
| uint32_t | imageIndex, | ||
| VkSemaphore | signalSemaphore | ||
| ) |
Present the result of a render operation to a window.
| [in] | presentQueue | The present queue that the image is sent to |
| [in] | swapChain | The Vulkan swap chain |
| [in] | imageIndex | Index of the swap chain image currently used |
| [in] | signalSemaphore | Semaphore that should be signaled once the operation is done |
| VkResult vh::vhRenderUpdateDescriptorSet | ( | VkDevice | device, |
| VkDescriptorSet | descriptorSet, | ||
| std::vector< VkBuffer > | uniformBuffers, | ||
| std::vector< uint32_t > | bufferRanges, | ||
| std::vector< std::vector< VkImageView >> | textureImageViews, | ||
| std::vector< std::vector< VkSampler >> | textureSamplers | ||
| ) |
Update a descriptor set.
Since it can contain variable number of resources, the lists contain either uniformBuffers or imageViews/sampler. The size of the lists MUST be the same!
| [in] | device | Logical Vulkan device |
| [in] | descriptorSet | The descriptor set to be updated |
| [in] | uniformBuffers | List of UBOs (can contain null handles) |
| [in] | bufferRanges | List of buffer sizes |
| [in] | textureImageViews | List of texture image views to be updated |
| [in] | textureSamplers | List of texture image samplers |
| VkResult vh::vhRenderUpdateDescriptorSet | ( | VkDevice | device, |
| VkDescriptorSet | descriptorSet, | ||
| std::vector< VkDescriptorType > | descriptorTypes, | ||
| std::vector< VkBuffer > | uniformBuffers, | ||
| std::vector< uint32_t > | bufferRanges, | ||
| std::vector< std::vector< VkImageView >> | textureImageViews, | ||
| std::vector< std::vector< VkSampler >> | textureSamplers | ||
| ) |
Update a descriptor set.
Since it can contain variable number of resources, the lists contain either uniformBuffers or imageViews/sampler. The size of the lists MUST be the same!
| [in] | device | Logical Vulkan device |
| [in] | descriptorSet | The descriptor set to be updated |
| [in] | descriptorTypes | A list with the descriptor types |
| [in] | uniformBuffers | List of UBOs (can contain null handles) |
| [in] | bufferRanges | List of buffer sizes |
| [in] | textureImageViews | List of texture image views to be updated |
| [in] | textureSamplers | List of texture image samplers |
| VkResult vh::vhRenderUpdateDescriptorSetMaps | ( | VkDevice | device, |
| VkDescriptorSet | descriptorSet, | ||
| uint32_t | binding, | ||
| uint32_t | offset, | ||
| uint32_t | descriptorCount, | ||
| std::vector< std::vector< VkDescriptorImageInfo >> & | maps | ||
| ) |
Update a descriptor set being composed of arrays of textures.
A shader may use arrays of textures, e.g. one for albedo, one for normal maps., one for metalness etc. This funtion binds a subset of existing image infos such that the shader can access them as arrays of textures.
| [in] | device | Logical Vulkan device |
| [in] | descriptorSet | The descriptor set to be updated |
| [in] | binding | Start binding number, array bindings begin with this number |
| [in] | offset | Start idx for the array of image infos |
| [in] | descriptorCount | Number of images in the array = array length |
| [in] | maps | List of image info lists |
| VkResult vh::vhSwapCreateSwapChain | ( | VkPhysicalDevice | physicalDevice, |
| VkSurfaceKHR | surface, | ||
| VkDevice | device, | ||
| VkExtent2D | frameBufferExtent, | ||
| VkSwapchainKHR * | swapChain, | ||
| std::vector< VkImage > & | swapChainImages, | ||
| std::vector< VkImageView > & | swapChainImageViews, | ||
| VkFormat * | swapChainImageFormat, | ||
| VkExtent2D * | swapChainExtent | ||
| ) |
Choose the swapchain.
| [in] | physicalDevice | The physical device |
| [in] | surface | The window surface |
| [in] | device | Logical device |
| [in] | frameBufferExtent | Extent of the framebuffer |
| [out] | swapChain | The new swapchain |
| [out] | swapChainImages | A list containing the swapchain images |
| [out] | swapChainImageViews | A list containing swapchain image views |
| [out] | swapChainImageFormat | A list containing swapchain image formats |
| [out] | swapChainExtent | Swapchain extent |
| float vh::vhTimeDuration | ( | std::chrono::high_resolution_clock::time_point | t_prev | ) |
Use the high resolution clock to calculate a time duration since the last time measurement.
| [in] | t_prev | The last time measruement |
| std::chrono::high_resolution_clock::time_point vh::vhTimeNow | ( | ) |
Take a time measurment from the high resolution clock.


Copyright Bruce Wilcox<EMAIL_ADDRESS>www.brilligunderstanding.com
Revision 10/22/2017 cs7.6
Contents:
Rationale:
Coding Standards allow you and others to understand your code. They can also allow others who are not programmers to view an abstract of your code, generated by CS’s :abstract
ability.
To use :abstract
, merely login locally with a new user name (or erase contents of USERS), then type :abstract ~mytopic
for a single topic. The abstract will whiz by on screen but is captured in the user log. Just rename that log file and move it somewhere else.
Examples:
t: How are you
a: (~goodness) glad to hear it.
b: (cool) not so cool.
a: (~badness) sorry to hear it
b: (cool) not so bad. # bad - wrong indentation level
u: (how are you) I am good.
u: (and then) xxx # this is bad - jammed immediately after top level rule
u: (why not) because. # this is bad indentation of top level rule
Rationale:
On one hand you want to minimize useless space on a page. So top-level rules should not be indented (nor should their sample inputs).
On the other hand you want to easily see the structure of the code, so properly indenting rejoinders makes structure clear. And you want to easily spot where one rule chunk ends and another begins. So separating top level rules and keep rejoinders together is what I do.
Examples:
t: ASK_FOR_EMAIL () What is your email address?
a: EMAIL_GIVEN (~email_url) Thank you.
a: () ^reuse(EMAIL_GIVEN)
t: B55() What is your email address? # bad- meaningless label
Rationale:
Using capital letters for rule labels (both at the rule and in places that ^reuse
the rule) make it easy to see them in a mass of text like a :trace
.
If yours is not your own private bot project then every rule that generates output should have such a label, which will appear in an abstract. This allows others to refer to your rule and maybe find it in log files of customers.
Examples:
t: What year is it?
#! 1993
a: (~year) Great.
#! What is your name
#! Who are you?
?: ([
(‘you [name called])
(who be ‘you)
])
My name is Rose.
Rationale:
Sample inputs explain your patterns.
Sample inputs allow you to use :abstract
to give non-programmers an overview of your code. Sample inputs also allow CS to unit-test your code for you using :verify
.
Examples:
?: WHAT_BRILLIG_DOES([
(what * “Brillig Understanding” )
([tell talk know] *~2 about “Brillig Understanding”)
])
Brillig Understanding makes natural language systems.
u: BAD_CHOICES ([
(<< Brillig company >> ) # superfluous parens
(~mywords) # superfluous parens
([ word1 word2]) # superfluous parens
])
Rationale:
Superfluous parens make patterns harder to read, so harder to visually confirm they are correct. They also slow down the CS engine, but not enough to matter.
When you are using multiple patterns in a rule, putting each on its own line allows you (or code reviewers) to comprehend each one separately.
Indent each sentence and each CS code statement on separate lines.
Examples:
#! Test
u: (test)
$status += 1
$_x = ^compute(1 + 2)
The answer is $_x.
Did you miss it?
#! Where were you born
u: (where * you * born) # bad- harder to read
I was born in San Francisco near the old church on the hill. I was born an
only child but my parents always wanted more.
#! Where were you born
u: (where * you * born) # good
I was born in San Francisco near the old church on the hill.
I was born an only child but my parents always wanted more.
Rationale:
Multiple sentence user output is harder to read if on the same line since they will tend to run into very long lines.
Code is certainly harder to understand when multiple actions are on the same line. On the other hand if the output is tiny, you might put it on a single line like this:
u: (test) OK. $status += 1
Examples:
topic: ~aliens()
...
topic: ~family()
#!x*** Parents
#!
#!
#! Who is your father # note we had all mother stuff together before father
?: ( who * father) Dad.
#! What does your father do?
?: ( what * father * do) He works.
#!x*** Siblings
...
Rationale:
With appropriate bundling you should immediately know where to add a new rule or discover that you have multiple rules doing the same job.
I even annotate clusters of rules for :abstract
using #!x
comments which will reflect into the abstract to label the cluster and make it easy for people to follow along. The only problem may be when some earlier rule blocks a later one and you need to move something around. Consider using !
keywords as instead.
Rationale:
When you can localize data to the one file that uses it, it makes it easier to find the definition when you want to inspect it.
Use standard dictionary casing (or product owner's casing in the case of new non-words in the language) for keywords in concepts or patterns.
Avoid putting misspellings in concepts or keywords. Use replace: in your scripts file to effectively add additions to the predefined substitutions files that come with ChatScript.
But use :replace
only when the misspell has only one possible obvious value. replace:
changes the dictionary for ALL BOTS.! For misspellings which are legal words, add them to concepts or keywords.
Examples:
concept: ~protocols (Blu-ray WiFi)
replace: blue_ray Blu-ray # true always. Do this as the correct spelling
replace: MS Microsoft # bad - computers true, medical not
#! I used my brakes
u: ([brake break]) Don’t hit the brakes too hard. # misspell is a real word, list it
#! I like mars
u: (_~planets) ‘_0 # outputs Mars even though user typed mars
#! Do you like sheep?
u: ([sheep shep sheap]) I like sheep # generally bad to do this
Rationale:
If a word exists with only one casing in the dictionary, CS can automatically adjust the input to make it correct. Even if a word exists in multiple cases, if a concept set has it in only one casing (e.g. ~planets
has the noun Mars and not the verb mars), if you memorize it, CS can memorize the correct casing.
Sometimes you expect some user typos. Putting the illegal forms in your patterns (like shep), means they enter the dictionary as acceptable words. This means spelling correction can change “misspellings” of misspellings, causing word drift for an input like “hep”. Prefer to use replace:
if a misspelling can only go to one obvious place.


Google to bring India specific feature on Google Maps
Google is bringing in India-specific features on Google Maps to address unique challenges and opportunities, a senior company official said. "Google Maps is not just about navigating from point A to B. We have been building for India, addressing the unique challenges and opportunities, with the sole aim of making Google maps more comprehensive, accurate and reliable," Google Maps for India, Program Manager, Anal Ghosh said.
Ghosh talked about innovating features for India specifically. The two-wheeler mode in Google maps comes to India first as 70 per cent of all the vehicles registered in the country are two wheelers, he added. "Two-wheeler mode in maps shows trip routes that use shortcuts not accessible to cars, buses and trucks. It also provides customized traffic and arrival time estimations," he said. Google Maps' transit feature provides details on trains, bus and metro routes.
"We are working closely with the Union Ministry of Housing and Urban Affairs. We have been working with them to add public toilets (on google maps) across different cities in the country," Ghosh said.
The company has added public toilets on google maps in partnership with the government, the company said in a statement.
"We have launched real time buses in two cities--Kolkata and Surat. We are working to see how we can extend it to other cities as well," he added.
Ministry of Urban Development & Swachh Bharat Mission - Urban in association with Google proudly launch ' Google Maps Toilet Locator '
Swachh Bharat Mission enables easy access to public toilets in urban areas, Google Toilet Locators launched in NCR With construction of individual and public and community toilets in urban areas getting on to fast track, Swachh Bharat Mission(Urban) today moved to a new level of improving ease of access to public toilets. Minister of Urban Development M.Venkaiah Naidu today launched “Google Maps Toilet Locator App” to enable people to locate the nearest public toilet for use in five cities in National Capital Region and Bhopal and Indore in Madhya Pradesh. Naidu said this facility now available in Delhi, Gurugram, Faridabad, Ghaziabad and Noida and the two cities of Madhya Pradesh would help in addressing open urination and open defecation.
Using the key word Swachh Public Toilet, users can access 5,162 public toilets located near malls, hospitals, bus and railway stations, fuel stations, metro stations and public and community toilet complexes in the five cities in NCR and 703 in Bhopal and 411 in Indore. The App also gives information about the nature of the toilet seat available, free or pay for use, working hours etc. This facility will be extended to other cities in due course. Ministry of Urban Development has partnered with Google to enable this service. Venakaiah Naidu also launched free to use Smart Toilets set up by the New Delhi Municipal Council (NDMC) under PPP model at National Gallery of Art on Shershah Road, opposite Haryana Bhawan on Copernicus Marg and near Tolstoy Marg Metro Station. Each such complex has one WC toilet seat and four urinals for gents, one WC each for women and differently abled, Water ATM, Bank ATM and Digital Health Centres.
One “Reverse Vendor Machine” set up by NDMC at Gate No.2, Palika Market, New Delhi was also launched today. When a plastic bottle is dropped in to this machines, it gives a receipt of credit of up to one rupee. NDMC is setting up 20 such machines which help in preventing littering of plastic bottles. Speaking about the progress of Swachh Bharat Mission in urban areas since its launch in October,2014, Naidu said the mission picked up momentum during 2016 with 502 cities and towns including New Delhi Municipal Council declaring themselves “Open Defecation Free” during this year and most of these claims verified independently. Another 237 cities and towns are set to become ODF by March next year. He said that during this year, the Mission in urban areas got to halfway mark in toilet construction against the mission targets. Against the target of construction of 66 lakh individual household toilets, 27,81,883 such toilets have already been built and construction of another 21,43,222 is in progress. While over five lakh community and public toilet seats are to be built, 1.07 lakh seats have already been built so far and another 1.30 lakh toilet seats are under construction. Regarding Solid Waste Management, about 40,000 of the total 81,000 urban wards in the country have reported 100@ door-to-door collection and transportation of such waste. 21.50% of total solid waste being generated in urban areas is being processed scientifically.
You may also like
Subscribe to my weekly newsletter


First Name:
Last Name:
Work Phone Number:
Personal Phone Number:
Work Email Address:
Personal Email Address:
Work Address:
Personal Address:


SK
Contact
Intro
Work
What
Who
Contact
GET IN TOUCH
NIL GAVANI SEL
Photography
Graphic Designs
CINEMATIC VIDEO
Short Video Ads
×
Contact Me
<EMAIL_ADDRESS>Follow Me
Suresh Kanna - Salem, India


new TestResultDiffController()
This class is a controller for the test result comparison page.
Members
(static) __name
(static) _testResultDiffLogic :Logic
The "Logic" class
Type:
- Logic
Methods
(static) "input[name=flip-image] change"()
Swap actual/expected images
(static) __ready()
Called after the controller has been initialized.
Get the id of the right screenshot, and update views.
Get the id of the right screenshot, and update views.
(static) _hideActualMode()
Hide actual mode.
(static) _hideExpectedMode()
Hide expected mode.
(static) _initEdgeOverlapping(expectedId, actualId)
Parameters:
| Name | Type | Description |
|---|---|---|
expectedId |
Number | ID of expected image |
actualId |
Number | ID of actual image |
(static) _initializeOnionHandle()
Initialize the onion skin diff handle.
(static) _initializeSwipeHandle()
Initialize the swipe diff handle.
(static) _setActualImageSrc(withMarker, params)
Show actual image.
Parameters:
| Name | Type | Description |
|---|---|---|
withMarker |
Boolean | whether or not to display the image with markers. |
params |
Object | extra paramters |
(static) _setExpectedImageSrc(withMarker, params)
Show expected image.
Parameters:
| Name | Type | Description |
|---|---|---|
withMarker |
Boolean | whether or not to display the image with markers. |
params |
Object | extra paramters |
(static) _setImageSrc(selector, withMarker, params)
Show image.
Parameters:
| Name | Type | Description |
|---|---|---|
selector |
String | jQuery selector expression which determines the image node |
withMarker |
Boolean | whether or not to display the image with markers. |
params |
Object | extra paramters |


Right click or option-click the links below and choose "Save As..." to download the files.
Advent & Christmas Series 2012: "Coming Home"
December 2, 2012: "Coming Home: Why Jesus told the parables in Luke 15"
(Luke 15:1-32)
Sermon - Terry Maner
Click Here to Listen
December 9, 2012: "Coming Home: The Parable of the Searching Shepherd"
(Luke 15:3-7)
Sermon - Terry Maner
Click Here to Listen
December 16, 2012: "Coming Home: The Parable of the Searching Woman"
(Luke 15:8-10)
Sermon - Terry Maner
Click Here to Listen
December 23, 2012: "Coming Home: The Parable of the Lost Sons"
(Luke 15:11-32)
Sermon - Terry Maner
Click Here to Listen
December 24, 2012: "Christmas Eve Homily: Coming Home for Christmas"
(Luke 15:32)
Sermon - Terry Maner
Click Here to Listen