APEX Framework: UserRenderSurfaceBufferDesc.h Source File

NVIDIA APEX

UserRenderSurfaceBufferDesc.h
Go to the documentation of this file.
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 USER_RENDER_SURFACE_BUFFER_DESC_H
00013 #define USER_RENDER_SURFACE_BUFFER_DESC_H
00014 
00020 #include "ApexUsingNamespace.h"
00021 #include "UserRenderResourceManager.h"
00022 #include "RenderDataFormat.h"
00023 #include "ApexSDK.h"
00024 
00025 namespace physx
00026 {
00027     class PxCudaContextManager;
00028 }
00029 
00030 namespace nvidia
00031 {
00032 namespace apex
00033 {
00034 
00035 PX_PUSH_PACK_DEFAULT
00036 
00040 class UserRenderSurfaceBufferDesc
00041 {
00042 public:
00043     UserRenderSurfaceBufferDesc(void)
00044     {
00045         setDefaults();
00046     }
00047 
00051     void setDefaults()
00052     {
00053 //      hint   = RenderBufferHint::STATIC;      
00054         format = RenderDataFormat::UNSPECIFIED;
00055         
00056         width = 0;
00057         height = 0;
00058         depth = 1;
00059 
00060         //moduleIdentifier = 0;
00061         
00062         registerInCUDA = false;
00063         interopContext = 0;
00064 //      stride = 0;
00065     }
00066 
00070     bool isValid(void) const
00071     {
00072         uint32_t numFailed = 0;
00073         numFailed += (format == RenderDataFormat::UNSPECIFIED);
00074         numFailed += (width == 0) && (height == 0) && (depth == 0);
00075         numFailed += registerInCUDA && (interopContext == 0);
00076 //      numFailed += registerInCUDA && (stride == 0);
00077         
00078         return (numFailed == 0);
00079     }
00080 
00081 public:
00085     uint32_t                width;
00086     
00090     uint32_t                height;
00091 
00095     uint32_t                depth;
00096 
00100     RenderDataFormat::Enum  format;
00101 
00102     bool                    registerInCUDA;  
00103 
00108     PxCudaContextManager*   interopContext;
00109 };
00110 
00111 PX_POP_PACK
00112 
00113 }
00114 } // end namespace nvidia::apex
00115 
00116 #endif // USER_RENDER_SURFACE_BUFFER_DESC_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.