Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

202 Neutral

About dhm

  • Rank
  1. dhm

    Cg Semantics ??

    Hi, Semantics are string variables and are queriable from external applications. E.g. FX Composer would use them to display some UI widgets to edit certain variables. See example in the post http://www.gamedev.net/community/forums/topic.asp?topic_id=454712. Cheers, dhm
  2. Quote:Original post by serratemplar when I inherit from an abstract class, what makes the inheritor a *real* class (not an abstract one). An abstract class in C++ is a class that has pure-virtual member fuctions. For example (please note I've not tested this syntax in any compiler): class AbstractClass { public: // Virtual function (non-pure in that we will provide an implementation) virtual void FunctionA(); // Pure-virtual function (no implementation in AbstractClass) virtual void FunctionB() = 0; }; void AbstractClass::FunctionA() { // Do stuff } The AbstractClass class has a single virtual function 'FunctionA' and a single pure-virtual function 'FunctionB'. class ConcreteClass : public AbstractClass { public: // Lets implement FunctionB in our concrete class. virtual void FunctionB(); }; void ConcreteClass::FunctionB() { // Do other stuff } You can then create instances of ConcreteClass - if you attempt to create instances of AbstractClass you will either get a runtime-exception (typically if trying to allocate on the heap with 'new' etc) or a compile-time error like you having (typically if trying to allocate on the stack). Hopefully that explains things a little better. You may also want to have a look through ABC FAQ. Cheers, dhm
  3. Just had a quick look at my OpenGL tracing DLL project and found a reference to a Microsoft System Journal article from February 1998 - Bugslayer by John Robbins. Hopefully this will give you more details. Cheers, dhm
  4. Hi, No worries. I looked into OpenGL function hooking to create a simple OpenGL logging/debug system so I had a controlled environment as it was my own app I was debugging. I'm not sure I following when you say 'patch' each game? Could you elaborate - I'm maybe just forgetting the details of the hooking mechanism. I know that Fraps manages to display an FPS counter overlay for DirectX (incl. 10) and OpenGL games - and it doesn't need to apply patches to the apps. It maybe has to be resident in memory before the game/app starts up. If I get the chance I'll look back at my code to remind myself how its done. I would imagine you can make 'video streams' as in texture map video file frames to a quad or something. But a warning that you may interfere with the game you are overlaying - be very careful about your chosen API's state management. Cheers, dhm
  5. Hi, Applications such as Fraps http://www.fraps.com/ display overlays on top of games and other 3D apps (using OpenGL or DirectX). I think you could implement something like this under a Windows-based OS using function hooks. It's a while since I've looked at this stuff but in high-level terms it allows you to have a piece of code (in a DLL) that intercepts other system function calls (e.g. to OpenGL or DirectX libraries). Have a search on Google and MSDN for lots of docs. Using this method you can intercept the end of the rendered frame (e.g. glFinish or the API's swap buffer function) to then invoke your own rendering. This is just an idea and it may not work but worth investigating. I'm also not sure Vista supports this with its various new security features so your mileage may vary. Good luck, dhm
  6. dhm

    STL Debug tools

    Quote:Original post by 51mon With Visual C++ I can only watch one element of a container at a time, as far as I know. I'm looking for an approach where I can monitor the whole container. How do I best debug STL? You can watch more than one element in a container at once because you can use expressions in the debugger watch windows. E.g. for a std::vector<int> called vValues: vValues.size() - shows size of vector vValues._Myfirst,10 -- shows first ten elements You can do similar things with other containers. Hope that helps, dhm
  7. dhm

    Game Create first or Company Create First?

    Hi, Quote:Original post by ForeverSilence I have another question though, I don't understand why it costs so much to make a game. I've been trying to do research to find out everything, since i am just a beginner. But apparently I can't find out why it costs so much to develop a game, (maybe there is some sort of logical answer that I don't see) but where does the money usually go to for the game development part? (sorry for asking such amateur questions) The reason costs are so high is because of time, and the number of staff required to make AAA titles. I am aware of teams of 100+ (peak - profile follows skewed bell-like curve) that work for several years to produce hit titles. Just paying these staff for their time is a massive cost - excluding middleware/SDK licences, outsourcing, building, development machines etc. Cheers, dhm
  8. dhm

    3D App Design Question

    Hi, First of all this is a reasonable approach to the problem and it is used quite a lot. Personally it's not how my objects are designed. The reason is that it ties your objects to their rendering code. In my opinion this will restrict your use of those objects in the future by that single representation. E.g. say you have a cube drawable object which implements its ::Draw method using OpenGL. Your editor/game happily renders cubes for ages. Then you need to add a wireframe mode, or an edge mode, or somehow change the representation of your model in the viewport. But your world is described as cubes... which have their predefined ::Draw method which means you have to hack in ways to render cubes in different ways. In my opinion you should have an object class (in this example cube) that represents the object. I.e. in our case we could use 8 vertices (although other representations are applicable, e.g. position and width, height, depth parameters). A renderer class can then be responsible for taking a list (or graph, whatever) of objects and rendering them how you want. The renderer can then have different modes configured (e.g. edge, wireframe, solid) which is much simpler than adding this complexity for each of your drawable objects. EDIT: of course, the reason I mentioned OpenGL, if you ever want to have objects rendered in DirectX or using a 2D windowing toolkit then have separate rendering code is even more of a plus. Hopefully that helps, Cheers, dhm
  9. Hi, Interesting comments above. Many games I have looked at use a technique similar to how the original poster is describing - having assets in archive files (typically zip format, although with a different extension). You can look at low-level libraries like ZLib (and its contrib library MiniZip) - see http://www.zlib.net/ However there is free middleware available called PhysicsFS which acts as a really useful wrapper around archive files. It also supports local extracted files overridding those in the archive file etc which can be really handy during debugging. Its available from http://icculus.org/physfs/. Quote: I'd recommend leaving your resources completely exposed. Not only does it improve loading times but it saves build time and allows for easy modding. A few years ago, developers were terrified of modders, but it's become apparent that they are a huge asset to the industry, rather than a pain. Nobody will think less of you if they realise they can open your image files in Photoshop, unless you are truly using an inappropriate format (bmp, uncompressed PCM and the likes). It may be quicker to load but commercial games have to think of other things - such as being able get their assets to fit on a CD or DVD. It also offers simple protection against people stealing assets (although its easily circumvented). Hope that helps, dhm
  10. dhm

    Is there any OpenGL IDE ?

    Quote:Original post by plamen_t It would be nice if when you start typing a function and somewhere appears the prototype of the function. Microsoft Visual Studio's Intellisense feature should do this. E.g. start typing "glEnable(" and typically in the hint window that appears it will give the glEnable function prototype. I would imagine other editors/IDEs already do this too. Cheers, dhm
  11. Hi, Also not answering your question directly as I have not attempted such a scene graph structure. My current scene graph implementation makes distinction between nodes type (geometry node, LOD node etc). My scene graph is independent of any rendering algorithm. It would be interesting to compare ease of use and functionality between two different approaches. The real reason for posting is to include this useful SceneGraph link. Hopefully it might provide you and other readers useful information. Cheers, dhm
  12. dhm

    Buying a new guitar

    Hi, I have a brilliant white Epiphone Les Paul Custom, gold hardware. Fantastic machine! Not had any problem with upper frets. The only thing I am disappointed with the Epiphones I have (also a natural Sheraton II) is the electrics, pickup are pretty good just the stuff that connects them together and the pots. But I guess you get what you pay for. From what I remember the custom is the most expensive, and the models like the LP are a lot lighter (wooden body much lighter) and I think one of their models does not have humbucker pickups. The middle range Standard is a very good machine too - although it had the retro plastic-like tuners which put me off (but has a lovely sunburst painted effect). Cheers, dhm
  13. dhm

    Debugging tips?

    Hi, Variety of methods. There are lots of articles on debugging all over the net - Gamedev.net have some useful ones for beginners. Use the article/column search facility to find them. Most errors I have found, I have been using the OpenGL API in the incorrect way (incorrect parameters, misunderstanding parameters, invalid function call order etc.). I can recommend gDEBugger from Graphic Remedy for these kinds of errors. Your idea of #define's sounds interesting. Although pratically it might be a complete pain to maintain and debug in itself. Good luck. Cheers, dhm
  14. Hi, I was reading the section on Parameter Shadowing in NVidia's Cg Users Manual PDF the other night and it is scarce on details (this was Cg SDK 1.5 beta 2). I have found the same as you through practice - but its better for my particular app that way anyway (would have to disable parameter shadowing otherwise). I remember it saying that using CgFX's DirectX runtime parameter shadowing can be enabled/disabled but it didn't mention anything about OpenGL runtime's parameter shadowing. The conslusion I took from it was that its not supported under the OpenGL runtime, but maybe someone else can clarify? Cheers, dhm
  15. Hi, You can disable texture mapping as the previous posters have suggested - however I noticed something which contradicts what you said that the other posters haven't mentioned. Quote:Original post by Weng I am mapping textures onto a cube. On the top layer of the cube is a cylinder. I noticed that when a texture is mapped onto the cube, the cylinder is automatically texture mapped as well, even when I didnt enable any texturing coordinates for the cylinder. <snip> quadratic=gluNewQuadric(); // Create A Pointer To The Quadric Object. quadratic is a GLuquadricObj pointer created earlier gluQuadricNormals(quadratic, GLU_SMOOTH); // Create Smooth Normals gluQuadricTexture(quadratic, GL_TRUE); // Create Texture Coords This last line here - is enabled texture coordinate generation for the GLU primitive - as far as I remember (and by your comment). Which you then draw with after the cube without disabling textures - so GLU is creating the texture coordinates for you. And since the texture is still bound you get a texture mapped cylinder! If you really do not want texture mapping on the cylinder then use GL_FALSE in the call to gluQuadricTexture(). (As well as disabling texture mapping). Cheers, Dave
  • 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!