Stupid D3D/D3DX Problem
First off, I''d like to say I''m new at this, so please don''t critisize me for anything I say that isn''t correct.
Anyways, I was having a problem with creating a triangle with D3D/D3DX. Basically, the code goes like this...
--------------------------------
D3DLVERTEX GameShip[3];
GameShip[0] = D3DLVERTEX(D3DVECTOR(1.0f, 0.0f, 0.0f), RGB_MAKE( 0xff, 0x00, 0x00 ), 0, 1.0f, 0.0f);
GameShip[1] = D3DLVERTEX(D3DVECTOR(0.0f, 1.0f, 0.0f), RGB_MAKE( 0x00, 0xff, 0x00 ), 0, 0.0f, 1.0f);
GameShip[2] = D3DLVERTEX(D3DVECTOR(0.0f, 0.0f, 1.0f), RGB_MAKE( 0x00, 0x00, 0xff ), 0, 1.0f, 1.0f);
--------------------------------
I figured that should work, since it''s based from the trivfs example from microsoft. Anyways, when I tried to compile, it gave me this.
--------------------------------
Compiling...
objects.cpp
c:\dan\3dgame\objects.cpp(15) : error C2661: ''_D3DVECTOR::_D3DVECTOR'' : no overloaded function takes 3 parameters
c:\dan\3dgame\objects.cpp(15) : error C2661: ''_D3DLVERTEX::_D3DLVERTEX'' : no overloaded function takes 5 parameters
c:\dan\3dgame\objects.cpp(16) : error C2661: ''_D3DVECTOR::_D3DVECTOR'' : no overloaded function takes 3 parameters
c:\dan\3dgame\objects.cpp(16) : error C2661: ''_D3DLVERTEX::_D3DLVERTEX'' : no overloaded function takes 5 parameters
c:\dan\3dgame\objects.cpp(17) : error C2661: ''_D3DVECTOR::_D3DVECTOR'' : no overloaded function takes 3 parameters
c:\dan\3dgame\objects.cpp(17) : error C2661: ''_D3DLVERTEX::_D3DLVERTEX'' : no overloaded function takes 5 parameters
Error executing cl.exe.
--------------------------------
I''ve been working on this for a while now and I can''t seem to find out what''s wrong. It''s probably something really stupid, but I can''t seem to figure it out. If there''s anyone that can help, please reply.
Thank you for your time.
-Doddler
I had this bug too.
The fix is extremely weird.
Turn off Precompiled Headers.
It seemed to fix that problem for me.
The fix is extremely weird.
Turn off Precompiled Headers.
It seemed to fix that problem for me.
![](smile.gif)
Look in the SDK, under Direct3D\Direct3D Immediate Mode\Reference\Direct3D Immediate Mode C/C++ Reference\D3D_OVERLOADS
You need to define D3D_OVERLOADS before you include any files: eg.
#define D3D_OVERLOADS
#include "d3d.h"
#include "d3dx.h"
Edited by - Ranok on 2/13/00 11:20:45 AM
#define D3D_OVERLOADS
#include "d3d.h"
#include "d3dx.h"
Edited by - Ranok on 2/13/00 11:20:45 AM
---Ranok---
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement