• Print

Author Topic: "sub...end sub" with qb64 ....???? out of range ???  (Read 249 times)

funkheld

  • Full Member
  • ***
  • Posts: 229
    • Email
"sub...end sub" with qb64 ....???? out of range ???
« on: June 27, 2011, 07:03:21 AM »
this is ok !!!!

Code: [Select]
'$INCLUDE:'GL_consts.bas'
DEFLNG A-Z

SCREEN _NEWIMAGE(800, 600, 32)

GL_INIT
gl_X = 256: gl_Y = 256
gl_helper_init gl_X, gl_Y

glEnable GL_DEPTH_TEST
glDepthMask GL_TRUE
glClearDepth 1
glMatrixMode GL_PROJECTION
glLoadIdentity
gluPerspective 90, 1, 1, 500
glEnable GL_TEXTURE_2D
glColor4f 1, 1, 1, 1

up = GL_LoadTexture("up.jpg")
aster =GL_LoadTexture("aster.jpg")

DO
    _limit 30
    
LOCATE 2,2, 1
   a$ = INKEY$
   SELECT CASE a$
   print a$
     CASE  "w": y1=y1+5
     CASE  "s": y1=y1-5
     CASE  "q": x1=x1+5
     CASE  "e": x1=x1-5
     CASE CHR$(27): END
END SELECT

    glClear GL_DEPTH_BUFFER_BIT + GL_COLOR_BUFFER_BIT
    glMatrixMode GL_MODELVIEW
    glLoadIdentity
    glTranslatef 0, 0, -180

    glRotatef x1, 0, 1, 0
    glRotatef y1, 1, 0, 0

    GL_SetTexture aster
     glBegin GL_QUADS
    'a cube
    glTexCoord2f 0, 0: glVertex3f -50, -50, -50
    glTexCoord2f 0, 1: glVertex3f -50, 50, -50
    glTexCoord2f 1, 1: glVertex3f 50, 50, -50
    glTexCoord2f 1, 0: glVertex3f 50, -50, -50

    glTexCoord2f 0, 0: glVertex3f -50, -50, 50
    glTexCoord2f 0, 1: glVertex3f -50, 50, 50
    glTexCoord2f 1, 1: glVertex3f 50, 50, 50
    glTexCoord2f 1, 0: glVertex3f 50, -50, 50

    glTexCoord2f 0, 0: glVertex3f -50, -50, -50
    glTexCoord2f 0, 1: glVertex3f -50, 50, -50
    glTexCoord2f 1, 1: glVertex3f -50, 50, 50
    glTexCoord2f 1, 0: glVertex3f -50, -50, 50

    glTexCoord2f 0, 0: glVertex3f 50, -50, -50
    glTexCoord2f 0, 1: glVertex3f 50, 50, -50
    glTexCoord2f 1, 1: glVertex3f 50, 50, 50
    glTexCoord2f 1, 0: glVertex3f 50, -50, 50

    glTexCoord2f 0, 1: glVertex3f -50, -50, 50
    glTexCoord2f 0, 0: glVertex3f -50, -50, -50
    glTexCoord2f 1, 0: glVertex3f 50, -50, -50
    glTexCoord2f 1, 1: glVertex3f 50, -50, 50

    glTexCoord2f 0, 1: glVertex3f -50, 50, 50
    glTexCoord2f 0, 0: glVertex3f -50, 50, -50
    glTexCoord2f 1, 0: glVertex3f 50, 50, -50
    glTexCoord2f 1, 1: glVertex3f 50, 50, 50
    glEnd

    GL_SetTexture up
    glBegin GL_QUADS
    'the "sky" box
    glTexCoord2f 0, 0: glVertex3f -200, -200, -200
    glTexCoord2f 0, 1: glVertex3f -200, 200, -200
    glTexCoord2f 1, 1: glVertex3f 200, 200, -200
    glTexCoord2f 1, 0: glVertex3f 200, -200, -200

    glTexCoord2f 0, 0: glVertex3f -200, -200, 200
    glTexCoord2f 0, 1: glVertex3f -200, 200, 200
    glTexCoord2f 1, 1: glVertex3f 200, 200, 200
    glTexCoord2f 1, 0: glVertex3f 200, -200, 200

    glTexCoord2f 0, 0: glVertex3f -200, -200, -200
    glTexCoord2f 0, 1: glVertex3f -200, 200, -200
    glTexCoord2f 1, 1: glVertex3f -200, 200, 200
    glTexCoord2f 1, 0: glVertex3f -200, -200, 200

    glTexCoord2f 0, 0: glVertex3f 200, -200, -200
    glTexCoord2f 0, 1: glVertex3f 200, 200, -200
    glTexCoord2f 1, 1: glVertex3f 200, 200, 200
    glTexCoord2f 1, 0: glVertex3f 200, -200, 200

    glTexCoord2f 0, 1: glVertex3f -200, -200, 200
    glTexCoord2f 0, 0: glVertex3f -200, -200, -200
    glTexCoord2f 1, 0: glVertex3f 200, -200, -200
    glTexCoord2f 1, 1: glVertex3f 200, -200, 200

    glTexCoord2f 0, 1: glVertex3f -200, 200, 200
    glTexCoord2f 0, 0: glVertex3f -200, 200, -200
    glTexCoord2f 1, 0: glVertex3f 200, 200, -200
    glTexCoord2f 1, 1: glVertex3f 200, 200, 200
    glEnd
  
    sx = gl_X
    sy = gl_Y
    IF oldsx < sx OR oldsy < sy THEN
        REDIM pixels(sx * sy) AS LONG
        REDIM pixels2(sx * sy) AS LONG
        oldsx = sx: oldsy = sy
    END IF
    glReadPixels 0, 0, sx, sy, GL_RGBA, GL_UNSIGNED_BYTE, pixels(1)
    'flip & convert RGB to BGR
    p1 = 0 'source
    p2 = sx * (sy - 1) 'dest
    FOR y = 0 TO sy - 1
        FOR x = p1 TO p1 + sx - 1
            c = pixels(x)
            pixels2(p2) = ((c \ 65536) AND 255) + (c AND &HFF00&) + ((c AND 255&) * 65536)
            p2 = p2 + 1
        NEXT
        p1 = p1 + sx
        p2 = p2 - sx - sx
    NEXT

    pixels2(0) = sx + sy * 65536
    PUT (16, 50), pixels2(0), PSET

    _DISPLAY
