Agraphics3D alternative?

Blitz3D Forums/Blitz3D Programming/Agraphics3D alternative?

Yue(Posted 2011) [#1]
Is there any alternative to this command without deleting the components of a scene.

This is because in my learning never-ending project, load a 3d menu, inspired by the game Hal Life 2, however when I enter the first level of the game and return to the menu and decided to change the screen resolution, I have load of obligation the 3D menu scene, along with level, so for now the only option is that it only can do the resolution change only when the game starts and has not charged any level.




Yasha(Posted 2011) [#2]
No.

This is because Graphics3D has to create a new graphics context. Even if it didn't need to destroy the old one (which it does), the scene information lives in the graphics context, and needs to be recreated "within" the new one.

You might be able to simplify things a bit by creating a list of "scene elements", with tags representing the type of entity and temporarily storing the necessary data to recreate it...? Then you could just run a simple "rebuild scene" function over the list.


Yue(Posted 2011) [#3]
Please example small!!


RifRaf(Posted 2011) [#4]
Yue,

-For example

Type SceneEnt
field modelfile$
field texture_properties$
field detail_properties$
end type


parse the properties with your own string format to get textures used, scale, rotation, ... anything you can imagine or need make a parsing system for it, then you can reload the entity correctly.

Already mentioned above, just add a recreation routine to parse all scene entities.

When you load an object you want in the scene call a custom function to make a sceneent reference for it.


Im sure my type structure above isnt the best example but hopefully you get the idea.

Last edited 2011