Easy GL2D

User projects written in or related to FreeBASIC.
relsoft
Posts: 1767
Joined: May 27, 2005 10:34
Location: Philippines
Contact:

Postby relsoft » Aug 17, 2010 8:21

Ayus lang. Ikaw?
;*)
Galeon
Posts: 563
Joined: Apr 08, 2009 5:30
Location: Philippines
Contact:

Postby Galeon » Aug 17, 2010 8:34

OK lang. Wala na akong cellphone kaya 'di ako nagpaparamdam.
relsoft
Posts: 1767
Joined: May 27, 2005 10:34
Location: Philippines
Contact:

Postby relsoft » Aug 17, 2010 8:44

Okay lang pre. Nasa irc.freenode.net naman ako palagi ##freebasic.

Kitakits dun.
Galeon
Posts: 563
Joined: Apr 08, 2009 5:30
Location: Philippines
Contact:

Postby Galeon » Aug 17, 2010 8:50

Sige pupunta nalang ako doon mamayang gabi. Ginagawa nating chatroom to eh, hehehe... May pupuntahan lang ako.
Lachie Dazdarian
Posts: 2338
Joined: May 31, 2005 9:59
Location: Croatia
Contact:

Postby Lachie Dazdarian » Aug 17, 2010 9:12

Barbarians. Hide your children.
badmrbox
Posts: 659
Joined: Oct 27, 2005 14:40
Location: Sweden
Contact:

Postby badmrbox » Aug 17, 2010 14:11

This is good stuff Rel :).
relsoft
Posts: 1767
Joined: May 27, 2005 10:34
Location: Philippines
Contact:

Postby relsoft » Aug 18, 2010 6:16

UPDATE: V. 0.3

Code: Select all

1. Fixed the bind-texture lineglow bug(Now faster than ever)
2. sprite_scale()
3. sprite_rotate_scale()
4. sprite_stretch()
5. sprite_stretch_h()
6. readme and docs
7. demo update



Same link on first post.

I now deem this thing complete(barring bugs of course).

Anyways, how much FPS did you guys get w/o vsynch?
h4tt3n
Posts: 694
Joined: Oct 22, 2005 21:12
Location: Denmark

Postby h4tt3n » Aug 18, 2010 15:01

Here's the openGL draw angled ellipse function, as promised. It could be improved, but it works quite well as it is imho. Feel free to modify :)

Code: Select all

''   Very fast ellipse drawing function by Michael "h4tt3n" Nissen
''   version 4.0 March 2010

''   syntax:
''   DrawEllipse(center x, center y, semimajor axis, semiminor axis, angle in radians, color)

#include once "GL/gl.bi"
#include once "GL/glu.bi"

Randomize

Declare Sub Initialize_OpenGl_2D()

declare sub DrawEllipse(byval x as single, byval y as single, byval a as single, _
byval b as single, byval angle as single, byval col as uinteger)

Dim Shared As Integer Scrn_Wid = 800, Scrn_Hgt = 600, Scrn_Bpp = 32, Scrn_Full = 0, wid = 512, hgt = 512

Initialize_OpenGl_2D()

Do
   
glClear GL_COLOR_BUFFER_BIT Or GL_DEPTH_BUFFER_BIT

drawellipse(400, 300, 10+Rnd*400, 10+Rnd*400, Rnd*8*Atn(1), RGB(Rnd*256, Rnd*256, Rnd*256))

Flip

Sleep 100, 1

Loop Until MultiKey(1)

sleep

end

