August 04, 2020, 11:29:07 AM

Author Topic: Text ( OpenB3dMax )  (Read 57 times)

Offline _PJ_

  • Jr. Member
  • **
  • Posts: 92
Text ( OpenB3dMax )
« on: July 26, 2020, 04:54:55 PM »
I am using BlitzMax NG with "vanilla" mods, (I've not even begun to look at the "Brucey's Mods" at all )
However, for 3D I do Import "B3DOpenGLMax"

The intention is for simplsitic 3D simialr to the capabiltiies of Blitz3D .

In Blitz3D, it was possible to use Text command to write to a Texture Buffer and then this texture can be applied to a quad etc. before the camera to simulate the text written on 2D screen.

So far I am unsuccessful in this endeavour due to:

I find that (unless I need to Import some other specifc framewrok etc.) the "SetFont" command is not exposed (Maybe an alternative TFont.Set method or something???

There are a number of available "Font" related functoinalities now present, FreeTypeFonts and BitMap fonts, but no clear documentation as to how they should be used or how they differ - nor which solution is most appropriate for my needs ( to display text in a given font within a 3D camera render )

I am not  sure how to set a texture 'buffer' as a 'graphics object' for drawing.

And this aspect which is particularly problematic:
Use of 2D Commands such as "DrawText" appears to override something with the current (i.e. 3D) graphics object and therefore whatever is "Rendered" on calling RenderWorld is no longer visible on the screen.

Code: [Select]

Import OpenB3DMax.B3DGLGraphics

Graphics3D DesktopWidth(),DesktopHeight(),0

Local c:TCamera=CreateCamera()
Local s:TEntity = CreateSphere()

Local l:TLight = CreateLight()


Local RV:Byte

While Not KeyDown(key_escape)

If KeyHit(KEY_SPACE) Then RV = ~RV


End If



I have looked through the available documentation, but couldn't really find anything to help in resolving these issues.

Offline markcwm

  • Sr. Member
  • ****
  • Posts: 468
Re: Text ( OpenB3dMax )
« Reply #1 on: August 01, 2020, 12:51:18 AM »
It sounds like you haven't seen the examples at See blitz3d/CreateTexture.bmx.


SimplePortal 2.3.6 © 2008-2014, SimplePortal