LOOP

end

REM $INCLUDE:'SFML_GL.bm'

with sub not ok:
glReadPixels 0, 0, sx, sy, GL_RGBA, GL_UNSIGNED_BYTE, pixels(1)  >>>>>>>>> out of range  ???
 pixels2(0) = sx + sy * 65536 >>>>>>>>>>> out of range  ???
 PUT (16, 50), pixels2(0), PSET >>>>>>>>>>>>> out of range  ??? ???
Code: [Select]
'$INCLUDE:'GL_consts.bas'
DEFLNG A-Z
declare Sub drehe_ogl()

SCREEN _NEWIMAGE(800, 600, 32)

GL_INIT
gl_X = 256: gl_Y = 256
gl_helper_init gl_X, gl_Y

glEnable GL_DEPTH_TEST
glDepthMask GL_TRUE
glClearDepth 1
glMatrixMode GL_PROJECTION
glLoadIdentity
gluPerspective 90, 1, 1, 500
glEnable GL_TEXTURE_2D
glColor4f 1, 1, 1, 1

up = GL_LoadTexture("up.jpg")
aster =GL_LoadTexture("aster.jpg")

DO
    _limit 30
    
LOCATE 2,2, 1
   a$ = INKEY$
   SELECT CASE a$
   print a$
   CASE  "w": y1=y1+5 : drehe_ogl
   CASE  "s": y1=y1-5 : drehe_ogl
   CASE  "q": x1=x1+5 : drehe_ogl
   CASE  "e": x1=x1-5 : drehe_ogl
     CASE CHR$(27): END
END SELECT
LOOP