''   the sub
Sub DrawEllipse(ByVal x as single, ByVal y as single, ByVal a as single, ByVal b as single, ByVal angle As Single, ByVal col As uinteger)
   
   ''   these constants decide the graphic quality of the ellipse
   const as single    pi                  = 4*atn(1)   ''   pi
   const as single    twopi            = 2*pi         ''   two pi (radians in a circle)
   const as integer face_length   = 8               ''   approx. face length in pixels
   const as integer max_faces      = 256         ''   maximum number of faces in ellipse
   const as integer min_faces      = 16            ''   minimum number of faces in ellipse
   
  ''   approx. ellipse circumference (Hudson's method)
  dim as single h   = (a-b*a-b)/(a+b*a+b)
  dim as single circumference = 0.25*pi*(a+b)*(3*(1+h*0.25)+1/(1-h*0.25))
 
  ''   number of faces in ellipse
  dim as integer num_faces = circumference\face_length
 
  ''   clamp number of faces
  if num_faces > max_faces then num_faces = max_faces
  if num_faces < min_faces then num_faces = min_faces
 
  ''   keep number of faces divisible by 4
  num_faces -= num_faces mod 4
 
  ''   precalc cosine theta
  dim as double s    = sin(twopi/num_faces)
   dim as Double c    = cos(twopi/num_faces)
  dim as Double xx    = 1
  dim as Double yy    = 0
  dim as Double xt    = 0
  Dim As Double ax  = Cos(angle)
  Dim As Double ay  = Sin(angle)
   
   ''   split color into RGB values
   Dim As UByte red = (Col Shr 16) and &hFF
   Dim As UByte grn = (Col Shr 8) and &hFF
   Dim As UByte blu = Col And &hFF
 
  ''   draw ellipse
   glbegin(GL_LINE_LOOP)
      glcolor3UB(red, grn, blu)
     for i as integer = 1 to num_faces-1
        xt = xx
       xx = c * xx - s * yy
       yy = s * xt + c * yy
        glvertex2f(x+a*xx*Ax-b*yy*Ay,   y+a*xx*Ay+b*yy*Ax)
     Next
     glvertex2f(x+a*Ax,   y+a*Ay)
  glend()
 
end Sub

''  this sub initializes an opengl screen

Sub Initialize_OpenGl_2D()
 
  ''  check current screen settings
  'ScreenInfo Scrn_Wid, Scrn_Hgt, Scrn_Bpp
 
  ''  define screen settings
  ScreenRes Scrn_Wid, Scrn_Hgt, Scrn_Bpp,, 2 OR Scrn_Full
 
  '' Define matrix
  glMatrixMode(GL_PROJECTION)     
  glLoadIdentity()
 
  '' Define screen axis as FreeBasic style (0,0 in top left corner)
  glViewport (0, 0, Scrn_Wid, Scrn_Hgt)
  glOrtho(0, Scrn_Wid, Scrn_Hgt, 0, -128, 128)
 
  glMatrixMode(GL_MODELVIEW)
  glLoadIdentity()
 
  glShadeModel(GL_SMOOTH)
  glClearColor(0.0, 0.0, 0.0, 0.0)
 
  '' Depth test
  glClearDepth(128.0)
  glEnable(GL_DEPTH_TEST)         
  glDepthFunc(GL_LESS)
 
  '' Alpha test
  glEnable(GL_ALPHA_TEST)         
  glAlphaFunc(GL_GREATER, 0.1)
 
  '' Activate blending, including the use of alpha channel
  glEnable(GL_BLEND)               
  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
 
End Sub

relsoft
Posts: 1767
Joined: May 27, 2005 10:34
Location: Philippines
Contact:

Postby relsoft » Aug 18, 2010 15:15

kool!!! I'll definitely add this. Thanks!
rolliebollocks
Posts: 2655
Joined: Aug 28, 2008 10:54
Location: new york

Postby rolliebollocks » Aug 20, 2010 22:20

@Rel

Is it possible to render fb.images pixel by pixel using your put pixel sub? And... Can I convert from fb.images to 2DGL sprites on the fly?

I want to have an OGL rendering option but I would just want it to plot pixels really. Is it worth it? Would it be faster?
relsoft
Posts: 1767
Joined: May 27, 2005 10:34
Location: Philippines
Contact:

Postby relsoft » Aug 20, 2010 23:24

rolliebollocks wrote:@Rel

Is it possible to render fb.images pixel by pixel using your put pixel sub? And... Can I convert from fb.images to 2DGL sprites on the fly?

I want to have an OGL rendering option but I would just want it to plot pixels really. Is it worth it? Would it be faster?


Sorry HW is not very fast on per-pixel rendering. HW is optimized for block moves and primitives.

Re: fb.images to gl2d sprites.

I've thought about this already and the only way we coould use the HW fully is ti texture batch by using the heuristic I used with texture packing and unload/reload gltextures to vram on every createimage() call.
relsoft
Posts: 1767
Joined: May 27, 2005 10:34
Location: Philippines
Contact:

Postby relsoft » Aug 21, 2010 15:09

Update ver 0.4

Added more primitives
Glowline looks better
More sprite stretching
Many more stuff I'm too lazy to document

Same linky on first post.

Image

Minigame I posted from QB to FB using gl2d.

Asteroidz!!!

http://rel.betterwebber.com/junk.php?id=116
badmrbox
Posts: 659
Joined: Oct 27, 2005 14:40
Location: Sweden
Contact:

Postby badmrbox » Aug 21, 2010 17:15

When I'm trying to use ver 0.4 I get alot of 'undefined reference to...'
What am I doing wrong?
Ophelius
Posts: 428
Joined: Feb 26, 2006 1:57

Postby Ophelius » Aug 21, 2010 18:29

The demo and asteroid game doesn't render inside the window borders, but on my desktop starting at the top-left corner. When I end the program, the image stays there until I clean it by passing a window over it. Anybody else have this problem?

Edit: Thanks for this Rel. I can now think of graduating from the archaic Allegro 4 library into something more compatible. Does it support 8-bit graphics? Palette effects are essential for 2d 8-bit games. I don't know much about gl.

Edit2: I found that if I maximize the window, it goes into fullscreen mode, but the taskbar and window is still visible. Any way to run it in real fullscreen mode?

Edit 3: @Badmrbox I'm getting the same problem, can't compile with the same errors. Here's a copy of my error log:

Code: Select all


C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x2d): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x73): undefined reference to `_ZN4GL2D6SPRITEEiiRKNS_9TGLSPRITEE@12'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x12d6): undefined reference to `_ZN4GL2D11SCREEN_INITEii@8'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x133b): undefined reference to `_ZN4GL2D20LOAD_BMP_TO_GLSPRITEER8FBSTRING@8'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x139b): undefined reference to `_ZN4GL2D19LOAD_BMP_TO_TEXTUREER8FBSTRING@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x13f0): undefined reference to `_ZN4GL2D19LOAD_BMP_TO_TEXTUREER8FBSTRING@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x14fd): undefined reference to `_ZN4GL2D12INIT_SPRITESERANS_9TGLSPRITEERAjiij@20'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1520): undefined reference to `_ZN4GL2D12INIT_SPRITESERANS_9TGLSPRITEERAjiij@20'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1612): undefined reference to `_ZN4GL2D12CLEAR_SCREENEv@0'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1632): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1672): undefined reference to `_ZN4GL2D16CIRCLE_2D_FILLEDEiiij@16'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x169e): undefined reference to `_ZN4GL2D9CIRCLE_2DEiiij@16'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x16a5): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x16bd): undefined reference to `_ZN4GL2D10BOX_FILLEDEiiiij@20'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x16c4): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x16d4): undefined reference to `_ZN4GL2D6SPRITEEiiRKNS_9TGLSPRITEE@12'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1715): undefined reference to `_ZN4GL2D12SPRITE_SCALEEiifRKNS_9TGLSPRITEE@16'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x171c): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1735): undefined reference to `_ZN4GL2D6SPRITEEiiRKNS_9TGLSPRITEE@12'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x173c): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1755): undefined reference to `_ZN4GL2D6SPRITEEiiRKNS_9TGLSPRITEE@12'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1771): undefined reference to `_ZN4GL2D6SPRITEEiiRKNS_9TGLSPRITEE@12'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x179f): undefined reference to `_ZN4GL2D11SPRITE_FLIPEiiNS_11E_FLIP_MODEERKNS_9TGLSPRITEE@16'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x17d6): undefined reference to `_ZN4GL2D11SPRITE_FLIPEiiNS_11E_FLIP_MODEERKNS_9TGLSPRITEE@16'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x17f3): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x182b): undefined reference to `_ZN4GL2D11SPRITE_FLIPEiiNS_11E_FLIP_MODEERKNS_9TGLSPRITEE@16'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1876): undefined reference to `_ZN4GL2D11SPRITE_FLIPEiiNS_11E_FLIP_MODEERKNS_9TGLSPRITEE@16'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x187d): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x18c4): undefined reference to `_ZN4GL2D16SPRITE_STRETCH_HEiiiRKNS_9TGLSPRITEE@16'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x18cb): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x18e7): undefined reference to `_ZN4GL2D6SPRITEEiiRKNS_9TGLSPRITEE@12'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1903): undefined reference to `_ZN4GL2D6SPRITEEiiRKNS_9TGLSPRITEE@12'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x191f): undefined reference to `_ZN4GL2D6SPRITEEiiRKNS_9TGLSPRITEE@12'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x193f): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x195b): undefined reference to `_ZN4GL2D6SPRITEEiiRKNS_9TGLSPRITEE@12'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1977): undefined reference to `_ZN4GL2D6SPRITEEiiRKNS_9TGLSPRITEE@12'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x197e): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x19a4): undefined reference to `_ZN4GL2D13SPRITE_ROTATEEiiiRKNS_9TGLSPRITEE@16'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x19ab): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x19eb): undefined reference to `_ZN4GL2D19SPRITE_ROTATE_SCALEEiiifRKNS_9TGLSPRITEE@20'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1a13): undefined reference to `_ZN4GL2D13SPRITE_ROTATEEiiiRKNS_9TGLSPRITEE@16'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1a33): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1a4c): undefined reference to `_ZN4GL2D6SPRITEEiiRKNS_9TGLSPRITEE@12'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1a66): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1a82): undefined reference to `_ZN4GL2D6SPRITEEiiRKNS_9TGLSPRITEE@12'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1a89): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1aa5): undefined reference to `_ZN4GL2D6SPRITEEiiRKNS_9TGLSPRITEE@12'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1ac2): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1adb): undefined reference to `_ZN4GL2D6SPRITEEiiRKNS_9TGLSPRITEE@12'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1b7b): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1ba5): undefined reference to `_ZN4GL2D14SPRITE_STRETCHEiiiiRKNS_9TGLSPRITEE@20'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1bc5): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1bf9): undefined reference to `_ZN4GL2D6SPRITEEiiRKNS_9TGLSPRITEE@12'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1c00): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1c33): undefined reference to `_ZN4GL2D6SPRITEEiiRKNS_9TGLSPRITEE@12'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1c79): undefined reference to `_ZN4GL2D6SPRITEEiiRKNS_9TGLSPRITEE@12'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1c80): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1cb3): undefined reference to `_ZN4GL2D6SPRITEEiiRKNS_9TGLSPRITEE@12'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1cdd): undefined reference to `_ZN4GL2D19BOX_FILLED_GRADIENTEiiiijjjj@32'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1ce4): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1d0c): undefined reference to `_ZN4GL2D9LINE_GLOWEfffffj@24'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1d34): undefined reference to `_ZN4GL2D9LINE_GLOWEfffffj@24'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1d5c): undefined reference to `_ZN4GL2D9LINE_GLOWEfffffj@24'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1d84): undefined reference to `_ZN4GL2D9LINE_GLOWEfffffj@24'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1da2): undefined reference to `_ZN4GL2D7LINE_2DEiiiij@20'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1da9): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1dc4): undefined reference to `_ZN4GL2D3BOXEiiiij@20'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1de6): undefined reference to `_ZN4GL2D8TRIANGLEEiiiiiij@28'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1e05): undefined reference to `_ZN4GL2D15TRIANGLE_FILLEDEiiiiiij@28'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1e22): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1e51): undefined reference to `_ZN4GL2D24TRIANGLE_FILLED_GRADIENTEiiiiiijjj@36'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1e58): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1edc): undefined reference to `_ZN4GL2D9PUT_PIXELEiij@12'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x1ef6): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x20a4): undefined reference to `_ZN4GL2D9LINE_GLOWEfffffj@24'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x2153): undefined reference to `_ZN4GL2D14SET_BLEND_MODEENS_12E_BLEND_MODEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x21ef): undefined reference to `_ZN4GL2D11PRINT_SCALEEiifRK8FBSTRING@16'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x2228): undefined reference to `_ZN4GL2D15DESTROY_SPRITESERANS_9TGLSPRITEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x2234): undefined reference to `_ZN4GL2D15DESTROY_SPRITESERANS_9TGLSPRITEE@4'
C:\Documents and Settings\Justin\Desktop\fb_gl2d\FBIDETEMP.o:fake:(.text+0x2239): undefined reference to `_ZN4GL2D7DESTROYEv@0'

Results:
Compilation failed

System:
FBIde: 0.4.6
fbc:   FreeBASIC Compiler - Version 0.21.1 (08-11-2010) for win32 (target:win32)
OS:    Windows XP (build 2600, Service Pack 3)
relsoft
Posts: 1767
Joined: May 27, 2005 10:34
Location: Philippines
Contact:

Postby relsoft » Aug 22, 2010 1:14

Sorry for the error guys. I uploaded the wrong zips. Mea culpa.

I uploaded the v.4 now on the same linky. It is named "fb_gl2d_v4.zip"

As for the errors, you need add gl2d.bas as a module.

The easiest way is to do this(if you don't want to do a multi-module program):

Code: Select all

#include once "gl2d.bi"

#include once "gl2d.bas"

''' your code here



Also uploaded a new version of asteroidz.

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 10 guests