IofxRenderable.h
00001 /* 00002 * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. 00003 * 00004 * NVIDIA CORPORATION and its licensors retain all intellectual property 00005 * and proprietary rights in and to this software, related documentation 00006 * and any modifications thereto. Any use, reproduction, disclosure or 00007 * distribution of this software and related documentation without an express 00008 * license agreement from NVIDIA CORPORATION is strictly prohibited. 00009 */ 00010 00011 00012 #ifndef IOFX_RENDERABLE_H 00013 #define IOFX_RENDERABLE_H 00014 00015 #include "foundation/Px.h" 00016 #include "ApexInterface.h" 00017 #include "Renderable.h" 00018 #include "IofxRenderCallback.h" 00019 00020 namespace nvidia 00021 { 00022 namespace apex 00023 { 00024 00025 PX_PUSH_PACK_DEFAULT 00026 00030 struct IofxSharedRenderData 00031 { 00032 uint32_t maxObjectCount; 00033 uint32_t activeObjectCount; 00034 }; 00035 00039 struct IofxSpriteSharedRenderData : IofxSharedRenderData 00040 { 00041 IofxSpriteRenderLayout spriteRenderLayout; 00042 UserRenderBuffer* spriteRenderBuffer; 00043 UserRenderSurface* spriteRenderSurfaces[IofxSpriteRenderLayout::MAX_SURFACE_COUNT]; 00044 }; 00045 00049 struct IofxMeshSharedRenderData : IofxSharedRenderData 00050 { 00051 IofxMeshRenderLayout meshRenderLayout; 00052 UserRenderBuffer* meshRenderBuffer; 00053 }; 00054 00058 struct IofxCommonRenderData 00059 { 00060 uint32_t startIndex; 00061 uint32_t objectCount; 00062 00063 const char* renderResourceNameSpace; 00064 const char* renderResourceName; 00065 void* renderResource; 00066 }; 00067 00071 struct IofxSpriteRenderData : IofxCommonRenderData 00072 { 00073 uint32_t visibleCount; 00074 00075 const IofxSpriteSharedRenderData* sharedRenderData; 00076 }; 00077 00081 struct IofxMeshRenderData : IofxCommonRenderData 00082 { 00083 const IofxMeshSharedRenderData* sharedRenderData; 00084 }; 00085 00086 class IofxSpriteRenderable; 00087 class IofxMeshRenderable; 00088 00093 class IofxRenderable : public ApexInterface 00094 { 00095 public: 00099 enum Type 00100 { 00101 SPRITE, 00102 MESH 00103 }; 00104 00108 virtual Type getType() const = 0; 00109 00113 virtual const IofxSpriteRenderData* getSpriteRenderData() const = 0; 00114 00118 virtual const IofxMeshRenderData* getMeshRenderData() const = 0; 00119 00123 virtual const physx::PxBounds3& getBounds() const = 0; 00124 00125 protected: 00126 virtual ~IofxRenderable() {} 00127 00128 }; 00129 00130 PX_POP_PACK 00131 00132 } 00133 } // end namespace nvidia 00134 00135 #endif // IOFX_RENDERABLE_H
Generated on Fri Dec 15 2017 13:58:35 Copyright © 2012-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.