- 博客(12)
- 资源 (7)
- 收藏
- 关注
原创 RPC远程过程调用编程练习
1.首先使用uuidgen工具($(VS)/Common7/Tools)生成idl接口文件 uuidgen /i /ohello.idl 注意"/o"和文件名之间没有空白!2.然后打开生成的接口文件,在里面添加接口[uuid(d1717d33-8e03-456c-a79b-57fc212f5042),version(1.0),pointer_default
2009-05-16 23:33:00
1668
原创 使用rand()生成一定范围内的随机小数
#include #include #include using namespace std;float GetRand( float fMin, float fMax ){ assert( fMax > fMin ); float fRand=0.f, f1=0.f; int n; //存(fMax-fMin)的整数部分 float f; //存(
2008-07-18 15:25:00
11366
1
原创 练习使用C++函数模板
#include #include using namespace std;//删除指针template void SafeDelete(T& t){ delete t; t = 0; }//删除数组指针template void SafeDeleteArray(T& t){
2008-07-11 14:56:00
861
原创 DirectX 多流 + HLSL
刚写的一个小程序用HLSL渲染简单三角形,代码如下:frame.fxfloat4x4 matWorldViewProj : WVP;struct vertexshader_input{ float4 position : POSITION; float4 diffuse : COLOR0;};struct vertex
2008-06-14 16:04:00
1452
原创 窗口模式与全屏模式切换,创建全屏窗口
HWND m_hWnd;RECT m_WndRect;LONG m_Style;enum WINDOW_SHOW...{ WINDOW_FULLSCREEN, WINDOW_800_600, WINDOW_1024_768};WINDOW_SHOW m_eWndShow;m_eWndShow = WINDOW_800_600;//创建主窗口HWND hWnd;hWnd = C
2008-05-10 18:19:00
3852
原创 Direct3D中的MipMap(多级惭近纹理过滤)
//载入纹理,从一张纹理图形中生成多级纹理if ( FAILED( D3DXCreateTextureFromFileEx( m_pDevice, //D3D设备指针 lpszTexture, //图形文件路径与文件名 0, 0, //指定纹理宽,高.设为0表示图形大小 0, //指定渐进纹理序列级数,0表示尽可能多的生成纹理过滤级数 0, //纹理使用方式
2008-05-09 12:28:00
2510
转载 DirectX SDK 与 DirectShow SDK
DirectX SDK 多媒体编程环境DirectShow Windows媒体捕捉与播放编程环境今天开始要进行一些视频方面的开发,于是到Microsoft网站去下了个最新的DirectX SDK包,但是在使用中发现里面好像比以前少了些东东。于是Baidu了一下,解释曰:DirectShow SDK已经从DirectX SDK包中分离出来,以DirectX Extras的方式发布。后来Dir
2008-04-15 16:43:00
1601
1
原创 连连看消除算法
//连连看消除算法:(以具有7行8列的连连看为例)//根据传入的两个点和BOOL型的二维数组mbGrid[9][10] (TRUE代表有图片,FALSE代表无图片)//如果两点可以消去函数返回TRUE,否则返回FALSEBOOL CGameLogic::RemoveAble(int x1, int y1, int x2, int y2)...{ int i,j,k=0;
2008-04-06 00:40:00
2722
原创 求一个整数的位数并将各个位上的数字储存到一个数组中
//求一个整数的位数并将各个位上的数字储存到一个数组中#include iostream>using namespace std;//计算一个整数的位数int countNum(int n)...{ int nNum = 0; while (n>0) ...{ nNum++; n = n/10; } return nNum;}//将各个
2008-03-16 17:40:00
3960
原创 C++链表和类的综合应用
老师给我们留的一个作业,要求把链表封装成一个类。花了几个小时完成后,现在贴出来。。。list.h //list.h#include "iostream"using namespace std;struct NODE ...{ unsigned long uID; char strName[16]; NODE *next;};class cList...{publi
2008-03-05 21:54:00
8585
2
原创 C++链表使用完整代码
/**//* 练习使用链表:创建链表、遍历链表、查找节点、添加节点、删除节点*/#include "stdio.h"#include "string.h"#include "assert.h"#include "stdlib.h"#include "windows.h"#define COUNT 3//定义一个节点结构体struct NODE...{ unsigned lon
2008-03-01 00:29:00
74733
17
HLSL初级教程 显卡编程
2009-02-09
ExtremeTech 3D Pipeline Tutoria (3D 流水线)
2009-02-08
基于LOD的大规模真实感室外场景实时渲染技术的初步研究
2009-02-07
Direct3D9初级教程
2009-02-07
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人