Sub drehe_ogl
glClear GL_DEPTH_BUFFER_BIT + GL_COLOR_BUFFER_BIT
    glMatrixMode GL_MODELVIEW
    glLoadIdentity
    glTranslatef 0, 0, -180

    glRotatef x1, 0, 1, 0
    glRotatef y1, 1, 0, 0

    GL_SetTexture aster
     glBegin GL_QUADS
    'a cube
    glTexCoord2f 0, 0: glVertex3f -50, -50, -50
    glTexCoord2f 0, 1: glVertex3f -50, 50, -50
    glTexCoord2f 1, 1: glVertex3f 50, 50, -50
    glTexCoord2f 1, 0: glVertex3f 50, -50, -50

    glTexCoord2f 0, 0: glVertex3f -50, -50, 50
    glTexCoord2f 0, 1: glVertex3f -50, 50, 50
    glTexCoord2f 1, 1: glVertex3f 50, 50, 50
    glTexCoord2f 1, 0: glVertex3f 50, -50, 50

    glTexCoord2f 0, 0: glVertex3f -50, -50, -50
    glTexCoord2f 0, 1: glVertex3f -50, 50, -50
    glTexCoord2f 1, 1: glVertex3f -50, 50, 50
    glTexCoord2f 1, 0: glVertex3f -50, -50, 50

    glTexCoord2f 0, 0: glVertex3f 50, -50, -50
    glTexCoord2f 0, 1: glVertex3f 50, 50, -50
    glTexCoord2f 1, 1: glVertex3f 50, 50, 50
    glTexCoord2f 1, 0: glVertex3f 50, -50, 50

    glTexCoord2f 0, 1: glVertex3f -50, -50, 50
    glTexCoord2f 0, 0: glVertex3f -50, -50, -50
    glTexCoord2f 1, 0: glVertex3f 50, -50, -50
    glTexCoord2f 1, 1: glVertex3f 50, -50, 50

    glTexCoord2f 0, 1: glVertex3f -50, 50, 50
    glTexCoord2f 0, 0: glVertex3f -50, 50, -50
    glTexCoord2f 1, 0: glVertex3f 50, 50, -50
    glTexCoord2f 1, 1: glVertex3f 50, 50, 50
    glEnd

    GL_SetTexture up
    glBegin GL_QUADS
    'the "sky" box
    glTexCoord2f 0, 0: glVertex3f -200, -200, -200
    glTexCoord2f 0, 1: glVertex3f -200, 200, -200
    glTexCoord2f 1, 1: glVertex3f 200, 200, -200
    glTexCoord2f 1, 0: glVertex3f 200, -200, -200

    glTexCoord2f 0, 0: glVertex3f -200, -200, 200
    glTexCoord2f 0, 1: glVertex3f -200, 200, 200
    glTexCoord2f 1, 1: glVertex3f 200, 200, 200
    glTexCoord2f 1, 0: glVertex3f 200, -200, 200

    glTexCoord2f 0, 0: glVertex3f -200, -200, -200
    glTexCoord2f 0, 1: glVertex3f -200, 200, -200
    glTexCoord2f 1, 1: glVertex3f -200, 200, 200
    glTexCoord2f 1, 0: glVertex3f -200, -200, 200

    glTexCoord2f 0, 0: glVertex3f 200, -200, -200
    glTexCoord2f 0, 1: glVertex3f 200, 200, -200
    glTexCoord2f 1, 1: glVertex3f 200, 200, 200
    glTexCoord2f 1, 0: glVertex3f 200, -200, 200

    glTexCoord2f 0, 1: glVertex3f -200, -200, 200
    glTexCoord2f 0, 0: glVertex3f -200, -200, -200
    glTexCoord2f 1, 0: glVertex3f 200, -200, -200
    glTexCoord2f 1, 1: glVertex3f 200, -200, 200

    glTexCoord2f 0, 1: glVertex3f -200, 200, 200
    glTexCoord2f 0, 0: glVertex3f -200, 200, -200
    glTexCoord2f 1, 0: glVertex3f 200, 200, -200
    glTexCoord2f 1, 1: glVertex3f 200, 200, 200
    glEnd
  
    sx = gl_X
    sy = gl_Y
    IF oldsx < sx OR oldsy < sy THEN
        REDIM pixels(sx * sy) AS LONG
        REDIM pixels2(sx * sy) AS LONG
        oldsx = sx: oldsy = sy
    END IF
    glReadPixels 0, 0, sx, sy, GL_RGBA, GL_UNSIGNED_BYTE, pixels(1)
    'flip & convert RGB to BGR
    p1 = 0 'source
    p2 = sx * (sy - 1) 'dest
    FOR y = 0 TO sy - 1
        FOR x = p1 TO p1 + sx - 1
            c = pixels(x)
            pixels2(p2) = ((c \ 65536) AND 255) + (c AND &HFF00&) + ((c AND 255&) * 65536)
            p2 = p2 + 1
        NEXT
        p1 = p1 + sx
        p2 = p2 - sx - sx
    NEXT

    pixels2(0) = sx + sy * 65536
    PUT (16, 50), pixels2(0), PSET

    _DISPLAY
