Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

151 Neutral

About Shanjaq

  • Rank
  1. No derailing detected. I have a huge tome on "Game Engine Architecture" and it describes all of the functions of a run-time asset manager, but fails to provide any context as to where it could be used. A Sequence Diagram would be most helpful.
  2. I have an "Asset Manager" class which maintains GUIDs and supplies resource data to the API-specific rendering interface's container classes. Where is the best place to actually USE this though? I really don't want to be passing an instance of the asset manager around excessively, and making it singleton seems like it would encourage calls from "bad states". For instance: calling Entity.SetModel("path/to/model.mdl") how would the Entity class know anything about the specific instance of Asset Manager? or just: setting Entity.Model = "path/to/model.mdl" and letting the rendering interface notice it wasn't loaded, thus making the call to asset manager? [Edited by - Shanjaq on October 16, 2010 8:30:38 AM]
  3. I must have re-made this section of my renderer at least 8 times in the last couple of days in an attempt to erradicate API-specific calls in the Scenegraph and all it contains.. Here's my problem: I would like to somehow refer to specific meshes within objects in the scenegraph. Traversal of the State View generates a flow of Batches to be sent to the Renderer. The Batches contain Material and Mesh references that are only understood by the Renderer(the rest of the program should be content to know only that they exist and will be properly handled by the Renderer.) The Renderer itself holds a linked list of Materials and Meshes, and I was hoping that the Batches would contain some direct pointers to them. In order to have a direct pointer, a base class will not suffice as its derived classes contain API-specific DataTypes(and you can't refer to a derived class by a pointer of its base type!) Since it's dumb to have the Scenegraph contain objects that make it aware of any possible graphics API that may be used to render them, how else could I sore references to such resources? One thought I had was to store the Materials and Meshes in a managed Array, so I could refer to them by an Integer value representing their Index on the Array. Then the objects in the Scenegraph could store their Materials and Meshes as simple Integers. My only reservation with this method is the wasted CPU cycles in converting an Index into an actual Address out of the Array of resources inside the API-Specific Rendering code... Please someone shed some light on this :'-(
  4. I'm writing specs for individual components of my engine, hoping they will be self-contained for portability and pinpointing of issues when they arise. Here is my mesh specification: Type: Static Operations: Translate, Rotate, Scale Store/Render As: For GL: VBO, Display List For DX: no idea yet, something optimized for static Notes: -Vertices Locked(never change) -Vertex Shader/Program Slot -Cannot promote to Dynamic -Resource Manager should determine if sufficient VRAM for VBO, if not then use Display List, possibly partition between VBO and Texture heap. ------ Type: Dynamic Operations: Translate, Rotate, Scale, Update Store/Render As: For GL: Vertex Array, possibly Immediate Mode For DX: no idea yet, Vertex Array equiv. Notes: -Vertices stream from buffer in RAM -Vertex Recalc function slot, fires on Update call -Vertex Shader/Program Slot -Can demote to Static ------ Static mesh storage would be useful to quickly render a lot of stuff that doesn't change shape, like buildings and landscape features. Some animation could be accomplished by switching between frames. Dynamic meshes would be more for stuff like explosions, volume rendering(metaballs?) and deformable objects(chipping away at a dirt wall or squashing a barrel under a heavy object, etc.) That's what I have so far and am in the process of implementing it, not sure yet if everything is feasible.. Just thought I'd post an example of how I'm going about writing the Technical Design Docs.
  5. Shanjaq

    CfTechDemo 3

    The instruction at "0x000000000" referenced memory at "0x000000000". The memory could not be "read". I get that after it says "loading environment" ATI Radeon 9800pro 128 latest Catalyst drivers AMD 2500+ 1Gb RAM [Edited by - Shanjaq on March 19, 2006 4:40:56 PM]
  6. MSN Contact: "Shanjaq" - Name: Brian Hello all! I could always use a few buddies to chat about programming with! I have some experience with OpenGL(working on a Scenegraph currently) in C++, I use DevCPP and VC6 for most of my serious projects, though I am known for quick brain-dump parsers, utils and automation scripts in VB6. I have experience writing client-server apps with Winsock using both VB6 and VC6(IOCP for thousands of concurrent connections!) My interests are in data organization(especially where network interfaces are involved) and graphics programming in general. Please add my contact to the list on the OP! =D
  7. Shanjaq

    Game Music

    Awexome! Thanks for setting this up, there are some bangin' tunes here!
  8. This is very strange, I have been successfully using GL_COLOR_ARRAY and GL_INDEX_ARRAY for weeks now on most of the machines in my network, yet some people I send my demo to have an immediate run-time error when these ClientStates are enabled. Another strange thing is that I can still use Index Arrays with my glDrawElements calls even with GL_INDEX_ARRAY disabled! Are these two client states problematic for anyone else out there? What should I watch out for when using them to prevent these mysterious run-time errors?
  9. Shanjaq

    Lighting: More Than Eight Lights?

    What if you want to support systems that don't have hardware that supports shaders?
  10. I have multiple methods for rendering objects, which includes Vertex Arrays, Display Lists and VBOs. Would it be possible to generate shapes like the Cylinder, Torus, Sphere, etc. and extract the vertices, texture coords and normals to a standard array so I can use the previously mentioned rendering methods on the data generated by the GLUquadricObj?
  11. Here's what I do: // Push back and cache the current state of depth testing and lighting // and then disable them. glPushAttrib( GL_TEXTURE_BIT | GL_DEPTH_TEST | GL_LIGHTING ); glDisable( GL_DEPTH_TEST ); glDisable( GL_LIGHTING ); // Push back the current matrices and go orthographic for background rendering. glMatrixMode( GL_PROJECTION ); glPushMatrix(); glLoadIdentity(); glOrtho( 0, 1024, 768, 0, -1, 1 ); //or whatever size you want glMatrixMode( GL_MODELVIEW ); glPushMatrix(); glLoadIdentity(); //build the background glBindTexture(GL_TEXTURE_2D, Texture); // Select Our Texture glBegin(GL_QUADS); // Draw The Quad glColor3f( 1.0, 1.0, 1.0 ); glTexCoord2f(0.0f, 0.0f); glVertex3f(0.0f, float(nWindowHeight), 0.0f); // Bottom Left glTexCoord2f(1.0f, 0.0f); glVertex3f( float(nWindowWidth), float(nWindowHeight), 0.0f); // Bottom Right glTexCoord2f(1.0f, 1.0f); glVertex3f( float(nWindowWidth), 0.0f, 0.0f); // Top Right glTexCoord2f(0.0f, 1.0f); glVertex3f(0.0f, 0.0f, 0.0f); // Top Left glEnd(); // Done Drawing The Quad // Pop everything back to what ever it was set to before we started glMatrixMode( GL_PROJECTION ); glPopMatrix(); glMatrixMode( GL_MODELVIEW ); glPopMatrix(); glPopAttrib();
  12. Shanjaq

    Soil Modeling

    Metaballs are pretty hard to find in comprehensible packages, but here's a good thread on the subject of Metaballs/Isosurface Extraction/Volume Rendering: And here's a good example of Metaballs, it was pretty well written(enough for a n00b like me to port from DirectX to OpenGL =)
  13. Shanjaq

    Terrain Self-Shadows

    Check out this Terrain demo/source, it's exceedingly pretty and has real-time moving light using shaders!
  14. Aye, I had a similar problem last week =p I forgot to set the GL_ARRAY_BUFFER_ARB pointer to 0 before moving on to render standard Vertex Arrays. Except mine didn't crash, it drew polygons in weird places!
  15. Shanjaq

    try my game

    Way cool! Loved the soundtrack too ^_^ The dungeon level was fun, I messed up the first time and accidentally lost the "rescuer" to the nest =P
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!