Too bad, there's no compatible JRE-PlugIn for Mozilla that will install automatic - if I install manually and enable, my browser crashes/ does not respond any more
To keep near topic, some informational about current state/ideas:
In the meantime I started a new project, which is all about terrain-editing + scene setup. To create terrains with TBGL3dEd would be to cumbersome and waste a lot of resources - since terrains with fixed sizes don't need X+Z nor flexible UV, but just heights, vertex-normals and colors and consist of one group only.
So I'm up to create a world from fixed terrain-meshes which are 32*32 square tiles consisting of 2 triangles, each tile 32 screen-units in size, so one terrain-mesh is 1024 screen-units wide. Also I make some rule so even tiles [(1,1),(1,3)...] have diagonal line from lower left to upper right while odd tiles [(1,2),(1,4)... just add indexes to get even/odd...] have diagonals from upper left to lower right. So the hills won't bent to one side.
For the time being TBGL3dEd will maintain in a Beta-stage because it's supposed to work together with the world-editor later so one can drag objects from somewhere else into the world and place them. Also the final mesh-format to write to is undecided yet and some little misbehavement of tB when loading associated files has to be corrected before a final .exe of TBGL3dEd will be published.
I created a simple "texture-file-format" for some to this related purpose, - spraypaint the terrains texture together from different others - that's just how I save it:
Function IMAGE_SaveBGRA(ByVal sFile As String, _
ByVal sImageData As String, _
ByVal lWidth As Long, _
ByVal lHeight As Long) As Boolean
Local fNum As DWord
If Len(sFile) > 3 Then
If Mid$(sFile, 2, 2) <> ":\" Then sFile = TEXTURES_Path + sFile
If Ucase$(FILE_PathSplit(sFile, %PATH_EXT)) <> "DATABGRA" Then sFile += ".DataBGRA"
Else
sFile = TEXTURES_Path + sFile + ".DataBGRA"
EndIf
If FILE_Exists(sFile) Then FILE_Kill(sFile)
fNum = FILE_Open(sFile, "BINARY")
If Not fNum Then Return FALSE
FILE_Put(fNum, MKL$(lWidth))
FILE_Put(fNum, MKL$(lHeight))
FILE_Put(fNum, sImageData)
FILE_Close(fNum)
Function = TRUE
End Function
sImageData is some string that holds valid data to do the following:
TBGL_MakeTexture sImageData, %TBGL_DATA_BGRA, lWidth, lHeight, lTexID, %TBGL_TEX_MIPMAP
And these are the current functions to convert to BGRA - maybe someone has an idea to do this faster?
Function IMAGE_RGBA_to_BGRA(ByVal sRGBAData As String) As String
Local lPos As Long
Local sImageData As String
While lPos < Len(sRGBAData)
sImageData += StrReverse$(Peek$(StrPtr(sRGBAData) + lPos, 3)) + Peek$(StrPtr(sRGBAData) + lPos + 3, 1)
lPos += 4
Wend
Function = sImageData
End Function
' -------------------------------------------------------------------------
Function IMAGE_BGR_to_BGRA(ByVal sBGRData As String) As String
Local lPos As Long
Local sImageData As String
While lPos < Len(sBGRData)
sImageData += Peek$(StrPtr(sRGBData) + lPos, 3) + Chr$(255)
lPos += 3
Wend
Function = sImageData
End Function
Bookmarks