Jump to content
  • Advertisement

Desperado

Member
  • Content count

    133
  • Joined

  • Last visited

Community Reputation

170 Neutral

About Desperado

  • Rank
    Member
  1. Good evening,   I have been tasked to do the following:   I'm supposed to write an "interceptor"  library for OpenGL. That means, I'm supposed to write a shared library that imports the opengl headers and libraries and wraps around their functions. Then the shared library exposes the wrapping functions which are supposed to look exactly the same as the original functions so they can take their place in existing code. So basically I'm implementing an OpenGL lib that internally uses the original opengl lib.   For example the library shall expose a glBufferData function with the original signature. This function internally calls a wrapper function which itself calls the original glBufferData from the OpenGL API.   My problem with this is that it basically means that within the library you have a set of functions with the same name in the same global namespace (the original gl functions and their respective wrapper functions). I'm not allowed to put the exposed functions into a namespace so the api users do not have to change their code.   Any ideas on how to solve this problem?   Regards
  2. Desperado

    Virtual Texture useful for this?

      What do you mean with discontinuities? Every building has only one texture and it is already rectangular.
  3. Desperado

    Virtual Texture useful for this?

    So would it be more efficient to blit the downscaled textures to an atlas or should I just enable standard mipmapping and hope that opengl moves them into memory efficiently?
  4. Desperado

    Virtual Texture useful for this?

    So my current plan is to create a large texture atlas (2048 x 2048) that consists of 128x128 tiles where each tile contains the low res texture of a landmark. For landmarks close to the camera I will use the individual high res textures.   Can someone sum up for me why Virtual Texture would be overkill in this situation?
  5. Good evening,   I have to render a landscape with terrain and lots of buildings in it. Some of them are landmarks. A landmark is a building with a texture. Usually, there are relatively (compared to the overall buildings) few landmarks on screen and they are far apart, but they tend to have textures with high resolution. I have to code for a system where video memory is a concern and where only around 30 MB would be available for the landmarks textures at a time. With potentially dozens of landmarks on screen at a time and texture sizes in the mb range, this is a problem. My question is now what the most appropriate technique would be for me to keep texture memory usage low. My first thought would be something like Virtual texturing / Megatexture but is this really necessary if the landmarks are so sparsely distributed or would some simple customized mipmapping scheme be more appropriate?   Thanks for any suggestions.
  6.   Wrap all the calls to the renderer with functions that sleep on condition variables, wake up the conditions in the callbacks, and then deal with the consequences. It might be too slow, but you were asked to do this for some reason, and that uses as much of the existing code as possible.     You mean using pthread_cond_wait and pthread_cond_signal? May be an option if the client code is not performance critical. Thanks for starters!
  7. Hello folks,   I have "inherited" a rendering API that currently works with a request-response mechanism. The client calls a method from the interface (client thread) which posts an event in a queue. The queue is processed by a separate thread (processing thread) that creates and executes render commands from it. The result of these commands is posted to another queue that is processed by another thread which send the data to the client through the interface by callback. Now I'm supposed to implement a different interface using as much of the existing codebase as possible. The new interface however has methods that are supposed to return the result of the methods immediately. That means, certain parts of the processing thread would have to be called synchronously. This wouldn't be a problem, I could make it so that the client gets to call the relevant parts of the processing thread synchronously then hand over the result to the processing thread by mutex.  However, since that means that the client thread would work with the processing threads resources directly chances are the processing thread gets blocked for a long time. Since the old inerface enabled the client to submit an unspecified number of commands to the processing thread before something is done this becomes even more likely.   Do you have design recommendations on how to solve this problem best?   Regards
  8. Hello folks,   I'm looking for a minimal demo of texture (not geometry) clipmaps with sourcecode, best would be c++ with opengl.   Can you help me out?   Regards
  9. Is there a simple mathematical formula that can convert the indexes of a inorder search to a breadth first search?
  10. I think it would be pretty much equivalent of a conversion from an in-order walk of a corresponding binary search tree converted to a breadth first search but I wonder if there is a fast existing implementation for that.
  11. Hello,   I want to resort a set so that it becomes equal to a walkthrough of the set where every step is position wise as far away as possible from the element already visited. Say for example, I have a sorted set of 5 Elements from A to E:   ( A, B, C, D, E )   The first element I want to visit is A. Then I want to visit the element as far away as possible from the first element, that means E. From A and E, the farthest Element is C which I want to visit next. B and D are equally far away from A, C and E so they are both last. So the resorted set would be:   (A, E, C, B, D) or (A, E, C, D, B)   The largest possible set size is probably around 100.   How can this be done?   Regards!
  12. Desperado

    Cache coherence and containers

    I do not operate on the vector while I work with the map.
  13. Desperado

    Cache coherence and containers

    The vector is basically my input set. The map is used to store pointers because a) fast find b) one entry from the vector can be referenced multiple times and I can reference othe stuff from different sources c) I can insert more entries into the map while walkthrough. This is why fast_map isn't an option for me as it invalidates the iterator at insertion. My next thought would be to use a sorted vector for the base set and a map only for the new entries, then look which container has the next element according to my sorting criterion.   Is std::sort the best thing for sorting a vector?
  14. Desperado

    Cache coherence and containers

    This was just for example. The actual map looks somewhat like this:   std::map< double, SomeStructIMade* > mymap; std::vector< SomeStructIMade > myvector;   I need the sorting and fast insertion/deletion from the map, that's why I use it. I iterate over the values in the map and access the pointers from that and during walkthrough I may insert new key/value pairs into the map.
  15. Desperado

    Cache coherence and containers

    I need to add more elements to the map that are not in the vector.
  • 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!