Recent posts

#1
Today the Internet is completely regulated.
There is possibly no place where you can just anonymously post something.

But maybe there is a place.

RENTRY.org


Its just like you take a piece of paper, write something on it and hang it somewhere in the city.
#2
Meta Forum / Re: Forum Maintenance days
Last post by Theo Gottwald - Today at 07:39:09 AM
We did some changes with the Forum Design.
The reason was not that the old design was not looking good, but we got permanently Errors,
therefore we did this change for internal reasons.
Its not yet decided if we can go back to the original design or not.
This one is less colorful but also Ok.
#3
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
#4
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
#5
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
 
#7
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? :)
#8
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
#9
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.
#10
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.