End Sub

REM $INCLUDE:'SFML_GL.bm'






Theophage

  • Full Member
  • ***
  • Posts: 137
    • Email
Re: "sub...end sub" with qb64 ....???? out of range ???
« Reply #1 on: June 27, 2011, 08:48:54 AM »
Don't forget that variables are local not global by default.

When you define a variable in the main module, if you don't make it SHARED or CONST the SUB will treat it as zero or blank. And the other way around as well...

Daniel "Theophage" Clark
...
END OF LINE

Theophage

  • Full Member
  • ***
  • Posts: 137
    • Email
Re: "sub...end sub" with qb64 ....???? out of range ???
« Reply #2 on: June 27, 2011, 08:53:44 AM »
I have made this error more times than I'd care to count :(
...
END OF LINE

funkheld

  • Full Member
  • ***
  • Posts: 229
    • Email
Re: "sub...end sub" with qb64 ....???? out of range ???
« Reply #3 on: June 27, 2011, 01:44:05 PM »
hmmm..., with "gosub" is all ok.

Code: [Select]
'$INCLUDE:'GL_consts.bas'
DEFLNG A-Z

SCREEN _NEWIMAGE(800, 600, 32)
gosub ogl_init

gosub ogl_bild
DO
    _limit 30

LOCATE 2,2, 1
  a$ = INKEY$
  SELECT CASE a$
  print a$
      CASE  "w": y1=y1+5 : gosub ogl_bild
      CASE  "s": y1=y1-5 : gosub ogl_bild
      CASE  "q": x1=x1+5 : gosub ogl_bild
      CASE  "e": x1=x1-5 : gosub ogl_bild
      CASE CHR$(27): END
END SELECT
LOOP

ogl_init:
GL_INIT
gl_X = 256: gl_Y = 256
gl_helper_init gl_X, gl_Y

glEnable GL_DEPTH_TEST
glDepthMask GL_TRUE
glClearDepth 1
glMatrixMode GL_PROJECTION
glLoadIdentity
gluPerspective 90, 1, 1, 500
glEnable GL_TEXTURE_2D
glColor4f 1, 1, 1, 1
glMatrixMode GL_MODELVIEW

up = GL_LoadTexture("up.jpg")
aster =GL_LoadTexture("aster.jpg")
return

