HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
GR_ImageVK.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: GR_ImageVK ( GR Library, C++)
7
*
8
* COMMENTS:
9
* Simple renderer class for a 2D image
10
*/
11
#ifndef GR_ImageVK_h
12
#define GR_ImageVK_h
13
14
#include "
GR_GeoRenderVK.h
"
15
16
#include <
RV/RV_ShaderVariableSet.h
>
17
#include <
RV/RV_Render.h
>
18
#include <
RV/RV_VKImage.h
>
19
#include <
GA/GA_Names.h
>
20
21
#include <
UT/UT_UniquePtr.h
>
22
23
class
RV_Geometry
;
24
class
GEO_PrimVolume
;
25
class
GT_PrimVolume
;
26
27
class
GR_API
GR_ImageVK
:
public
GR_GeoRenderVK
28
{
29
public
:
30
GR_ImageVK
(
GR_Primitive
*prim);
31
~
GR_ImageVK
()
override
;
32
33
const
char
*
className
()
const override
{
return
"GR_ImageVK"
; }
34
35
RV_Geometry
*
getVkPickGeometry
(
unsigned
int
pick_mode)
override
;
36
37
void
update
(
RE_RenderContext
rc,
38
const
GT_PrimitiveHandle
&primh,
39
const
GR_UpdateParms
&parms,
40
const
char
*
cache_name
)
override
;
41
42
void
draw
(
RE_RenderContext
rc,
43
GR_RenderMode
mode
,
44
GR_RenderFlags
flags
,
45
GR_DrawParms
dp)
override
;
46
47
exint
getNumGLPrimitives
()
const override
{
return
1; }
48
bool
hasTransparency
()
const override
{
return
myHasAlpha; }
49
50
static
bool
initShaders(
RV_Instance
* inst);
51
static
void
cleanupShaders();
52
53
private
:
54
void
fillImageFromImage(
RV_Render
*
r
,
55
const
GEO_PrimVolume
*vol);
56
void
fillImageFromVolume(
RV_Render
*
r
,
57
const
GT_PrimVolume
*vol,
58
const
GR_UpdateParms
&p);
59
/// Allocate a new image if necessary.
60
void
allocateImage(
RV_Render
*
r
,
VkFormat
format
,
61
RV_TextureWrap
wrap,
62
int
w
,
int
h
,
63
RV_TextureSwizzle
* swizzle =
nullptr
,
64
bool
is_int =
false
);
65
UT_UniquePtr<RV_VKImage>
myColorImage;
66
//UT_UniquePtr<RV_VKImage *> myDepthImage; // TODO: for COPs
67
UT_UniquePtr<RV_ShaderVariableSet>
myImageSet;
68
bool
myHasAlpha =
false
;
69
int
myShaderType = 0;
70
71
};
72
73
#endif
RV_TextureSwizzle
RV_TextureSwizzle
Definition:
RV_Type.h:247
flags
GLbitfield flags
Definition:
glcorearb.h:1596
GR_GeoRender::draw
virtual void draw(RE_RenderContext r, GR_RenderMode mode, GR_RenderFlags flags, GR_DrawParms draw_parms)=0
Normal drawing method. Only issue rendering commands.
GR_GeoRenderVK
Definition:
GR_GeoRenderVK.h:63
RV_Render
Definition:
RV_Render.h:70
exint
int64 exint
Definition:
SYS_Types.h:125
GT_Names::cache_name
GT_API const UT_StringHolder cache_name
RV_Geometry
Object that represents drawable geometry. This object holds vertex, instancing and index buffers for ...
Definition:
RV_Geometry.h:165
RV_VKImage.h
RV_Render.h
RE_RenderContext
Temporary container for either a RV_Render and an RE_Render.
Definition:
RE_RenderContext.h:23
GR_GeoRender::getVkPickGeometry
virtual RV_Geometry * getVkPickGeometry(unsigned int pick_mode)
Definition:
GR_GeoRender.h:128
UT_UniquePtr
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition:
UT_UniquePtr.h:39
GR_UpdateParms
set of parameters sent to GR_Primitive::update()
Definition:
GR_UpdateParms.h:37
GR_Primitive
Definition:
GR_Primitive.h:55
GR_ImageVK::hasTransparency
bool hasTransparency() const override
returns true if this drawable renders some transparent elements
Definition:
GR_ImageVK.h:48
GR_RenderMode
GR_RenderMode
Definition:
GR_Defines.h:48
GR_DrawParms
Definition:
GR_DrawParms.h:19
format
GLint GLint GLsizei GLint GLenum format
Definition:
glcorearb.h:108
GR_API
#define GR_API
Definition:
GR_API.h:10
UT_IntrusivePtr< GT_Primitive >
RV_TextureWrap
RV_TextureWrap
Definition:
RV_Type.h:147
GT_PrimVolume
Definition:
GT_PrimVolume.h:75
GR_RenderFlags
GR_RenderFlags
Definition:
GR_Defines.h:86
RV_Instance
Handle to the main interface of Vulkan.
Definition:
RV_Instance.h:38
mode
GLenum mode
Definition:
glcorearb.h:99
h
GLfloat GLfloat GLfloat GLfloat h
Definition:
glcorearb.h:2002
GR_GeoRenderVK.h
GR_ImageVK
Definition:
GR_ImageVK.h:27
UT_UniquePtr.h
GA_Names.h
RV_ShaderVariableSet.h
VkFormat
VkFormat
Definition:
vulkan_core.h:1386
GR_ImageVK::className
const char * className() const override
Definition:
GR_ImageVK.h:33
GEO_PrimVolume
Definition:
GEO_PrimVolume.h:320
w
GLubyte GLubyte GLubyte GLubyte w
Definition:
glcorearb.h:857
GR_GeoRender::update
virtual void update(RE_RenderContext r, const GT_PrimitiveHandle &primh, const GR_UpdateParms &p, const char *cache_name)=0
GR_ImageVK::getNumGLPrimitives
exint getNumGLPrimitives() const override
Definition:
GR_ImageVK.h:47
r
GLboolean r
Definition:
glcorearb.h:1222
GR
GR_ImageVK.h
Generated on Sun Nov 17 2024 03:01:14 for HDK by
1.8.6