~ubuntu-branches/ubuntu/wily/opencollada/wily

« back to all changes in this revision

Viewing changes to Externals/Cg/include/Cg/cgD3D11.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2015-05-14 17:23:27 UTC
  • Revision ID: package-import@ubuntu.com-20150514172327-f862u8envms01fra
Tags: upstream-0.1.0~20140703.ddf8f47+dfsg1
ImportĀ upstreamĀ versionĀ 0.1.0~20140703.ddf8f47+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *
 
3
 * Copyright (c) 2002-2012, NVIDIA Corporation.
 
4
 *
 
5
 *
 
6
 *
 
7
 * NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
 
8
 * of your agreement to the following terms, and your use, installation,
 
9
 * modification or redistribution of this NVIDIA software constitutes
 
10
 * acceptance of these terms.  If you do not agree with these terms, please do
 
11
 * not use, install, modify or redistribute this NVIDIA software.
 
12
 *
 
13
 *
 
14
 *
 
15
 * In consideration of your agreement to abide by the following terms, and
 
16
 * subject to these terms, NVIDIA grants you a personal, non-exclusive license,
 
17
 * under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
 
18
 * Software"), to use, reproduce, modify and redistribute the NVIDIA
 
19
 * Software, with or without modifications, in source and/or binary forms;
 
20
 * provided that if you redistribute the NVIDIA Software, you must retain the
 
21
 * copyright notice of NVIDIA, this notice and the following text and
 
22
 * disclaimers in all such redistributions of the NVIDIA Software. Neither the
 
23
 * name, trademarks, service marks nor logos of NVIDIA Corporation may be used
 
24
 * to endorse or promote products derived from the NVIDIA Software without
 
25
 * specific prior written permission from NVIDIA.  Except as expressly stated
 
26
 * in this notice, no other rights or licenses express or implied, are granted
 
27
 * by NVIDIA herein, including but not limited to any patent rights that may be
 
28
 * infringed by your derivative works or by other works in which the NVIDIA
 
29
 * Software may be incorporated. No hardware is licensed hereunder.
 
30
 *
 
31
 *
 
32
 *
 
33
 * THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
 
34
 * WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
 
35
 * WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
 
36
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
 
37
 * EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
 
38
 *
 
39
 *
 
40
 *
 
41
 * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
 
42
 * EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
 
43
 * PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 
44
 * PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE,
 
45
 * REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
 
46
 * HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
 
47
 * NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
 
48
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 
49
 *
 
50
 */
 
51
 
 
52
#ifndef __CGD3D11_H__
 
53
#define __CGD3D11_H__
 
54
 
 
55
#ifdef _WIN32
 
56
 
 
57
#pragma once
 
58
 
 
59
#include <windows.h>
 
60
#include <d3d11.h>
 
61
 
 
62
#include "Cg/cg.h"
 
63
 
 
64
/* Set up for either Win32 import/export/lib. */
 
65
 
 
66
#ifdef CGD3D11DLL_EXPORTS
 
67
# define CGD3D11DLL_API __declspec(dllexport)
 
68
#elif defined(CG_LIB)
 
69
# define CGD3D11DLL_API
 
70
#else
 
71
# define CGD3D11DLL_API __declspec(dllimport)
 
72
#endif
 
73
 
 
74
#ifndef CGD3D11ENTRY
 
75
# ifdef _WIN32
 
76
#  define CGD3D11ENTRY __cdecl
 
77
# else
 
78
#  define CGD3D11ENTRY
 
79
# endif
 
80
#endif
 
81
 
 
82
#ifdef __cplusplus
 
83
extern "C"
 
