Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Draw stars on top of everything else.
- if( mRenderStars )
- {
- // define mDots
- GFXVertexBufferHandle<GFXVertexPC> mDots;
- // create point-dots
- if( mDots.isNull() )
- {
- mDots.set(GFX, mNumStars, GFXBufferTypeStatic);
- U32 ndot = 0;
- mDots.lock();
- for(U32 i = 0; i < mNumStars; i++)
- {
- U32 myAlpha = (256 * mStarColors[i][3]) -1;
- mDots[i].color.set( 255, 255,255, myAlpha );
- mDots[i].point.x = mStarPoints[i][0];
- mDots[i].point.y = mStarPoints[i][1];
- mDots[i].point.z = mStarPoints[i][2];
- }
- mDots.unlock();
- }
- GFXStateBlockDesc dotdesc;
- dotdesc.setBlend(true, GFXBlendSrcAlpha, GFXBlendInvSrcAlpha);
- dotdesc.setCullMode( GFXCullNone );
- GFXStateBlockRef mDotSB = GFX->createStateBlock( dotdesc );
- GFX->setStateBlock(mDotSB);
- // draw the points.
- GFX->setVertexBuffer( mDots );
- GFX->drawPrimitive( GFXPointList, 0, mNumStars );
- }
- // <<< STARS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement