Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/iota97/AnisotropyEditor
03 March 2025, 11:54:12 UTC
  • Code
  • Branches (2)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/main
    • refs/tags/v1.0.0
    No releases to show
  • 0ee58b7
  • /
  • src
  • /
  • Texture
  • /
  • texture.h
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:c884d360fba6411dec7b5e895dbba911520a3592
origin badgedirectory badge Iframe embedding
swh:1:dir:3e903dbca1dfe8178175def1a6a3877a55ac8177
origin badgerevision badge
swh:1:rev:11045617aa83f22895897e45d021b524d3a6acb9
origin badgesnapshot badge
swh:1:snp:e9f115333919a1dfb7d44fb63da87266fcc92228
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 11045617aa83f22895897e45d021b524d3a6acb9 authored by COCCO Giovanni on 28 February 2025, 12:08:40 UTC
Improve compilation instructions
Tip revision: 1104561
texture.h
#pragma once

#include <QVulkanWindow>
#include <QVulkanFunctions>

class VulkanWindow;
class Texture {
public:
    Texture(const QString &path, VulkanWindow *w, uint32_t depth = 1,
            bool compute = false, bool disableMipmap = false, bool colorAttachment = false, VkSampleCountFlagBits sampleCount = VK_SAMPLE_COUNT_1_BIT, bool *result = nullptr);

    Texture(uint32_t width, uint32_t height, VulkanWindow *w, uint32_t depth = 1, VkFormat fmt = VK_FORMAT_R8G8B8A8_SRGB,
            bool compute = false, bool disableMipmap = false, bool colorAttachment = false, bool depthAttachment = false,
            VkSampleCountFlagBits sampleCount = VK_SAMPLE_COUNT_1_BIT);

    virtual ~Texture();
    Texture(Texture&& other);
    Texture& operator=(Texture&& other);
    Texture& operator=(const Texture&) = delete;

    static Texture* createFromTexture(const Texture&);

    VkImageView getImageView();
    VkImageView* getImageViewPtr();
    VkSampler getTextureSampler();
    VkImage getImage();

    void saveToPng(const QString &path);
    void clear(float r, float g, float b, float a);
    void blitTextureImage(const Texture& other);
    void generateMipmaps(VkSemaphore *waitSemaphorePtr = nullptr);
    uint32_t getWidth();
    uint32_t getHeight();
    uint32_t getMipLevels();

protected:
    Texture(const Texture&);

    VkCommandBuffer beginSingleTimeCommands();
    void endSingleTimeCommands(VkCommandBuffer commandBuffer, VkSemaphore *waitSemaphorePtr = nullptr);
    void transitionImageLayout(VkImageLayout oldLayout, VkImageLayout newLayout);

    void createTextureImage(const QString& path, bool *result);
    void createTextureImage();
    void createImageView();
    void createTextureSampler();

    void createBuffer(VkDeviceSize size, VkBufferUsageFlags usage, VkBuffer& buffer, VkDeviceMemory& bufferMemory);
    void createImage(VkImageUsageFlags usage, VkMemoryPropertyFlags properties);
    void copyBufferToImage(VkBuffer buffer, VkImage image, uint32_t width, uint32_t height, uint32_t depth);
    void copyTextureImage(const Texture& other);

    VulkanWindow *m_window;

    VkImage m_textureImage = VK_NULL_HANDLE;
    VkDeviceMemory m_textureImageMemory = VK_NULL_HANDLE;
    VkImageView m_textureImageView = VK_NULL_HANDLE;
    VkSampler m_textureSampler = VK_NULL_HANDLE;

    uint32_t m_width;
    uint32_t m_height;
    uint32_t m_depth;
    uint32_t m_mipLevels;

    VkFormat m_format;
    VkSampleCountFlagBits m_sampleCount;

    bool m_compute;
    bool m_colorAttachment;
    bool m_depthAttachment = false;
    bool m_disableMipmap;
};

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API

back to top