NVIDIA IndeX API nvidia_logo_transpbg.gif Up
itexture.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright 2023 NVIDIA Corporation. All rights reserved.
3 *****************************************************************************/
6
7#ifndef NVIDIA_INDEX_ITEXTURE_H
8#define NVIDIA_INDEX_ITEXTURE_H
9
10#include <mi/base/interface_declare.h>
11#include <mi/dice.h>
12
13#include <nv/index/iattribute.h>
14
15namespace nv
16{
17namespace index
18{
19
27class ITexture :
28 public mi::base::Interface_declare<0x633c679,0x5eb7,0x4e0d,0x9e,0xab,0xdc,0x6e,0xed,0x87,0x56,0x38,
29 nv::index::IAttribute>
30{
31public:
36 virtual mi::Uint32 get_resolution_x() const = 0;
37
42 virtual mi::Uint32 get_resolution_y() const = 0;
43
46 {
51 RGBA_FLOAT32 = 1
52 };
53
58 virtual Pixel_format get_pixel_format() const = 0;
59
75 virtual bool set_pixel_data(
76 const void* pixel_data,
77 mi::Uint32 width,
78 mi::Uint32 height,
79 Pixel_format format) = 0;
80
90 virtual bool set_pixel_data(
91 const mi::neuraylib::ICanvas* canvas,
92 Pixel_format format) = 0;
93
104 virtual const void* get_pixel_data() const = 0;
105};
106
107}} // namespace index / nv
108
109#endif // NVIDIA_INDEX_ITEXTURE_H
A base class that defines the properties of a texture of resolution [x,y] for a given pixel format.
Definition: itexture.h:30
virtual bool set_pixel_data(const void *pixel_data, mi::Uint32 width, mi::Uint32 height, Pixel_format format)=0
Set the texture data from a buffer.
Pixel_format
Pixel format.
Definition: itexture.h:46
@ RGBA_UINT8
RGBA color, every component unsigned 8-bit integer.
Definition: itexture.h:48
@ RGBA_FLOAT32
RGBA color, every component a 32-bit IEEE-754 single-precision normalized floating-point number.
Definition: itexture.h:51
virtual mi::Uint32 get_resolution_y() const =0
Get the vertical resolution of the texture.
virtual const void * get_pixel_data() const =0
Get the texture data.
virtual Pixel_format get_pixel_format() const =0
Get the pixel format of the texture.
virtual bool set_pixel_data(const mi::neuraylib::ICanvas *canvas, Pixel_format format)=0
Set the texture data from a canvas.
virtual mi::Uint32 get_resolution_x() const =0
Get the horizontal resolution of the texture.
Base class representing attributes that can be defined in a scene description.
Common namespace for all NVIDIA APIs.
Definition: iindex.h:349