本文整理汇总了C++中sphere类的典型用法代码示例。如果您正苦于以下问题:C++ sphere类的具体用法?C++ sphere怎么用?C++ sphere使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了sphere类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: shape
sphere::sphere(sphere const& other) :
shape(other.name(), other.Color()),
center_(other.center()),
radius_(other.radius())
{
// cout << "sphere copy c'tor" << endl;
}
开发者ID:sqrt,项目名称:plse-beleg-6,代码行数:7,代码来源:sphere.cpp
示例2: OnD3D11DestroyDevice
//--------------------------------------------------------------------------------------
// Release D3D11 resources created in OnD3D11CreateDevice
//--------------------------------------------------------------------------------------
void CALLBACK OnD3D11DestroyDevice( void* pUserContext )
{
g_DialogResourceManager.OnD3D11DestroyDevice();
g_D3DSettingsDlg.OnD3D11DestroyDevice();
//CDXUTDirectionWidget::StaticOnD3D11DestroyDevice();
DXUTGetGlobalResourceCache().OnDestroyDevice();
test.destroy();
tessplane.destroy();
lightsphere.destroy();
tesscube.destroy();
fuse.destroy();
deboard.destroy();
board1.destroy();
geo_alien.destroy();
FirePart.destroy();
SAFE_DELETE( g_pTxtHelper );
SAFE_RELEASE(g_DepthState);
//g_Mesh11.Destroy();
//
//SAFE_RELEASE( g_pVertexLayout11 );
//SAFE_RELEASE( g_pVertexBuffer );
//SAFE_RELEASE( g_pIndexBuffer );
//SAFE_RELEASE( g_pVertexShader );
//SAFE_RELEASE( g_pPixelShader );
//SAFE_RELEASE( g_pSamLinear );
/* SAFE_RELEASE( g_pcbVSPerObject );
SAFE_RELEASE( g_pcbPSPerObject );
SAFE_RELEASE( g_pcbPSPerFrame );*/
}
开发者ID:AlexKLM,项目名称:DX11-Shader-Language-Coursework,代码行数:33,代码来源:BasicHLSL11.cpp
示例3: intersect
//! Intersect with a sphere, returning true if there is an intersection.
bool intersect(const sphere<Type>& s) const
{
const Type d1 = (s.getCenter() - m_center).sqrLength();
const Type d2 = m_radius + s.getRadius();
return (d1 < d2 * d2);
}
开发者ID:mojocorp,项目名称:gtl,代码行数:8,代码来源:sphere.hpp
示例4: if
bool bounding_box::contains(const sphere & sphere) const
{
const math::box & box = bounding_box::get_box();
const math::point & min = box.get_min();
const math::point & max = box.get_max();
float sq_dist = 0.f;
int matches = 0;
for (int i = 0; i < 3; i++)
{
float v = sphere.get_origin()[i];
if (v < min[i])
{
sq_dist += std::pow(min[i] - v, 2);
}
else if (v > max[i])
{
sq_dist += std::pow(v - max[i], 2);
}
else if (v >= min[i] + sphere.get_radius()
&& v <= max[i] - sphere.get_radius())
{
matches++;
}
}
return matches == 3;
}
开发者ID:levka17,项目名称:Engine-Editor,代码行数:30,代码来源:collision.cpp
示例5: sphere
sphere sphere::operator +(const sphere& other) const
{
glm::vec4 center = (c + other.getCenter()) * 0.5f;
float radius = glm::distance(c, center) + glm::max(r, other.getRadius());
return sphere(center, radius);
}
开发者ID:EddyGun,项目名称:Vulkan,代码行数:8,代码来源:sphere.cpp
示例6:
bool triangle<T,color_type>::intersects(const sphere<T,color_type>& s) const
{
// If any of the 3 corners is inside the sphere, the triangle intersects.
if (s.inside( plane<T,color_type>::get_origin()) ||
s.inside( plane<T,color_type>::get_origin() + plane<T,color_type>::get_u_vector()) ||
s.inside( plane<T,color_type>::get_origin() + plane<T,color_type>::get_v_vector()))
{
return true;
}
return false;
}
开发者ID:bartholomule,项目名称:amethyst,代码行数:11,代码来源:triangle.hpp
示例7: extendBy
//! Extend the boundaries of the sphere by the given sphere.
void extendBy(const sphere<Type>& sphere)
{
if (intersect(sphere))
return;
const vec3<Type> dir = (m_center - sphere.getCenter()).normalized();
const vec3<Type> p1 = m_center + m_radius * dir;
const vec3<Type> p2 = sphere.getCenter() - sphere.getRadius() * dir;
setPoles(p1, p2);
}
开发者ID:mojocorp,项目名称:gtl,代码行数:12,代码来源:sphere.hpp
示例8: shiftCtrlP
inline sphere<T,N> shiftCtrlP(const sphere<T,N>& a,
const vec<T,N>& mpos,
const vec<T,N>& mshift,
const vec<T,N>& mindim,
const uint8_t * mask)
{
if (mask) {
if (pnw::get_bit(*mask, 0)) { a.c() += mshift; }
if (pnw::get_bit(*mask, 1)) { a.r() -= dot(normalize(a.c() - mpos), mshift); }
}
return a;
}
开发者ID:,项目名称:,代码行数:12,代码来源:
示例9: intersects
bool bbox::intersects(const sphere& s) const
{
const vec3& center(s.center());
float radius(s.radius());
return ((center.x >= mn.x && (mn.x - center.x) <= radius) &&
(center.x <= mx.x && (center.x - mx.x) <= radius) &&
(center.y >= mn.y && (mn.y - center.y) <= radius) &&
(center.y <= mx.y && (center.y - mx.y) <= radius) &&
(center.z >= mn.z && (mn.z - center.z) <= radius) &&
(center.z <= mx.z && (center.z - mx.z) <= radius));
}
开发者ID:SergeyShatalov,项目名称:ssh,代码行数:12,代码来源:ssh_math.cpp
示例10: getRel
/*! Inverse Operation of \c sphere<T,N>_getSub(). */
inline sphere<T,N> getRel(const box<T,N>& a,
const sphere<T,N>& b)
{
auto ad = a.dim();
sphere<T,N> ba((b.c() - a.l()) / ad,
b.r() / pnw::mean(ad(0), ad(1), ad(2)));
if (ad(0) != ad(1) or
ad(1) != ad(2) or
ad(2) != ad(0)) {
PTODO("ad's components not all equal => may result in an ellipse\n");
}
return ba;
}
开发者ID:,项目名称:,代码行数:14,代码来源:
示例11: ad
/*! Inverse Operation of \c sphere<T,N>_getSub_box2f(). */
inline void
sphere<T,N>_getRel_box2f(const box2f& a,
const sphere<T,N>& b,
sphere<T,N>& ba)
{
vec2f ad; box2f_rdDim(a, &ad);
vec3f_set(&ba.c(),
(b.c()(0) - a.l(0)) / ad(0),
(b.c()(1) - a.l(1)) / ad(1),
b.c()(2)); /* z is ignored */
ba.r() = b.r() / mean(ad(0), ad(1));
if (ad(0) != ad(1)) {
PTODO("ad's components not all equal => may result in an ellipse\n");
}
}
开发者ID:,项目名称:,代码行数:16,代码来源:
示例12: isVisible
VkBool32 frustum::isVisible(const sphere& sphereWorld) const
{
float distance;
for (auto& currentSide : sidesWorld)
{
distance = currentSide.distance(sphereWorld.getCenter());
if (distance + sphereWorld.getRadius() < 0.0f)
{
return VK_FALSE;
}
}
return VK_TRUE;
}
开发者ID:YoutaVen,项目名称:Vulkan,代码行数:16,代码来源:frustum.cpp
示例13: extendBy
void
plane::
extendBy ( const sphere& sphereIn )
{
if ( !sphereIn.isEmpty() )
{
vec3 pos ( math::vec3::NoInit );
ValueType radius;
sphereIn.get ( pos, radius );
vec3 dir = normal;
dir.normalize ();
vec3 pt = pos + dir * radius;
extendBy ( pt );
pt = pos - dir * radius;
extendBy ( pt );
}
}
开发者ID:prwhite,项目名称:philibs,代码行数:17,代码来源:pniplane.cpp
示例14: intersect_sphere
hit_test intersect_sphere (ray r, sphere s)
{
hit_test result = {0};
v3 sc = s.center;
double sr = s.radius;
v3 a = v3_sub(r.origin, sc);
double b = v3_dot(a, r.direction);
double c = v3_dot(a, a) - (sr * sr);
double d = (b * b) - c;
double t = -b - sqrt(d);
result.miss = MISS;
if (d > 0 && t > 0) {
v3 intersection = ray_position(r, t);
result.miss = HIT;
result.t = t;
result.hit_point = intersection;
result.surf = s.surface_color(sc, intersection);
result.shine = s.shine;
result.surf_norm = v3_norm(v3_sub(intersection, sc));
}
return result;
}
开发者ID:nsetton,项目名称:Ray-Tracer-Project,代码行数:22,代码来源:intersect.c
示例15: extendBy
void
sphere::
extendBy ( const sphere& sphere )
{
if ( this == &sphere )
return; // no extend by self.
if ( sphere.isEmpty () )
return; // do nothing with empty spheres
if ( isEmpty () )
{
*this = sphere;
}
else
{
// this finds the vector seperating this and sphere and add to
// the length the radius of the other sphere to get a point on
// the far side of sphere... it then calls extendBy with the
// calculated point
vec3 diff ( sphere.center );
diff -= center;
ValueType diffLen = diff.length ();
diff /= diffLen;
diffLen += sphere.radius;
diff *= diffLen;
diff += center;
extendBy ( diff );
}
}
开发者ID:prwhite,项目名称:philibs,代码行数:37,代码来源:pnisphere.cpp
示例16: OnKeyboard
//--------------------------------------------------------------------------------------
// Handle key presses
//--------------------------------------------------------------------------------------
void CALLBACK OnKeyboard( UINT nChar, bool bKeyDown, bool bAltDown, void* pUserContext )
{
if( bKeyDown )
{
switch( nChar )
{
case VK_F1:
g_bShowHelp = !g_bShowHelp; break;
case 0x49://i
lightpos += D3DXVECTOR3(0,0,5);
lightsphere.move(lightpos);
break;
case 0x4B://k
lightpos += D3DXVECTOR3(0,0,-5);
lightsphere.move(lightpos);
break;
case 0x4A://j
lightpos += D3DXVECTOR3(-5,0,0);
lightsphere.move(lightpos);
break;
case 0x4C://l
lightpos += D3DXVECTOR3(5,0,0);
lightsphere.move(lightpos);
break;
case 0x55: //U
lightpos += D3DXVECTOR3(0,-5,0);
lightsphere.move(lightpos);
break;
case 0x4F://O
lightpos += D3DXVECTOR3(0,5,0);
lightsphere.move(lightpos);
break;
case 0x56://v
geo_alien.start_explode();
break;
case 0x20://spacebar
board1.change_screen();
deboard.change_screen();
break;
}
}
}
开发者ID:AlexKLM,项目名称:DX11-Shader-Language-Coursework,代码行数:45,代码来源:BasicHLSL11.cpp
示例17: bounding_volume
bounding_sphere::bounding_sphere(const sphere & sphere)
: bounding_volume(sphere.get_origin(), sphere.get_radius(), type::sphere)
{}
开发者ID:levka17,项目名称:Engine-Editor,代码行数:3,代码来源:collision.cpp
示例18: collide
hit::list plane::collide(const sphere& p) const {
return p.collide(*this);
}
开发者ID:Jorjor70,项目名称:meuh,代码行数:3,代码来源:primitive.cpp
示例19: OnD3D11FrameRender
//--------------------------------------------------------------------------------------
// Render the scene using the D3D11 device
//--------------------------------------------------------------------------------------
void CALLBACK OnD3D11FrameRender( ID3D11Device* pd3dDevice, ID3D11DeviceContext* pd3dImmediateContext, double fTime,
float fElapsedTime, void* pUserContext )
{
HRESULT hr;
// If the settings dialog is being shown, then render it instead of rendering the app's scene
if( g_D3DSettingsDlg.IsActive() )
{
g_D3DSettingsDlg.OnRender( fElapsedTime );
return;
}
//Render light arrow
D3DXMATRIX mView;
D3DXMATRIX mProj;
mProj = ( *g_Camera.GetProjMatrix() );
mView = ( *g_Camera.GetViewMatrix() );
D3DXCOLOR arrowColor = D3DXCOLOR( 1, 1, 0, 1 );
//hr = g_LightControl.OnRender11( arrowColor, &mView, &mProj, g_Camera.GetEyePt() );
FirePart.calculate_particle(pd3dDevice,pd3dImmediateContext,fElapsedTime,&g_Camera,&g_LightControl);
MissilePart.calculate_particle(pd3dDevice,pd3dImmediateContext,fElapsedTime,&g_Camera,&g_LightControl);
board1.RenderTexture(pd3dDevice,pd3dImmediateContext,fTime,fElapsedTime,pUserContext,&g_LightControl);
deboard.RenderTexture(pd3dDevice,pd3dImmediateContext,fTime,fElapsedTime,pUserContext,&g_LightControl);
// Clear the render target and depth stencil
float ClearColor[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
//ID3D11RenderTargetView* pRTV = DXUTGetD3D11RenderTargetView();
ID3D11RenderTargetView* pRTV = DXUTGetD3D11RenderTargetView();
pd3dImmediateContext->ClearRenderTargetView( rtv_render_to_texture_ori, ClearColor );
ID3D11DepthStencilView* pDSV = DXUTGetD3D11DepthStencilView();
pd3dImmediateContext->ClearDepthStencilView( pDSV, D3D11_CLEAR_DEPTH, 1.0, 0 );
pd3dImmediateContext->OMSetRenderTargets(1,&rtv_render_to_texture_ori,pDSV);
pd3dImmediateContext->OMSetDepthStencilState(NULL, 0);
sky.Render(pd3dDevice,pd3dImmediateContext,fTime,fElapsedTime,pUserContext,&g_Camera,lightpos);
lightsphere.Render(pd3dDevice,pd3dImmediateContext,fTime,fElapsedTime,pUserContext,&g_Camera,lightpos);
tessplane.Render(pd3dDevice,pd3dImmediateContext,fTime,fElapsedTime,pUserContext,&g_Camera,lightpos);
tesscube.Render(pd3dDevice,pd3dImmediateContext,fTime,fElapsedTime,pUserContext,&g_Camera,lightpos);
fuse.Render(pd3dDevice,pd3dImmediateContext,fTime,fElapsedTime,pUserContext,&g_Camera,&g_LightControl);
board1.Render(pd3dDevice,pd3dImmediateContext,fTime,fElapsedTime,pUserContext,&g_Camera,lightpos);
deboard.Render(pd3dDevice,pd3dImmediateContext,fTime,fElapsedTime,pUserContext,&g_Camera,lightpos);
test.Render(pd3dDevice,pd3dImmediateContext,fTime,fElapsedTime,pUserContext,&g_Camera,lightpos);
if(show_buildings)
{
buildings.Render(pd3dDevice,pd3dImmediateContext,fTime,fElapsedTime,pUserContext,&g_Camera,lightpos);
}
geo_alien.Render(pd3dDevice,pd3dImmediateContext,fTime,fElapsedTime,pUserContext,&g_Camera,lightpos);
FirePart.Render(pd3dDevice,pd3dImmediateContext,fTime,fElapsedTime,pUserContext,&g_Camera);
MissilePart.Render(pd3dDevice,pd3dImmediateContext,fTime,fElapsedTime,pUserContext,&g_Camera);
//ID3D11RenderTargetView* pRTV = DXUTGetD3D11RenderTargetView();
pd3dImmediateContext->OMSetDepthStencilState(NULL, 0);
pd3dImmediateContext->OMSetBlendState(NULL,NULL,0xffffffff);
//find bright spot
pd3dImmediateContext->ClearRenderTargetView( rtv_render_to_texture_1, ClearColor );
pDSV = DXUTGetD3D11DepthStencilView();
pd3dImmediateContext->ClearDepthStencilView( pDSV, D3D11_CLEAR_DEPTH, 1.0, 0 );
pd3dImmediateContext->OMSetRenderTargets(1,&rtv_render_to_texture_1,pDSV);
pd3dImmediateContext->VSSetShader( VSPPFirstPass, NULL, 0 );
pd3dImmediateContext->PSSetShader( PSPPFirstPass, NULL, 0 );
pd3dImmediateContext->HSSetShader( NULL, NULL, 0 );
pd3dImmediateContext->DSSetShader( NULL, NULL, 0 );
pd3dImmediateContext->GSSetShader( NULL, NULL, 0 );
pd3dImmediateContext->PSSetSamplers(0, 1, &g_pSamLinear);
pd3dImmediateContext->PSSetShaderResources(0,1,&sr_texture_original);
//pd3dImmediateContext->RSSetState( g_pRasterizerStateSolid );
pd3dImmediateContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
pd3dImmediateContext->Draw(9,0);
//blur hori
pd3dImmediateContext->ClearRenderTargetView( rtv_render_to_texture_2, ClearColor );
pDSV = DXUTGetD3D11DepthStencilView();
pd3dImmediateContext->ClearDepthStencilView( pDSV, D3D11_CLEAR_DEPTH, 1.0, 0 );
pd3dImmediateContext->OMSetRenderTargets(1,&rtv_render_to_texture_2,pDSV);
Compute_blur(1.0f / width, 0);
D3D11_MAPPED_SUBRESOURCE MappedResource;
V( pd3dImmediateContext->Map( blur_cb_buffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &MappedResource ) );
blur_cbuffer* pPerFrame = ( blur_cbuffer* )MappedResource.pData;
std::copy(&blur_cb_data.offset[0], &blur_cb_data.offset[15], pPerFrame->offset);
//std::copy(&blur_cb_data.offset[0], &blur_cb_data.offset[15], pPerFrame->offset);
//std::copy(&blur_cb_data.weight[0], &blur_cb_data.weight[15], pPerFrame->weight);
pd3dImmediateContext->Unmap( blur_cb_buffer, 0 );
pd3dImmediateContext->VSSetShader( VSPPBlur, NULL, 0 );
//.........这里部分代码省略.........
开发者ID:AlexKLM,项目名称:DX11-Shader-Language-Coursework,代码行数:101,代码来源:BasicHLSL11.cpp
示例20: OnD3D11CreateDevice
//--------------------------------------------------------------------------------------
// Create any D3D11 resources that aren't dependant on the back buffer
//--------------------------------------------------------------------------------------
HRESULT CALLBACK OnD3D11CreateDevice( ID3D11Device* pd3dDevice, const DXGI_SURFACE_DESC* pBackBufferSurfaceDesc,
void* pUserContext )
{
HRESULT hr;
ID3D11DeviceContext* pd3dImmediateContext = DXUTGetD3D11DeviceContext();
V_RETURN( g_DialogResourceManager.OnD3D11CreateDevice( pd3dDevice, pd3dImmediateContext ) );
V_RETURN( g_D3DSettingsDlg.OnD3D11CreateDevice( pd3dDevice ) );
g_pTxtHelper = new CDXUTTextHelper( pd3dDevice, pd3dImmediateContext, &g_DialogResourceManager, 15 );
// D3DXVECTOR3 vCenter( 0.25767413f, -28.503521f, 111.00689f );
FLOAT fObjectRadius = 378.15607f;
lightpos = D3DXVECTOR3(300,300,-200);
//test = new testing();
hr = test.setup(pd3dDevice,pBackBufferSurfaceDesc,pUserContext);
hr = tessplane.setup(pd3dDevice,pBackBufferSurfaceDesc,pUserContext);
hr = tesscube.setup(pd3dDevice,pBackBufferSurfaceDesc,pUserContext,80,D3DXVECTOR3(300,50,-200));//D3DXVECTOR3(300,50,-200
hr = lightsphere.setup(pd3dDevice,pBackBufferSurfaceDesc,pUserContext,10,lightpos);
hr = fuse.setup(pd3dDevice,pBackBufferSurfaceDesc,pUserContext);
hr = board1.setup(pd3dDevice,pBackBufferSurfaceDesc,pUserContext,D3DXVECTOR3(300,-300,-1000));
hr = deboard.setup(pd3dDevice,pBackBufferSurfaceDesc,pUserContext,D3DXVECTOR3(-300,-300,-1000));
hr = geo_alien.setup(pd3dDevice,pBackBufferSurfaceDesc,pUserContext);
hr = FirePart.setup(pd3dDevice,pBackBufferSurfaceDesc,pUserContext,80,0); //0 = fire
hr = sky.setup(pd3dDevice,pBackBufferSurfaceDesc,pUserContext,D3DXVECTOR3(0,0,0));
hr = buildings.setup(pd3dDevice,pBackBufferSurfaceDesc,pUserContext);
hr = MissilePart.setup(pd3dDevice,pBackBufferSurfaceDesc,pUserContext,20,1);
g_LightControl.SetRadius( 2000 );
// Setup the camera's view parameters
D3DXVECTOR3 vecEye( 0.0f, 50.0f, -1000.0f );
D3DXVECTOR3 vecAt ( 0.0f, 0.0f, -0.0f );
g_Camera.SetRotateButtons(true,false,false);
g_Camera.SetViewParams( &vecEye, &vecAt );
g_Camera.SetEnablePositionMovement( true );
g_Camera.SetScalers( 0.005f, 500.0f );
D3D11_DEPTH_STENCIL_DESC descDS;
ZeroMemory(&descDS, sizeof(descDS));
descDS.DepthEnable = false;
descDS.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL;
descDS.DepthFunc = D3D11_COMPARISON_LESS;
descDS.StencilEnable = FALSE;
hr = pd3dDevice->CreateDepthStencilState( &descDS, &g_DepthState);
//setup stuff for post process
ID3DBlob* pVertexShaderBuffer = NULL;
V_RETURN( CompileShaderFromFile( L"PP1.hlsl", "VS", "vs_4_0", &pVertexShaderBuffer ) );
ID3DBlob* pPixelShaderBuffer = NULL;
V_RETURN( CompileShaderFromFile( L"PP1.hlsl", "PS", "ps_4_0", &pPixelShaderBuffer ) );
V_RETURN( pd3dDevice->CreateVertexShader( pVertexShaderBuffer->GetBufferPointer(),
pVertexShaderBuffer->GetBufferSize(), NULL, &VSPPFirstPass ) );
DXUT_SetDebugName( VSPPFirstPass, "VSPost1" );
V_RETURN( pd3dDevice->CreatePixelShader( pPixelShaderBuffer->GetBufferPointer(),
pPixelShaderBuffer->GetBufferSize(), NULL, &PSPPFirstPass ) );
DXUT_SetDebugName( PSPPFirstPass, "PSPost1" );
pVertexShaderBuffer = NULL;
V_RETURN( CompileShaderFromFile( L"Gaussblur.hlsl", "VS", "vs_4_0", &pVertexShaderBuffer ) );
pPixelShaderBuffer = NULL;
V_RETURN( CompileShaderFromFile( L"Gaussblur.hlsl", "PS", "ps_4_0", &pPixelShaderBuffer ) );
V_RETURN( pd3dDevice->CreateVertexShader( pVertexShaderBuffer->GetBufferPointer(),
pVertexShaderBuffer->GetBufferSize(), NULL, &VSPPBlur ) );
DXUT_SetDebugName( VSPPBlur, "VSBlur" );
V_RETURN( pd3dDevice->CreatePixelShader( pPixelShaderBuffer->GetBufferPointer(),
pPixelShaderBuffer->GetBufferSize(), NULL, &PSPPBlur ) );
DXUT_SetDebugName( PSPPBlur, "PSBlur" );
pVertexShaderBuffer = NULL;
V_RETURN( CompileShaderFromFile( L"bloom_combine.hlsl", "VS", "vs_4_0", &pVertexShaderBuffer ) );
pPixelShaderBuffer = NULL;
V_RETURN( CompileShaderFromFile( L"bloom_combine.hlsl", "PS", "ps_4_0", &pPixelShaderBuffer ) );
V_RETURN( pd3dDevice->CreateVertexShader( pVertexShaderBuffer->GetBufferPointer(),
pVertexShaderBuffer->GetBufferSize(), NULL, &VSPPComb ) );
DXUT_SetDebugName( VSPPComb, "VSComb" );
V_RETURN( pd3dDevice->CreatePixelShader( pPixelShaderBuffer->GetBufferPointer(),
pPixelShaderBuffer->GetBufferSize(), NULL, &PSPPComb ) );
DXUT_SetDebugName( PSPPComb, "PSComb" );
//.........这里部分代码省略.........
开发者ID:AlexKLM,项目名称:DX11-Shader-Language-Coursework,代码行数:101,代码来源:BasicHLSL11.cpp
注:本文中的sphere类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论