Jump to content

  • Log In with Google      Sign In   
  • Create Account

Help Lighting with same prototype


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 davidbillmanoy   Members   -  Reputation: 88

Like
0Likes
Like

Posted 21 January 2014 - 05:14 PM

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)

Sponsor:

#2 BloodyEpi   Members   -  Reputation: 629

Like
0Likes
Like

Posted 22 January 2014 - 01:31 AM

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, 22 January 2014 - 04:30 AM.


#3 dejaime   Crossbones+   -  Reputation: 4027

Like
1Likes
Like

Posted 22 January 2014 - 11:46 AM

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.



#4 davidbillmanoy   Members   -  Reputation: 88

Like
0Likes
Like

Posted 22 January 2014 - 07:24 PM

 


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)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS