Jump to content
  • Advertisement
Sign in to follow this  

Design Issues - special model or special render technique

This topic is 3051 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

Hi, So i have this 2D tile engine which should support a lot of layers of blended textures for each grid element. The layers i mentioned are defined by a category. So i will have stuff like -terrain layer -vegetation layer -building layer -weather layer -field is selected -special modfiers -etc. (but this sums up to 8+ layers at minimum, but some of them might be empty (the field has no building or so)) I am already using texture atlases to make sure i can use render an entire grid (which might contain 500x500 fields at each layer) at once using vbos and texpointers and whatnot. That's quite nice. This would still require a rendercall for each layer. ;( Let's say: 8 layers, 8 massive glDrawElements calls for 500x500 values. So i thought i could somehow devide my effort by "X" (depending on the multitex capabilities) by using multi-texturing and blend "X" layers together on the GPU. Now, this whole thing effects the way my models are represented. The first explained method will basicly just position several "models" in a way so it looks like they were stacked, where the second way actually interprets the model as one artifact. My actual problem is, i could a) try to built a suitable model (according to the render capabilities) b) use a generic model and have the renderer reinterpret it depending on the capabilities. I hope i was able to state my problem, and i'm very happy for any response. P.S: Changes in my "Model" are quite seldom (in gfx specific terms), it's a map editor for Civilization 4 tbh. Greetings Edit:
Model * model;
   model = new MultiTexturedGrid(scenario);
   model = new BruteForceGrind(scenario);


Model * model = new GridModel(scenario);
//... and 
Renderer::render(Model * m)
    //multitex rendering
    //usual rendering

I thought i'd rather go with specific models, even if it couples the render specs to the models. But since the renderer should have compartible data structures to be effective, i don't want the renderer to have to take his hands on the data structure. [Edited by - GreyHound on February 9, 2010 2:42:30 PM]

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!