84
{
 
85
#endif
 
86
 
 
87
#ifndef CGD3D11_EXPLICIT
 
88
 
 
89
CGD3D11DLL_API ID3D11Device * CGD3D11ENTRY cgD3D11GetDevice(CGcontext Context);
 
90
CGD3D11DLL_API HRESULT CGD3D11ENTRY cgD3D11SetDevice(CGcontext Context, ID3D11Device *pDevice);
 
91
CGD3D11DLL_API void CGD3D11ENTRY cgD3D11SetTextureParameter(CGparameter Parameter, ID3D11Resource *pTexture);
 
92
CGD3D11DLL_API void CGD3D11ENTRY cgD3D11SetSamplerStateParameter(CGparameter Parameter, ID3D11SamplerState *pSamplerState);
 
93
CGD3D11DLL_API void CGD3D11ENTRY cgD3D11SetTextureSamplerStateParameter(CGparameter Parameter, ID3D11Resource *pTexture, ID3D11SamplerState *pSamplerState);
 
94
CGD3D11DLL_API HRESULT CGD3D11ENTRY cgD3D11LoadProgram(CGprogram Program, UINT Flags);
 
95
CGD3D11DLL_API ID3D10Blob * CGD3D11ENTRY cgD3D11GetCompiledProgram(CGprogram Program);
 
96
CGD3D11DLL_API ID3D10Blob * CGD3D11ENTRY cgD3D11GetProgramErrors(CGprogram Program);
 
97
CGD3D11DLL_API CGbool CGD3D11ENTRY cgD3D11IsProgramLoaded(CGprogram Program);
 
98
CGD3D11DLL_API HRESULT CGD3D11ENTRY cgD3D11BindProgram(CGprogram Program);
 
99
CGD3D11DLL_API void CGD3D11ENTRY cgD3D11UnloadProgram(CGprogram Program);
 
100
CGD3D11DLL_API ID3D11Buffer * CGD3D11ENTRY cgD3D11GetBufferByIndex(CGprogram Program, UINT Index);
 
101
CGD3D11DLL_API void CGD3D11ENTRY cgD3D11RegisterStates(CGcontext Context);
 
102
CGD3D11DLL_API void CGD3D11ENTRY cgD3D11SetManageTextureParameters(CGcontext Context, CGbool Flag);
 
103
CGD3D11DLL_API CGbool CGD3D11ENTRY cgD3D11GetManageTextureParameters(CGcontext Context);
 
104
CGD3D11DLL_API ID3D10Blob * CGD3D11ENTRY cgD3D11GetIASignatureByPass(CGpass Pass);
 
105
CGD3D11DLL_API CGprofile CGD3D11ENTRY cgD3D11GetLatestVertexProfile(void);
 
106
CGD3D11DLL_API CGprofile CGD3D11ENTRY cgD3D11GetLatestGeometryProfile(void);
 
107
CGD3D11DLL_API CGprofile CGD3D11ENTRY cgD3D11GetLatestPixelProfile(void);
 
108
CGD3D11DLL_API CGprofile CGD3D11ENTRY cgD3D11GetLatestHullProfile(void);
 
109
CGD3D11DLL_API CGprofile CGD3D11ENTRY cgD3D11GetLatestDomainProfile(void);
 
110
CGD3D11DLL_API CGbool CGD3D11ENTRY cgD3D11IsProfileSupported(CGprofile Profile);
 
111
CGD3D11DLL_API DWORD CGD3D11ENTRY cgD3D11TypeToSize(CGtype Type);
 
112
CGD3D11DLL_API HRESULT CGD3D11ENTRY cgD3D11GetLastError(void);
 
113
CGD3D11DLL_API const char ** CGD3D11ENTRY cgD3D11GetOptimalOptions(CGprofile Profile);
 
114
CGD3D11DLL_API const char * CGD3D11ENTRY cgD3D11TranslateCGerror(CGerror Error);
 
115
CGD3D11DLL_API const char * CGD3D11ENTRY cgD3D11TranslateHRESULT(HRESULT hr);
 
116
CGD3D11DLL_API void CGD3D11ENTRY cgD3D11UnbindProgram(CGprogram Program);
 
117
CGD3D11DLL_API CGbuffer CGD3D11ENTRY cgD3D11CreateBuffer(CGcontext Context, int size, const void *data, D3D11_USAGE bufferUsage);
 
118
CGD3D11DLL_API CGbuffer CGD3D11ENTRY cgD3D11CreateBufferFromObject(CGcontext Context, ID3D11Buffer *obj, CGbool manageObject);
 
119
CGD3D11DLL_API ID3D11Buffer * CGD3D11ENTRY cgD3D11GetBufferObject(CGbuffer buffer);
 
120
 
 
121
#endif /* CGD3D11_EXPLICIT */
 
122
 
 
123
#ifdef __cplusplus
 
124
}
 
125
#endif
 
126
 
 
127
#endif /* _WIN32 */
 
128
 
 
129
#endif