Program Listing for File holoviz.hpp
↰ Return to documentation for file (modules/holoviz/src/holoviz/holoviz.hpp
)
/*
* SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef HOLOSCAN_VIZ_HOLOVIZ_HOLOVIZ_HPP
#define HOLOSCAN_VIZ_HOLOVIZ_HOLOVIZ_HPP
#include <cuda.h>
#include <cstdint>
#include "holoviz/image_format.hpp"
#include "holoviz/init_flags.hpp"
#include "holoviz/primitive_topology.hpp"
// forward declaration of external types
typedef struct GLFWwindow GLFWwindow;
struct ImGuiContext;
namespace holoscan::viz
{
void Init(GLFWwindow *window, InitFlags flags = InitFlags::NONE);
void Init(uint32_t width, uint32_t height, const char *title, InitFlags flags = InitFlags::NONE);
void Init(const char *displayName, uint32_t width = 0, uint32_t height = 0, uint32_t refreshRate = 0,
InitFlags flags = InitFlags::NONE);
void ImGuiSetCurrentContext(ImGuiContext *context);
void SetCudaStream(CUstream stream);
bool WindowShouldClose();
bool WindowIsMinimized();
void Shutdown();
void Begin();
void End();
void BeginImageLayer();
void ImageCudaDevice(uint32_t width, uint32_t height, ImageFormat fmt, CUdeviceptr device_ptr);
void ImageCudaArray(ImageFormat fmt, CUarray array);
void ImageHost(uint32_t width, uint32_t height, ImageFormat fmt, const void *data);
void LUT(uint32_t size, ImageFormat fmt, size_t data_size, const void *data);
void BeginImGuiLayer();
void BeginGeometryLayer();
void Color(float r, float g, float b, float a);
void LineWidth(float width);
void PointSize(float size);
void Primitive(PrimitiveTopology topology, uint32_t primitive_count, size_t data_size, const float *data);
void Text(float x, float y, float size, const char *text);
void LayerOpacity(float opacity);
void LayerPriority(int32_t priority);
void EndLayer();
void ReadFramebuffer(ImageFormat fmt, size_t buffer_size, CUdeviceptr device_ptr);
} // namespace holoscan::viz
#endif/* HOLOSCAN_VIZ_HOLOVIZ_HOLOVIZ_HPP */