Du bist nicht angemeldet.

Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!

Werbeanzeige

1

27.12.2003, 15:55

kann jemand diesen fehler identifizieren?

könnt ihr euch vielleicht mal folgendes video anschauen

http://cyberpunk.sytes.net/~platzi/hilfe.zip

und mir dann sagen, woran diese komischen grafikfehler leigen könnten.?
ich mein zum einen das eine dreieck in der plane, das so grau wird
und die figur, die, obwohl keinerlei lighting vorhanden, ständig dunkler und
heller wird. beides sollte eigentlich am gleichen problem liegen.

ich hab echt null plan wie das zu stande kommt.

2

27.12.2003, 17:53

Treiberupdate.
Code!.


:huhu:
Do, ut des!
Ceterum censeo, carthaginem delendam esse

3

27.12.2003, 17:57

am treiber liegts sicher nicht, vorher gabs das problem auch nicht.

gut hier der render code.


Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    g_Main->ClearStates();
    g_Main->m_Device->SetFVF(D3DFVF_XYZ|D3DFVF_TEX1|D3DFVF_DIFFUSE|D3DFVF_NORMAL);
    g_Main->m_Device->SetTexture(0, g_TextureDB->GetTexture(1));
    g_Main->m_Device->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE);
    g_Main->m_Device->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
    g_Main->m_Device->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
    g_Main->m_Device->SetRenderState(D3DRS_CULLMODE, D3DCULL_CW);

    
    static DWORD frame = 0;
    static float count = 0;

    if (count < 1.0f)
    {
        count += 0.08f;         
    }
    else
    {
        count = 0;
        frame<m_subobjects[0].m_number_frames-1?frame++:frame=1;
    }


    DWORD frame2;
    if (frame >= 1)
        frame2 = frame-1;
    else
        frame2 = 0;
    
/// vector temp4;
    vertex temp[3]; 

#define index k==0?m_subobjects[i].m_faces[h].i1:(k==1?m_subobjects[i].m_faces[h].i2:m_subobjects[i].m_faces[h].i3)

    for(uint i =0; i<m_number_sub_objects; i++)
    {

        for(uint h=0; h<m_subobjects[i].m_number_faces; h++)
        {
        /*  if (frame <=0 || frame >= m_subobjects[i].m_number_frames || frame2 <= 0 || frame2 >= m_subobjects[i].m_number_frames)
                return;*/

            for(uint k=0; k<3; k++)
            {
                temp[k].diffuse = 0x80ffffff;
                temp[k].tex1 = m_subobjects[i].m_tex[index];
                temp[k].pos = m_subobjects[i].m_frames[frame].m_vertices[index];
            /*  temp4 = (m_subobjects[i].m_frames[frame].m_vertices[index]-m_subobjects[i].m_frames[frame2].m_vertices[index]);
                temp4 *= count;
                temp[k].pos += temp4;*/
            }

            g_Main->m_Device->DrawPrimitiveUP(D3DPT_TRIANGLELIST, 1, (char**)&temp, sizeof(vertex));
        }


    }

Werbeanzeige