Jump to content
  • Advertisement

leandro

Member
  • Content Count

    17
  • Joined

  • Last visited

Community Reputation

122 Neutral

About leandro

  • Rank
    Member
  1. Happy New year to everyone! I'm trying to use Xiph OggVorbis Library for decoding and OpenAL for playback. However when I do the first call to the OggVorbis library, (ov_open(FILE *, ...) ) the program crashes: "oggvorbis.exe caused blablabla on ntdll.dll (or kernel32.dll if win98)". I don't think it's a problem of my code because I also compiled some programs from the internet (from dev-master, gamedev.net, etc.) and I had the same problem. I rather think it's a S.O. + OggVorbis Library + compiler problem, or something like that. I'm using MSVC 6.0, Win98 or WinXP, OggVorbis 1.0 Please Help!!!
  2. How is alfa blending done in Nehe OpenGL Lesson 44 (Lens Flares)? In that tutorial only bmps are used as textures, however the flares have transparency. How??? Does bmps have an alfa channel? I converted these images to png (wich I load throught libpng) and there is no alfa. So how do I do blending?
  3. I messed it up putting the cout << *it after the item removal as this is not problem I'm facing. Bad example, the cout should be before the removal. The real problem I'm asking about is deleting an element pointed by an iterator which is used to traverse the list. However, thanks a lot for the replies as they apply anyway. Heres my new loop: list<char>::iterator it = lista.begin(); do { if(*it == '-') { it++; lista.remove('f'); } else { cout << *it; it++; } } while(it != lista.end()); is there anything cleaner?
  4. Quote:Original post by Oluseyi Quote:Original post by leandro I'm having trouble with stl's lists (or std::list). The following piece of code crashes at runtime. It seems to be the iterator is out of date after the remove('f') so when doing it++: crash.Iterators to removed elements are out of date. You need to store a temporary iterator pointed to the next element before calling remove. This is why erase exists: for(; it != seqEnd; ++it) { if(<conditional>) it = list.erase(it); } What's the difference between erase and remove... or can you direct me to some source of information about that? Thanks for the tip.
  5. I'm having trouble with stl's lists (or std::list). The following piece of code crashes at runtime. It seems to be the iterator is out of date after the remove('f') so when doing it++: crash. list <char> lista; lista.push_back('a'); lista.push_back('b'); lista.push_back('c'); lista.push_back('d'); lista.push_back('e'); lista.push_back('f'); lista.push_back('g'); lista.push_back('h'); for(list<char>::iterator it = lista.begin(); it != lista.end(); it++) { if(*it == 'f') lista.remove('f'); cout << *it; } Is there a way to delete an object from a list on wich I'm iterating at the same time? What's the right way to do it? P.D. How do I insert tags for code, etc.? [Edit: Take a look at the site FAQ. For inline monospaced text, use the <tt> HTML element. - Oluseyi]
  6. leandro

    MaxScript transforms

    Ups, that was me but forgot to logg-in.
  7. Hello, I'm trying to write a 3DSMax MaxScript exporter to save to a custom format geometry, keyframes, material and hierarchies. I had no problems with geometry, materials and keyframes but I messed it up with hierarchies. I can build the hierarchy but when I add keyframes to it translations rotations and/or scales looks wrong. I've tryied to work out the offset transform, etc. that 3DXMax uses for transforms, but I couldn't get anything. Can anyone tell me how to proper manipulate the transforms of objects without messing the hierarchies relative position, transformations, etc. I need the transforms in object space, but it would be good to know how to get them in world, etc. spaces. Also, how do I transform left-handed rotations to right-handed (Or is it the other way about? I don't remember right now, but I want to use OpenGL). Thanks a lot.
  8. Hello, I'm trying to write a 3DSMax MaxScript exporter to save to a custom format geometry, keyframes, material and hierarchies. I had no problems with geometry, materials and keyframes but I messed it up with hierarchies. I can build the hierarchy but when I add keyframes to it translations rotations and/or scales looks wrong. I've tryied to work out the offset transform, etc. that 3DXMax uses for transforms, but I couldn't get anything. Can anyone tell me how to proper manipulate the transforms of objects without messing the hierarchies relative position, transformations, etc. I need the transforms in object space, but it would be good to know how to get them in world, etc. spaces. Also, how do I transform left-handed rotations to right-handed (Or is it the other way about? I don't remember right now, but I want to use OpenGL). Thanks a lot.
  • Advertisement
×

Important Information

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

GameDev.net 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!