Using the following code:
typedef struct
{
FLOAT x, y, z; // Coordinates
D3DCOLOR dif; // Diffuse color
} sVertex;
sVertex Verts[4] = {
{-100.0f, 100.0f, 100.0f, D3DCOLOR_RGBA(2 55, 255, 255, 255)},
{100.0f, 100.0f, 100.0f, D3DCOLOR_RGBA(2 55, 0, 0, 255)},
{100.0f, -100.0f, 100.0f, D3DCOLOR_RGBA(0 , 255, 0, 255)},
{-100.0f, -100.0f, 100.0f, D3DCOLOR_RGBA(0 , 0, 255, 255)}
};
// Copy local vertices into vertex buffer
memcpy(g_pPtr, Verts, sizeof(Verts));
// Unlock the vertex buffer
if (FAILED(g_pD3DV B->Unlock()))
{
AppError(true, "Init Failure: Unlock()");
}
When you make the call during the if statement: g_pD3DVB-> the
intellisense stops working. However in a brief personal debug of
intellisense stopping to work I found the following bits of information
handy:
If I remove the D3DCOLOR from the structure and from the definition of
Verts[4] making it Verts[3], Intellisense works again. Shown here is
the new code:
typedef struct
{
FLOAT x, y, z; // Coordinates
} sVertex;
sVertex Verts[3] = {
{-100.0f, 100.0f, 100.0f},
{100.0f, 100.0f, 100.0f},
{100.0f, -100.0f, 100.0f},
{-100.0f, -100.0f, 100.0f}
};
// Copy local vertices into vertex buffer
memcpy(g_pPtr, Verts, sizeof(Verts));
// Unlock the vertex buffer
if (FAILED(g_pD3DV B->Unlock()))
{
AppError(true, "Init Failure: Unlock()");
}
Something during the specific definition of Verts[4] and more
specifically with the D3DCOLOR_RGBA() causes Intellisense to stop
working. Anybody know if there is a known qualm with DirectX causing
Intellisense to hang on those function calls inside the definition? Or
more so just the fact that I am placing a function call inside a
definition?
- Charlie "Zychrias"