New topic: 

Problem with RBGL3D and RB

<http://forums.realsoftware.com/viewtopic.php?t=30628>

       Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic         Author  
Message       THIERRY           Post subject: Problem with RBGL3D and RBPosted: 
Sat Oct 24, 2009 2:39 am                        
Joined: Wed Mar 14, 2007 4:44 am
Posts: 23              hi 
i m beginning in realbaqic and i want tou crete an simple triangle in 3D ,so i 
hve downloaded the rbgl3d (last version Rbgl) and the exemple works great 
but i hve tried to do something with the exemple trimesh code as follow but its 
not work , the triangle(seems 2d)  appears  black and the screen of the window 
is black too (and i hve used skycolor to see something in the window  ), 
can i help you 
the code :
Dim tm as New Trimesh
Dim mat as New Material
Dim mDisplay as Group3D

mat.Texture=blue  // a picture added to the Project
  // define the vertices
tm.VertexCount = 3
tm.VertexPositions.SetXYZ(0, 5, 5, 0 )
tm.VertexPositions.SetXYZ(1, 5, 10, 0 )
tm.VertexPositions.SetXYZ(2, 10, 10, 0 )
tm.HasVertexColors= True
tm.VertexColors.Item(0) = &cFF0000
tm.VertexColors.Item(1) = &c00FF00
tm.VertexColors.Item(2) = &c0000FF

// define the triangles
tm.TriangleCount = 1
tm.Triangles.SetABC(0, 0, 1, 2)
tm.RenderBackFaces= True
  
// add it to our display!
mDisplay = New Group3D
mDisplay.Append tm
  
Rb3DSpace1.Objects.Append tm
Rb3DSpace1.Update

the camera position has been used too correctly 
thks fr your help 
regards thierry( rb 2008 3,1)   
                            Top           Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]     
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to