Recent posts

#1
OxygenBasic / Re: Array Ubound problem
Last post by Zlatko Vid - Yesterday at 06:13:48 PM
I must ask ..why you need Ubound
i never use it and i don't see purpose of that even some QB64 programeros
use them a lot ..same as REDIM ...omg ...maybe i am to limited or biased
to minimalism ... :D
#2
OxygenBasic / Re: Create a PDF directly
Last post by Zlatko Vid - Yesterday at 06:11:15 PM
Nicola

INC file is just o2 file you can include and not have as main file
so nothing ultra special
#3
OxygenBasic / Re: Create a PDF directly
Last post by Nicola - Yesterday at 12:58:31 PM
Seeing what you've accomplished, you make a mockery of AI.
O2 has a lot of potential.

Only one problem for me.
... I won't hide from you that, due to my lack of knowledge, I would like the listings to be more explained. INC files, for example. It wouldn't hurt to know right away which functions are for internal use only. But even this takes time and energy
 
#5
OxygenBasic / Re: Create a PDF directly
Last post by Charles Pegge - Yesterday at 11:22:31 AM
Limited time and energy constrain me from getting more involved, unfortunately. I am a limited resource. AI to the rescue? :)
#6
OxygenBasic Examples / Re: Spheres + reflection (rayt...
Last post by Charles Pegge - Yesterday at 11:10:24 AM
There's a sphere texture mapping for the Earth:

demos\OpenGl\ConsoleG\SphereMapPolar.o2bas

  % Title "Sphere Mapping Demo"
  % Animated
  % ScaleUp
 '% PlaceCentral
 '% AnchorCentral
  $ filename "t.exe"
 'uses RTL64
  uses ConsoleG

  function SphereMap(int nPrecision)
  ==================================
  'From Mike Lobanovsky / Sphere mapping
  float ex,ey,ez,theta1,theta2,theta3
  float M_TWOPI = pi()*2
  float M_PI_2  = pi()/2
  int   i,j,ei
  ei=(nprecision-1)\2
  For i = 0 To ei
    theta1 = i * M_TWOPI / nPrecision - M_PI_2
    theta2 = (i + 1) * M_TWOPI / nPrecision - M_PI_2
    glBegin(GL_TRIANGLE_STRIP)
    For j = 0 To nPrecision
      theta3 = j * M_TWOPI / nPrecision
      ' Splices
      ex = cos(theta2) * cos(theta3) ' calculate Euler angles on 3 axes
      ey = sin(theta2)
      ez = cos(theta2) * sin(theta3)
      glNormal3f(ex, ey, ez) ' set up normals
      glTexCoord2f(-j / nPrecision, 2 * (i + 1) / nPrecision) ' set up UVs
      glVertex3f(1.5 * ex, 1.5 * ey, 1.5 * ez) ' render vertices
      ' Sides
      ex = cos(theta1) * cos(theta3)
      ey = sin(theta1)
      ez = cos(theta1) * sin(theta3)
      glNormal3f(ex, ey, ez)
      glTexCoord2f(-j / nPrecision, 2 * i / nPrecision)
      glVertex3f(1.5 * ex, 1.5 * ey, 1.5 * ez)
    Next
    glEnd()
  Next
  end function

  sub main()
  ==========
  static int   imgn,res,wi,ht,earth
  static float angx,angy
  if not imgn
    imgn=21
    res=0 'use image wi and ht (512*256)
    LoadTexture "..\..\images\Earth.jpg",imgn,res,wi,ht
   'LoadTexture "NASA_Blue_Marble.jpg",imgn,res,wi,ht
   'http://www.johnstonsarchive.net/spaceart/earthmap.jpg
   'LoadTexture "earthmap.jpg",imgn,res,wi,ht
    earth=CompileList : SphereMap 128 : glEndlist
  end if
  cls '0,0,0
  'display image
  '
  pushstate
  move 16,-16
  shading
  color 1,1,1,1
  texture imgn
  scale 8
 'rotateX angX
  rotateY angY
  go earth
  'quadnorm 10.0, 10.0 'apply image texture to quad
  texture 0
  popstate
 flat
 move 0,-.5
 scale 2
 printl "Sphere Mapping"
  angx+=.100 : if angx>=360 then angx-=360
  angy+=.125 : if angy>=360 then angy-=360
  end sub 'main

  EndScript
#7
OxygenBasic / Re: Array Ubound problem
Last post by Nicola - Yesterday at 11:01:59 AM
very good.  :)
In fact, I wasn't making use of arrays while waiting for news.
Thank you Charles.
#8
OxygenBasic / Re: Array Ubound problem
Last post by Charles Pegge - Yesterday at 10:57:58 AM
Ubound etc last tested in March. Should be ok now.
#9
microA Interpreter / Re: UDF testing in micro(A)
Last post by Zlatko Vid - Yesterday at 10:45:52 AM
in case someone is interested
https://discord.gg/ANsRUPy
#10
Discussion / Re: Why this Forum is so dead?...
Last post by Johan Klassen - May 02, 2024, 06:15:28 PM
in the 70's when the micro computer revolution was happening, everybody got excited and people were very busy trying all kinds of things, the WWW was not in existence at the time but we had bulletin boards to share code, plus tons of magazines and outlets selling CD's loaded with source-code and shareware programs, but that's not the case today.