Files
ObsidianDragon/src/util/noise_texture.h
DanS 3aee55b49c ObsidianDragon - DragonX ImGui Wallet
Full-node GUI wallet for DragonX cryptocurrency.
Built with Dear ImGui, SDL3, and OpenGL3/DX11.

Features:
- Send/receive shielded and transparent transactions
- Autoshield with merged transaction display
- Built-in CPU mining (xmrig)
- Peer management and network monitoring
- Wallet encryption with PIN lock
- QR code generation for receive addresses
- Transaction history with pagination
- Console for direct RPC commands
- Cross-platform (Linux, Windows)
2026-02-27 00:26:01 -06:00

36 lines
1.3 KiB
C++

// DragonX Wallet - ImGui Edition
// Copyright 2024-2026 The Hush Developers
// Released under the GPLv3
#pragma once
#include "imgui.h"
namespace dragonx {
namespace util {
// Returns a cached noise texture (created on first call).
// The texture is a 256x256 tileable white-noise pattern with
// per-pixel random alpha (0-255) designed to be overlaid at very
// low opacity to give cards a subtle grain / paper texture.
//
// texSize receives 256 (the width/height of the texture).
ImTextureID GetNoiseTexture(int* texSize = nullptr);
// Returns a viewport-sized pre-tiled noise texture (single draw call).
// The 256x256 base noise is tiled across the given viewport dimensions.
// Re-creates the texture when the viewport size changes.
// outW/outH receive the actual texture dimensions.
ImTextureID GetTiledNoiseTexture(int viewportW, int viewportH,
int* outW = nullptr, int* outH = nullptr);
// Draw a tiled noise overlay in a single AddImage call.
// Uses the pre-tiled viewport-sized texture — call this instead of
// manually looping with AddImage for each tile.
// dl: draw list, pMin/pMax: rect to cover, tintColor: alpha-premultiplied tint.
void DrawTiledNoiseRect(ImDrawList* dl, const ImVec2& pMin, const ImVec2& pMax,
ImU32 tintColor);
} // namespace util
} // namespace dragonx