ogl_bild:
    glClear GL_DEPTH_BUFFER_BIT + GL_COLOR_BUFFER_BIT
    glLoadIdentity

    glTranslatef 0, 0, -180

    glRotatef x1, 0, 1, 0
    glRotatef y1, 1, 0, 0

    GL_SetTexture aster
     glBegin GL_QUADS
    'a cube
    glTexCoord2f 0, 0: glVertex3f -50, -50, -50
    glTexCoord2f 0, 1: glVertex3f -50, 50, -50
    glTexCoord2f 1, 1: glVertex3f 50, 50, -50
    glTexCoord2f 1, 0: glVertex3f 50, -50, -50

    glTexCoord2f 0, 0: glVertex3f -50, -50, 50
    glTexCoord2f 0, 1: glVertex3f -50, 50, 50
    glTexCoord2f 1, 1: glVertex3f 50, 50, 50
    glTexCoord2f 1, 0: glVertex3f 50, -50, 50

    glTexCoord2f 0, 0: glVertex3f -50, -50, -50
    glTexCoord2f 0, 1: glVertex3f -50, 50, -50
    glTexCoord2f 1, 1: glVertex3f -50, 50, 50
    glTexCoord2f 1, 0: glVertex3f -50, -50, 50

    glTexCoord2f 0, 0: glVertex3f 50, -50, -50
    glTexCoord2f 0, 1: glVertex3f 50, 50, -50
    glTexCoord2f 1, 1: glVertex3f 50, 50, 50
    glTexCoord2f 1, 0: glVertex3f 50, -50, 50

    glTexCoord2f 0, 1: glVertex3f -50, -50, 50
    glTexCoord2f 0, 0: glVertex3f -50, -50, -50
    glTexCoord2f 1, 0: glVertex3f 50, -50, -50
    glTexCoord2f 1, 1: glVertex3f 50, -50, 50

    glTexCoord2f 0, 1: glVertex3f -50, 50, 50
    glTexCoord2f 0, 0: glVertex3f -50, 50, -50
    glTexCoord2f 1, 0: glVertex3f 50, 50, -50
    glTexCoord2f 1, 1: glVertex3f 50, 50, 50
    glEnd

    GL_SetTexture up
    glBegin GL_QUADS
    'the "sky" box
    glTexCoord2f 0, 0: glVertex3f -200, -200, -200
    glTexCoord2f 0, 1: glVertex3f -200, 200, -200
    glTexCoord2f 1, 1: glVertex3f 200, 200, -200
    glTexCoord2f 1, 0: glVertex3f 200, -200, -200

    glTexCoord2f 0, 0: glVertex3f -200, -200, 200
    glTexCoord2f 0, 1: glVertex3f -200, 200, 200
    glTexCoord2f 1, 1: glVertex3f 200, 200, 200
    glTexCoord2f 1, 0: glVertex3f 200, -200, 200

    glTexCoord2f 0, 0: glVertex3f -200, -200, -200
    glTexCoord2f 0, 1: glVertex3f -200, 200, -200
    glTexCoord2f 1, 1: glVertex3f -200, 200, 200
    glTexCoord2f 1, 0: glVertex3f -200, -200, 200

    glTexCoord2f 0, 0: glVertex3f 200, -200, -200
    glTexCoord2f 0, 1: glVertex3f 200, 200, -200
    glTexCoord2f 1, 1: glVertex3f 200, 200, 200
    glTexCoord2f 1, 0: glVertex3f 200, -200, 200

    glTexCoord2f 0, 1: glVertex3f -200, -200, 200
    glTexCoord2f 0, 0: glVertex3f -200, -200, -200
    glTexCoord2f 1, 0: glVertex3f 200, -200, -200
    glTexCoord2f 1, 1: glVertex3f 200, -200, 200

    glTexCoord2f 0, 1: glVertex3f -200, 200, 200
    glTexCoord2f 0, 0: glVertex3f -200, 200, -200
    glTexCoord2f 1, 0: glVertex3f 200, 200, -200
    glTexCoord2f 1, 1: glVertex3f 200, 200, 200
    glEnd

    sx = gl_X
    sy = gl_Y
    IF oldsx < sx OR oldsy < sy THEN
        REDIM pixels(sx * sy) AS LONG
        REDIM pixels2(sx * sy) AS LONG
        oldsx = sx: oldsy = sy
    END IF
    glReadPixels 0, 0, sx, sy, GL_RGBA, GL_UNSIGNED_BYTE, pixels(1)
    'flip & convert RGB to BGR
    p1 = 0 'source
    p2 = sx * (sy - 1) 'dest
    FOR y = 0 TO sy - 1
        FOR x = p1 TO p1 + sx - 1
            c = pixels(x)
            pixels2(p2) = ((c \ 65536) AND 255) + (c AND &HFF00&) + ((c AND 255&) * 65536)
            p2 = p2 + 1
        NEXT
        p1 = p1 + sx
        p2 = p2 - sx - sx
    NEXT

    pixels2(0) = sx + sy * 65536
    PUT (16, 50), pixels2(0), PSET

    _DISPLAY
return

REM $INCLUDE:'SFML_GL.bm'


Clippy

  • Hero Member
  • *****
  • Posts: 16431
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
    • Email
Re: "sub...end sub" with qb64 ....???? out of range ???
« Reply #4 on: June 27, 2011, 01:52:26 PM »
A GOSUB is PART of the MAIN module code. It is NOT a separate procedure. Thus ALL variable values can be exchanged without having to SHARE them. They are shared automatically.

A SUB or FUNCTION is a separate procedure. The values are not SHARED unless you say so because sub-procedures CAN USE the SAME variable names and hold different values. That way, a SUB can be used in ANY program without a problem.
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 DLL files in a ZIP: Program64.zip

unseenmachine

  • Hero Member
  • *****
  • Posts: 3285
  • A fish, a fish, a fishy o!
Re: "sub...end sub" with qb64 ....???? out of range ???
« Reply #5 on: June 27, 2011, 02:08:14 PM »
STOP MIXING THE LIBRARIES!!!! Use either Galleons method or mine, but not both. You will cause your self untold problems and make it next to impossible for either one of us to offer any help as we only know our own methods.

