Lavos Posted September 5, 2013 Author Share Posted September 5, 2013 Okay this is how my code looks, I've the variables to a definition:```Option ExplicitPublic Const MAX_MODEL_NUM As Long = 5 <---I want to change this to a changeable number.Public Model3DS(1 to MAX_MODEL_NUM) as cNemo_3DSMesh <-Defind Class to render object mesh``````After initializing renderstates and setting up the engine the gfx core I have this sub routine:Public Sub Build_Model(ByVal Mesh As String, _ ByVal Texture As String, _ ByVal ModelID As Long, _ ByVal SizeX As Long, _ ByVal SizeY As Long, _ ByVal SizeZ As Long, _ ByVal posX As Long, _ ByVal posY As Long, _ ByVal posZ As Long, _ ByVal rotX As Long, _ ByVal rotY As Long, _ ByVal rotZ As Long) If ModelID <> MAX_MODEL_NUM Then Exit Sub Set Model3DS(ModelID) = New cNemo_3DSmesh With Model3DS(ModelID) .Load_3DS Mesh .Load_Mesh Mesh .Set_Texture Texture .Set_Scale SizeX, SizeY, SizeZ .Set_Position posX, posY, posZ .Set_Rotation rotX, rotY, rotZ End WithEnd Sub```Now the problem is that when I call this sub and try to pass it, it only builds 1 .3DS object to render on to the screen using this:```Call Build_Model(Mesh_Characters(1), Tex_Characters(1), 1, 50, 50, 50, 0, 100, 20, 0, 0, 0)Call Build_Model(Mesh_Characters(1), Tex_Characters(1), 2, 50, 50, 50, 150, 100, 60, 0, 4, 0)```> Note: Build_Model (MeshFile, Texture, ModelID, SizeX,SizeY,SizeZ,PosX,PosY,PosZ,RotX,RotY,RotZ)Now the question is: Is there a way to Create a cache or array where when ever I decided to Build another model, it duplicates a copy of a 3D mesh and render more than one with out having MAX_MODEL_NUM to stay Static? Link to comment Share on other sites More sharing options...
Sealbreaker Posted September 5, 2013 Share Posted September 5, 2013 Idk vb, but you can probably create a data-structure for that. A list for example. Google it, it isn't too hard and is probably the solution to your problem. -sealedit: idk if that's possible in vb (i didnt use a non-object-oriented language for a long time), but maybe there is already such a thing that you can just import and use? idk. Good luck. :D Link to comment Share on other sites More sharing options...
Lavos Posted September 5, 2013 Author Share Posted September 5, 2013 > Idk vb, but you can probably create a data-structure for that. A list for example. Google it, it isn't too hard and is probably the solution to your problem. > > > > -seal> > > > edit: idk if that's possible in vb (i didnt use a non-object-oriented language for a long time), but maybe there is already such a thing that you can just import and use? idk. Good luck. :DYou don't think ive tried google?[attachment=995:Googled.png]I don't there they are really efficient for me to use. I see lines of code on EO that don't normally show up as example in google. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now