• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
游戏编程
记录我的游戏编程之路
博客园 首页 新随笔 联系 订阅 订阅 管理

2011年12月13日

一个简单的Shader
摘要: 看了MS.Press.DirectX.9.Programmable.Graphics.Pipeline这书。开启Shader之路吧。#include <Windows.h>#include <d3dx9.h>#include <MMSystem.h>#define SAFE_RELEASE(p) {if(p){p->Release();p=NULL;}}#define SAFE_DELETE(p) {if(p){delete p;p=NULL;}}#define SAFE_DELETE_ARRAY(p) {if(p){delete [](p);p=NU 阅读全文
posted @ 2011-12-13 17:38 sunstar1989 阅读(615) 评论(0) 推荐(0)
 
模型的同名材质冲突检测
摘要: #include <Ogre.h>using namespace Ogre;#include "OgreDefaultHardwareBufferManager.h"DefaultHardwareBufferManager* bufferManager = 0;std::ofstream outfile;int index = 0;class MyReGroupListener:public ResourceGroupListener{public: void resourceGroupScriptingStarted(const String& gro 阅读全文
posted @ 2011-12-13 16:26 sunstar1989 阅读(462) 评论(0) 推荐(0)
 
一个简单的DX的例子
摘要: 编辑器加载中#include <Windows.h>#include <d3dx9.h>#include <MMSystem.h>LPDIRECT3D9 g_pD3D;LPDIRECT3DDEVICE9 g_pd3dDevice;LPDIRECT3DVERTEXBUFFER9 g_pVB;struct CUSTOMVERTEX{ FLOAT x, y, z; DWORD color;};#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ|D3DFVF_DIFFUSE)HRESULT InitObject(){ CUSTOMVERT 阅读全文
posted @ 2011-12-13 15:24 sunstar1989 阅读(728) 评论(0) 推荐(0)
 
随机生成路径(二)
摘要: 对上一个版本更改了一下,使得原动作可以自定义。#baseAnimation.pyimport math#define world directionDir_Up, Dir_Right, Dir_Down, Dir_Left = range(0, 4)#define move direction to localMove_Left, Move_Forward, Move_Right = range(-1, 2)class BaseAnimation: def __init__(self, move_dir, v_step, h_step): #定义动作的横向和纵向跨度 ... 阅读全文
posted @ 2011-12-13 10:22 sunstar1989 阅读(1050) 评论(0) 推荐(0)
 
MFC+Flash图片浏览器
摘要: import flash.events.Event;import flash.display.MovieClip;import flash.events.MouseEvent;import flash.events.ContextMenuEvent;import flash.display.Loader;import fl.motion.MatrixTransformer;import flash.display.Sprite;import flash.display.Shape;import flash.system.LoaderContext;import flash.display.Di 阅读全文
posted @ 2011-12-13 09:53 sunstar1989 阅读(1107) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3