I suggest you choose a method and start small, draw a triangle on the screen, then a multi-coloured blended triangle, then a textured one,etc.. then work on rotations, translations and more advanced stuff like lighting.
UnseenGDK Download : http://dl.dropbox.com/u/8822351/UnseenGDK.bm
GDK Tutorial : http://dl.dropbox.com/u/8822351/UnseenGDK_Tutorial.doc
VQB02 : http://dl.dropbox.com/u/8822351/VQB02.zip

unseenmachine

  • Hero Member
  • *****
  • Posts: 3285
  • A fish, a fish, a fishy o!
Re: "sub...end sub" with qb64 ....???? out of range ???
« Reply #6 on: June 27, 2011, 02:20:27 PM »
Here's a triangle using my wrapper.

Code: [Select]
REM $INCLUDE:'GL_Consts.bas'

RadHelp# = (4 * ATN(1)) / 180 'http:// Used for movement

SCREEN _NEWIMAGE(120, 120, 32)
_SCREENMOVE 0, 0

GL_INIT
GL_Screen 800, 600, "OpenGL - Base Code"
GL_MAX_FPS 30

glClearColor 0, 0, 0, 0
glEnable GL_DEPTH_TEST
glDepthMask GL_TRUE
glEnable GL_BLEND
glViewport 0, 0, 800, 600
GL_BASE

CamX! = 0: CamY! = 0: CamZ! = 0
XRot% = 0: Yrot% = 0: ZRot% = 0

DO
    _LIMIT 60
    glClear GL_COLOR_BUFFER_BIT OR GL_DEPTH_BUFFER_BIT

    glMatrixMode GL_MODELVIEW
    glLoadIdentity
    glPushMatrix

    'http:// Camera
    glRotatef XRot%, 1, 0, 0
    glRotatef Yrot%, 0, 1, 0
    glRotatef ZRot%, 0, 0, 1
    glTranslatef CamX!, CamY!, CamZ!

    'http:// Do GL drawing here.

    glBegin GL_TRIANGLES

    glVertex3f -5, -5, -5
    glVertex3f 0, 0, -5
    glVertex3f 5, -5, -5
    glEnd

    glPopMatrix


    'http:// GamePad and (Keyboard input - only works if GL window is active window.)
    JoyX% = GL_GamePad_Axis_Get_X(0)
    JoyY% = GL_GamePad_Axis_Get_Y(0)
    JoyY2% = GL_GamePad_Axis_Get_R(0)
    JoyX2% = GL_GamePad_Axis_Get_U(0)
    IF JoyX2% < -15 OR GL_Key_Left THEN
        IF Yrot% > 0 THEN Yrot% = Yrot% - 1 ELSE Yrot% = 360
    ELSEIF JoyX2% > 15 OR GL_Key_Right THEN
        IF Yrot% < 360 THEN Yrot% = Yrot% + 1 ELSE Yrot% = 0
    END IF
    YSin# = (SIN(Yrot% * RadHelp#) * 6)
    YCos# = (COS(Yrot% * RadHelp#) * 6)
    IF JoyY% > 25 OR GL_Key_Down THEN
        CamX! = CamX! + YSin#
        CamZ! = CamZ! - YCos#
    ELSEIF JoyY% < -25 OR GL_Key_Up THEN
        CamX! = CamX! - YSin#
        CamZ! = CamZ! + YCos#
    END IF
    YRot2# = (Yrot% + 90) * RadHelp#
    XRot2# = (XRot% + 90) * RadHelp#
    IF JoyX% < -25 OR GL_Key_A THEN
        CamX! = CamX! + (SIN(YRot2#) * 3)
        CamZ! = CamZ! - (COS(YRot2#) * 3)
    ELSEIF JoyX% > 25 OR GL_Key_S THEN
        CamX! = CamX! - (SIN(YRot2#) * 3)
        CamZ! = CamZ! + (COS(YRot2#) * 3)
    END IF

    GL_DISPLAY
    IF GL_Screen_Exit THEN SYSTEM
LOOP


REM $INCLUDE:'SFML_GL.bm'
UnseenGDK Download : http://dl.dropbox.com/u/8822351/UnseenGDK.bm
GDK Tutorial : http://dl.dropbox.com/u/8822351/UnseenGDK_Tutorial.doc
VQB02 : http://dl.dropbox.com/u/8822351/VQB02.zip

  • Print