Jump to content
  • Advertisement

Thaligar

Member
  • Content count

    176
  • Joined

  • Last visited

Community Reputation

142 Neutral

About Thaligar

  • Rank
    Member
  1. Hi SuperVGA, try this vec4 cola; cola = textureLod(bltex[ texid ], position, 0.0).rgba; Regards tgar
  2. You are welcome. greets tgar
  3. You have not to modify the function header, but see CreateThread lpParameter is a pointer to whatever. So try to do this, hThread = CreateThread(NULL,0,StartThread,(LPVOID)&objNeedstoBAccessed,0,&dwGenericThread); and in the StartThread function try this DWORD WINAPI ThreadTest::StartThread(LPVOID iValue) { NeedstoBAccessed* pNtBA = (NeedstoBAccessed*)iValue; pNtBA->printValue(10); return 0; } this should work, but this is !! Not thread safe !! You should use some kind of mutex. greets tgar
  4. Hi Aburik, I have two ideas about that, 1.) pass a pointer to the NeedstoBAccessed to the StartThread function 2.) use messages to send the things you want to be done to the thread which should do them greets tgar
  5. Thaligar

    Image Compression [SOLVED]

    Uh... sorry for the late reply. Thanks for the answers. DXT I know, but the problem is I want do this in MFC. But for my OpenGL projects the DXT will be the best. I already found a source snippet which loads a jpeg directly into memory and decompresses it during redraw through a IStream object. Is there a way to load the jpeg as image but still hold it compressed in memory? Thanks again, greets tgar
  6. Hi, is there a way to hold an image compressed in memory and on the fly, during display, to uncompress it? Thanks in advance, tgar [Edited by - Thaligar on October 29, 2009 3:15:09 AM]
  7. Try to set the mass of your spaceship to something different then 0. Maybe this causes some of your calculations to become 0 too. I could be completely wrong but your initial speed is not changed because your scalarAcceleration becomes 0. greets tgar
  8. Thaligar

    Project Structure

    Actually the files stay the same, the classes are used in several places and won't change from project to project. Maybe laziness, because making a lib is basic knowledge. Thanks, tgar
  9. I am actually quite new to software development (3yrs) and I have a big question regarding the overall project structure and file distribution. I received a team member from another development team in our company as reinforcement (he has >6yrs dev experience (so much more than me)). The problem/question is, he always creates classes and put the source files into every project where he needs them. This means a copy of all class files in this project. My idea was to put it into a lib/dll to use it. Especially the synchronization is much easier. Because I can update the lib/dll code and all projects would receive the change. Am I wrong and will I understand this decision in the future?? (I actually always move the files then into a dll/lib to make my life easier, but this takes time)
  10. Thaligar

    Deindexing triangles

    What about this, struct TBNKey { int nTangent; int nBitangent; int nNormal; } // key structure struct VertexKey { int nVertexIndex; std::vector<int> vTextureIndicies; std::vector<TBNKey> vTBNIndicies; ... } then you should be prepared without too much hard coding and you can it adept as you wish best regards, tgar
  11. Thaligar

    Deindexing triangles

    Ok then... (in C++) // key structure struct VertexKey { int nVertexIndex; int nNormalIndex; int nTextureIndex; ... } // operator to compare bool operator==( const VertexKey & lhs, const VertexKey & rhs ) {...}; // definitions std::vector< VertexKey > vKeyList; std::vector< Vertex3f > vVertex; std::vector< Normal3f > vNormals; ... while( ColladaFileHasInfo() ) { VertexKey key; // get the indicies from the collada file GetVertexIndicies( key ); // check if this key is already in the list std::vector< VertexKey >::iterator it = vKeyList.find( key ); // in case that the key is not yet in the vector if( it != vKeyList.end() ) { Vertex3f v; Normal3f n; ... // get the real data for each element (vertex, normal...) // from the collada file v = ColladaFile.Vertex[ key.nVertexIndex ]; ... // repeat for the normal an so on vVertex.push_back( v ); vNormals.push_back( n ); ... // repeat // store the key for the next turn vKeyList.push_back( key ); } else { // handle the case when the vertex is already in the list }; }; This is not complete, but in the end you have all verticies uniquely stored in vectors. Additionally you should store the data for the triangles, or process them too. Best Regards, Tgar
  12. Thaligar

    Deindexing triangles

    Hi CableGuy, what file format do you use?? because normally you have something like this std::vector< vertex > vVertex; std::vector< normal > vNormals; std::vector< texcoord > vTexCoords; std::vector< int > vIndicies; and then you can reference every vertex/normal/texcoord combination by an int, but this means that at location 'i' in your vectors the correct vertx/normal/texcoord is written. Then you can say triangle 'X' consists from index '1' '5' and '10'. greets, tgar
  13. Thaligar

    Multiple FBO's

    Ok, 1.) when you clear the fbo1 texture, set alpha to 0.0. (Now the whole texture is transparent) 2.) in the shader were you draw the sphere render the sphere with alpha 1.0 (this sets the sphere in the texture to be fully opaque) 3.) now render the motion blur with some alpha value between 0.1 and 0.9 in the shader (some more or less transparent value) finally if you merge fbo1 to fbo2 (if this works as expected) the background should not overwrite anything previously generated (because it's fully transparent) the sphere will overwrite everything beneath it (fully opaque) and the motion blur will be softly merged with the whole scene. try and come back ;) greets, tgar
  14. Thaligar

    Multiple FBO's

    Actually this is only a guess, the texture which you generate has alpha all set to 1.0 or (transparent things should have 0.0)? you do also no alpha blending at all on your textures to merge them or? Looks like a pure overwrite when you copy fbo1 to fbo2. the background isn't automatically removed from your textures in the moment were you copy fbo1 to the fbo2. you have to blend them to get proper results. Otherwise you overwrite the color information of fbo2 with the one from fbo1, which seems to happen. try to do alpha blending on the textures and say if this solves your problem. greets, tgar
  15. Thaligar

    transform and rotate

    Hi giugio, use Quaternion, with these you can rotate around a single axis and afterwards convert it into a rotation matrix (or euler angles, whatever you prefer), this you then can use for your rotation. (Also the "games gems (1 or so)" should have a chapter about them) gamedev ref: quaternion greets, thaligar
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!