User:NOUG4AT/SoHL Code Analysis
Jump to navigation
Jump to search
NVIDIA cgd3d8.h File Overview
Note:Summary of its contents, purpose, and relevance to graphics programming. It could also features, enumerations, HRESULTs, and function declarations, highlighting their importance in DirectX 8 programming with NVIDIA's Cg shading language.
SoHL18/common/cg/cgD3D8.h
Enumerations
Enum Name | Value | Description |
---|---|---|
cgD3D8Failed | 1000 | Indicates a general failure |
cgD3D8DebugTrace | 1001 | Indicates a debug trace |
HRESULTs
HRESULT Name | Value | Description |
---|---|---|
CGD3D8ERR_NOTLOADED | 0x80048701 | Shader not loaded error |
CGD3D8ERR_NODEVICE | 0x80048702 | Device not found error |
CGD3D8ERR_NOTSAMPLER | 0x80048703 | Invalid sampler error |
CGD3D8ERR_INVALIDPROFILE | 0x80048704 | Invalid profile error |
CGD3D8ERR_NULLVALUE | 0x80048705 | Null value error |
CGD3D8ERR_OUTOFRANGE | 0x80048706 | Value out of range error |
CGD3D8ERR_NOTUNIFORM | 0x80048707 | Not uniform error |
CGD3D8ERR_NOTMATRIX | 0x80048708 | Not a matrix error |
CGD3D8ERR_INVALIDPARAM | 0x80048709 | Invalid parameter error |
CGD3D8ERR_INVALIDSAMPLERSTATE | 0x80048764 | Invalid sampler state error |
CGD3D8ERR_INVALIDVEREXDECL | 0x80048765 | Invalid vertex declaration error |
Function Declarations
Function | Description |
---|---|
cgD3D8TypeToSize(CGtype type) | Returns the size of the specified type |
cgD3D8ResourceToInputRegister(CGresource resource) | Returns the input register for a resource |
cgD3D8GetVertexDeclaration(CGprogram prog, DWORD decl[MAX_FVF_DECL_SIZE]) | Retrieves the vertex declaration for a program |
cgD3D8ValidateVertexDeclaration(CGprogram prog, const DWORD* decl) | Validates a vertex declaration for a program |
cgD3D8GetDevice() | Returns the current IDirect3DDevice8 object |
cgD3D8SetDevice(IDirect3DDevice8* pDevice) | Sets the current IDirect3DDevice8 object |
cgD3D8LoadProgram(CGprogram prog, CGbool paramShadowing, DWORD assemFlags, DWORD vshaderUsage, const DWORD* vertexDecl) | Loads a program with specified parameters |
cgD3D8UnloadProgram(CGprogram prog) | Unloads a program |
cgD3D8IsProgramLoaded(CGprogram prog) | Checks if a program is loaded |
cgD3D8BindProgram(CGprogram prog) | Binds a program |
cgD3D8SetUniform(CGparameter param, const void* floats) | Sets a uniform parameter with float values |
cgD3D8SetUniformArray(CGparameter param, DWORD offset, DWORD numItems, const void* values) | Sets an array of uniform parameters |
cgD3D8SetUniformMatrix(CGparameter param, const D3DMATRIX* matrix) | Sets a uniform matrix parameter |
cgD3D8SetUniformMatrixArray(CGparameter param, DWORD offset, DWORD numItems, const D3DMATRIX* matrices) | Sets an array of uniform matrix parameters |
cgD3D8SetTexture(CGparameter param, IDirect3DBaseTexture8* tex) | Sets a texture parameter |
cgD3D8SetTextureStageState(CGparameter param, D3DTEXTURESTAGESTATETYPE type, DWORD value) | Sets a texture stage state parameter |
cgD3D8SetTextureWrapMode(CGparameter param, DWORD value) | Sets the texture wrap mode parameter |
cgD3D8EnableParameterShadowing(CGprogram prog, CGbool enable) | Enables parameter shadowing for a program |
cgD3D8IsParameterShadowingEnabled(CGprogram prog) | Checks if parameter shadowing is enabled for a program |
cgD3D8GetLatestVertexProfile() | Returns the latest vertex profile |
cgD3D8GetLatestPixelProfile() | Returns the latest pixel profile |
cgD3D8GetOptimalOptions(CGprofile profile) | Returns the optimal options for a profile |
cgD3D8GetLastError() | Returns the last error |
cgD3D8TranslateCGerror(CGerror error) | Translates a CGerror to a string |
cgD3D8TranslateHRESULT(HRESULT hr) | Translates an HRESULT to a string |
cgD3D8EnableDebugTracing(CGbool enable) | Enables debug tracing |