Jump to content
  • Advertisement

Absolution

Member
  • Content count

    160
  • Joined

  • Last visited

Community Reputation

180 Neutral

About Absolution

  • Rank
    Member
  1. Absolution

    A little bit about design

    Quote:Ew, why? You're making a model viewer, not a rendering API abstraction. Why not just pick one API and use that? It's a huge waste of time to support others. Because it won't be just for me and I have no guarantees that everybody will have the same rendering API installed or the appropriate version.
  2. I'm designing a model viewer type application (standard 4 view split window) in MFC. I was wondering how people approach modeling this viewer to allow for different renderer APIs to be used. I.e., I want to be able to use OpenGL, DirectX, software, WinAPI, etc... with as little hassle as possible. What I've been thinking about is having an abstract view interface, which I can then use to define any kind of view of the document data that I like. These views will then use a display interface to do the drawing. This display interface will basically be implemented for each type of renderer I want to use. The appropriate display implementation will then be supplied by a factory class, which will select the appropriate implementation depending on the compatibility and user specifications. In this way, I insulate my view classes from the display and can make changes to my display functions for each renderer without recompiling the views. I can also add as many display implementations as I like with little hassle. How have you implemented this design in the past? Also, I know MFC is a bit old school now, but I'm familiar with it. What are you guys using these days for tool/viewer design?
  3. Absolution

    Text search algorithm?

    I think what you want is a suffix tree: Suffix Tree
  4. What books would your recommend for object oriented design? If you had to pick one what would it be? Thanks
  5. I think what you want to do is process the WM_MOUSEACTIVATE message. If you return a value of MA_NOACTIVATE the window will not be activated and the mouse message will not be discarded. Also, look into WM_ACTIVATE.
  6. Where is your constructor? Your erase function is throwing memory access violations. I'm guessing it is because first and last have not been initialized to anything so when you do temp!=last, last could be pointing anywhere.
  7. Absolution

    Is NULL's Definition Standard

    NULL isn't standard. NULL is a macro for 0 in C. The null pointer is 0 and always should be.
  8. Absolution

    Application development.

    For tools I've used Java and MFC in the past. I usually go with MFC when I want to use OpenGL. Most people don't seem to like MFC anymore though. What are the alternatives now though? I don't know C#, but I suppose I could use C++/CLI and windows forms. That doesn't support document view though, although I could just write my own. There is also wxWidgets that looks interesting. You can develop in just about any language you like and it's cross platform.
  9. I don't think this is restricted to namespaces. It seems to be a problem when you use two levels of resolution or two levels of pointers. For example, IntelliSense doesn't work for me when I try this in a tree structure: void somefunc(node *n) { n->parent->parent; } IntelliSense doesn't work for the second ->
  10. Absolution

    typename confusion

    Thanks Fruny, I think I get it. I'm not 100%, but I'm almost there. Since the template hasn't been instantiated yet, the compiler has no way of determining whether the dependent name Foo::Bar is a type or not and it defaults to assuming it is not, which would be a syntax error because it means I'm trying to specify a static member variable as a return type. In other words, the compiler hasn't created a class out of template Foo yet, so it has no way to check that Foo:Bar is an enum I declared in the class. It's getting stuck at the basic syntax stage. In the same way, if in main I tried to do something like this: Foo::Bar tmp = Foo::black; the compiler would assume that Foo::Bar is a static member, which is the same as: static int i tmp = Foo::black; which is a syntax error. Edit: For the second example.
  11. Absolution

    typename confusion

    I'm just trying to return types that are declared in my template. This would not work either: template<class T> class foo { enum i{red, black}; i bar(); }; template<class T> foo<T>::i foo<T>::bar() { // return type i }
  12. Absolution

    typename confusion

    Quote:Original post by CTar It's because the structure T is dependent on the template argument T. If you instead had: template<class T> class foo { struct i { // Some internal structure int val; }; i* bar(); }; Then there would be no problems with typename because i doesn't depend on a template argument. But then shouldn't the foo<T>:: scope resolution take care of that?
  13. The use of the typename qualifier still confuses me sometimes. For example, why can't the compiler deduce the return argument in this situation: template<class T> class foo { struct i { // Some internal structure T val; }; i* bar(); }; template<class T> foo<T>::i* foo<T>::bar() { // Return a type i* } Is it because foo<T> has not yet been defined so the compiler doesn't know whether i* is a function pointer, a type, another template, etc...? Edit: fixed code spacing.
  14. This guy wrote one for the XBox controller and he has links and source code for development. I use this code with an XBox controller and it works great.
  15. Absolution

    templated fuction pointers

    quickSort<int>(array, 0, 8, compareLess);
  • 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!