Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Wed Aug 05, 2020 2:48 pm

All times are UTC - 5 hours

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Problem with RBGL3D and RB
PostPosted: Sat Oct 24, 2009 2:39 am 

Joined: Wed Mar 14, 2007 4:44 am
Posts: 27
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

the camera position has been used too correctly
thks fr your help
regards thierry( rb 2008 3,1)

Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group