Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About Jaapio

  • Rank
  1. What does your videocard need to have for geometyr shaders? My video card's does not support glProgramParameteriEXT...
  2. Thanks a lot, that is exactly what I was looking for!
  3. Hello, For school we have to build a game for a embedded device(a phone, proberatly emulated too), I want to do a simple street fighter clone with atleast a simple 3D environment, the characters can be sprites. My question is, are there any good and free libraries for 3D rendering? Can I just use openES? I tried googling it but I came up with just a slow flat rastirizer. Jaap.
  4. Jaapio

    [web] Need some help!

    Come on Loel, everyone knows that is a distributed modular checksum recomposer.(Duh). It looks like your ray packers are off, try checking the bit alignment, that should get it working. :D
  5. Well I just found out that it isn't because I'm using multiple buffers. I put everything into one buffer and still the result is the same. On to the harder part.
  6. Hi, I am trying to render a mesh using two buffers, one of the vertexes the other for the uv coords. This is my code but as you can see in the image, it does not work. Could it be that directx uses texture coords in another way that openGL does because the mesh does look normal in openGL. Or am I forgetting something? Here is the draw code. LPDIRECT3DVERTEXBUFFER9 Vertex_Buffer; LPDIRECT3DVERTEXBUFFER9 Coord_Buffer; LPDIRECT3DVERTEXDECLARATION9 VertexDeclaration = NULL; for(uint i=0; i<NumSubMeshes; i++) { uint vertexsize = SubMeshes.VertexCount*sizeof(CVector3); uint coordsize = SubMeshes.VertexCount*sizeof(CTexCoord); // Create buffer if(FAILED(gEngine.pDirect3DDevice->CreateVertexBuffer(vertexsize, 0, 0, D3DPOOL_DEFAULT, &Vertex_Buffer, NULL))) { MessageBox(NULL, L"CreateVertexBuffer", L"Vertex_Buffer", MB_OK); return; } // Lock CVector3 *Vertices; // Lock the buffer we can write to it. if(FAILED(Vertex_Buffer->Lock(0, vertexsize, (void**)&Vertices, 0))) { MessageBox(NULL, L"Lock", L"Vertex_Buffer", MB_OK); return; } // Here we copy the square's data into the vertex buffer. memcpy(Vertices, SubMeshes.Vertexes, vertexsize); // Unlock when your done coping data into the buffer. if(FAILED(Vertex_Buffer->Unlock())) { MessageBox(NULL, L"Lock", L"Vertex_Buffer", MB_OK); return; } // Create buffer if(FAILED(gEngine.pDirect3DDevice->CreateVertexBuffer(coordsize, 0, 0, D3DPOOL_DEFAULT, &Coord_Buffer, NULL))) { MessageBox(NULL, L"CreateVertexBuffer", L"Coord_Buffer", MB_OK); return; } // Lock CTexCoord *pCoords; // Lock the buffer we can write to it. if(FAILED(Coord_Buffer->Lock(0, coordsize, (void**)&pCoords, 0))) { MessageBox(NULL, L"Lock", L"Coord_Buffer", MB_OK); return; } // Here we copy the square's data into the vertex buffer. memcpy(pCoords, SubMeshes.UVs, coordsize); // Unlock when your done coping data into the buffer. if(FAILED(Coord_Buffer->Unlock())) { MessageBox(NULL, L"Unlock", L"Coord_Buffer", MB_OK); return; } //Declare D3DVERTEXELEMENT9 Declaration[] = { {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, {1, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, D3DDECL_END() }; // Create the vertex declaration so DirectX knows how our vertex is made up. if(FAILED(gEngine.pDirect3DDevice->CreateVertexDeclaration(Declaration, &VertexDeclaration))) { MessageBox(NULL, L"CreateVertexDeclaration", L"", MB_OK); return; } if(!VertexDeclaration) { MessageBox(NULL, L"!VertexDeclaration", L"", MB_OK); return; } //Set the stream sources if(FAILED(gEngine.pDirect3DDevice->SetStreamSource(0, Vertex_Buffer, 0, sizeof(CVector3)))) { MessageBox(NULL, L"SetStreamSource", L"Vertex_Buffer", MB_OK); return; } if(FAILED(gEngine.pDirect3DDevice->SetStreamSource(1, Coord_Buffer, 0, sizeof(CTexCoord)))) { MessageBox(NULL, L"SetStreamSource", L"Coord_Buffer", MB_OK); return; } // Set the vertex stream declaration. if(FAILED(gEngine.pDirect3DDevice->SetVertexDeclaration(VertexDeclaration))) { MessageBox(NULL, L"SetVertexDeclaration", L"", MB_OK); return; } HRESULT r = gEngine.pDirect3DDevice->DrawPrimitive(D3DPT_TRIANGLELIST, 0, SubMeshes.VertexCount/3); if(FAILED(r)) { LPWSTR t = (LPWSTR)malloc(512); wsprintfW(t, L"Error %u", r); MessageBox(NULL, t, L"DrawPrimitive", MB_OK); delete []t; return; } VertexDeclaration->Release(); Vertex_Buffer->Release(); Coord_Buffer->Release(); }
  7. Jaapio

    Code monkey(video)!

    Just ran into this funny video. and remember, Code monkey like you!
  8. Quote:Original post by Anonymous Poster How are you communicating with this other application? Sockets? Windows messages? via DLL? Memory mapped files? It sounds like whatever process you are using to get these Textures isn't giving you valid memory behind your pointer. You might want to start looking at the system that passes you these created textures for flaws. I have a dll called d3d8.dll Which is loaded by the application as if it is the real d3d8 dll. I found out what the problem was, it turns out that the textures where released. But I found a workaround...
  9. Quote:Original post by MaulingMonkey This is incorrect for 99.999% of projects in your situation. The 0.001% that this would hold for would have programmers that already knew of SEH exceptions and their ilk, and wouldn't be anything that would use DirectX, and would definately use assert on top of SEH exception handlers. You're trying to patch the symptom, not the problem, and it's bound to fail horribly. Than how do you suppose I should check if Texture has been released? No I cant write a layer over that interface, I tried it but it blew up in my face.
  10. Quote:Original post by RogalDorn Dear Jaapio, I must agree with the others and say that it definitely is NOT a fault in your vfptr table. Those tables just work. The algorithms behind those tables were written by people who validated and debugged their code thousands of times before releasing it. What I think is that your texture is not a valid Direct3DTexture8! Have you checked the return codes of DirectX when creating the texture? It happened to me once that I got a pointer returned when creating a texture object BUT the return code told me that the function failed! Basically what I want to say is, check the error codes you get from DirectX and try to find out if any function failed. The vfptr table won't be bugged nor could you do anything about it if it was bugged. Merry christmas y'all :) Jan The problem is that I dont create the texture myself, that is done by an other application which is not writen by me. I dont have a way to check if the Texture has been released which is the problem right now.
  11. Thanks for the help, the but actually size of the v-table is know. I check what I know how to check, but I dont know a way to check if Texture has been released. Ill post the full code soon.
  12. Meaning assert is quite useless since my application is between 2 other application which sure as hell no debug versions (DirectX and an random chosen app). So I readlly need to find some way to check if the v-table.
  13. Quote:Original post by Lajnold Quote:Original post by Jaapio Assert??? (sounding like a complete idiot) Sorry I have never heard of that term? #include <cassert> assert(ptr != 0); For as far as I can see now assert is ugly. If the term evaluates false you get an ugly dialogbox. No thanks Id rather check with an if statement.
  14. Quote:Original post by Enigma I don't think your problem has anything to do with the vtable pointer. You have a default constructor which doesn't initialise any of the member variables. Odds are that you're calling this constructor, thus leaving Texture in an undefined state, and then trying to call SaveTextureToBitmap and dereferencing the invalid pointer. As to exceptions, you're catching all possible C++ exceptions. But the exception you're getting is an OS exception, not a C++ one. Σnigma There must be a way to catch those exceptions too. I mean the watch does not explode when I have it evaluate a something invalid.
  15. Jaapio


    Oh for those of you who where interested in downloading dxIntercept. Dont bother the server is down. Luckely it is at school so Id might be able to kick it back online when I am at school tomorrow.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!