Advertisement Jump to content
Sign in to follow this  
davidbillmanoy

Help Lighting with same prototype

This topic is 1821 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! All the tutorials in Direct3D C++ look different. I'm wondering if i want to use the same prototype. #include #include #include const char g_szClassName[] = "myWindowClass"; LPDIRECT3D9 d3d; // the pointer to our Direct3D interface LPDIRECT3DDEVICE9 d3ddev; // the pointer to the device class LPDIRECT3DVERTEXBUFFER9 v_buffer = NULL; // the pointer to the vertex buffer LPDIRECT3DINDEXBUFFER9 i_buffer = NULL; void initD3D(HWND hWnd); // sets up and initializes Direct3D void render_frame(void); // renders a single frame void cleanD3D(void); // closes Direct3D and releases memory void init_graphics(void); // 3D declarations void init_light(void); // sets up the light and the material struct CUSTOMVERTEX {FLOAT X, Y, Z; D3DVECTOR NORMAL;}; #define CUSTOMFVF (D3DFVF_XYZ | D3DFVF_NORMAL)

Share this post


Link to post
Share on other sites
Advertisement

Hm, this looks like the first part of one of the d3d tutorials from MS. 

 

All the tutorials in Direct3D C++ look different. I'm wondering if i want to use the same prototype.

Well they do different things so they cant all look alike. What exactly are you trying to do?

Edited by BloodyEpi

Share this post


Link to post
Share on other sites

Hm, this looks like the first part of one of the d3d tutorials from MS. 

 

All the tutorials in Direct3D C++ look different. I'm wondering if i want to use the same prototype.

Well they do different things so they cant all look alike. What exactly are you trying to do?

 

I guess he is asking if he can use the same template for different situations; probably initializing everything and this kind of thing you usually have to do...

 

Not sure though.

Share this post


Link to post
Share on other sites
 


Hm, this looks like the first part of one of the d3d tutorials from MS. 
 

All the tutorials in Direct3D C++ look different. I'm wondering if i want to use the same prototype.

Well they do different things so they cant all look alike. What exactly are you trying to do?
 
I guess he is asking if he can use the same template for different situations; probably initializing everything and this kind of thing you usually have to do...
 
Not sure though.
 
Im finding the tutorials that look like DirectXTutorials and i want to do Lighting and Textures.(for now)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!