Jump to content
  • Advertisement
Sign in to follow this  

Please help with my basic direct3d framework design

This topic is 3334 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to make a very basic mini engine/framework for direct 3d. I've only just started graphics programming and want to be able to set up simple scenes to walk through etc. I've looked for tutorials but the only stuff I can find seems a bit too advanced for me right now. I want the framework to allow basic population of a scene through object, light and camera creation. One scene only, no textures or shadows. One common vertex description (of position, normal, diffuse and specular material values) and one fx file initially. Here's my rather vague design: Functions required: Game Objects CreateObject– creates a scene object with index and vertex buffers for the object, and stores position and orientation in the game world PositionObject – moves a loaded obect to the provided game world coordinates OrientateObject – rotates an object Lights CreateLight – creates and stores a light of either directional, spotlight or ambient type along with colour, intensity, direction (if required) PositionLight – moves a light to the specified position OrientateLight – rotates a light Camera CreateCamera – creates a camera at the specified position and looking at another point specified or in a direction provided by a vector MoveCamera – moves the camera to a position specified without changing orientation OrientateCamera - rotates camera Text CreateTextBox – creates a text area with a certain position, font, colour and size. Displays the n most recent lines of text written to it WriteText – writes supplied text into a specified text box ClearTextBox – clears the relevant text box Classes required: Object ObjectManager – objects are stored here and arranged as necessary DirectionalLight, Spotlight, AmbientLight (all derived from pure virtual light base class) LightManager – lights are stored here and arranged as necessary (e.g. According to type) TextBox TextBoxManager Camera Renderer - is responsible for selecting appropriate lights and objects and draws them Game – initialises direct3d and window and cleans up on destruction. Handles input and engine state (e.g. Paused). Contains all other classes GameTimer – handles game time and is used to calculate fps and ms per frame Things I might want to add in the future: creating game objects from external files (loading meshes), different shaders, shadows, textures, sound I just want to know if there are any glaring mistakes and what I've missed/forgotten before I start coding! I am not too worried about efficiency at the moment but if a big efficiency gain can be realised through a slight change to the design then it would be good to know!

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • 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!