missing mod brl.blitzgl

BlitzMax Forums/BlitzMax Beginners Area/missing mod brl.blitzgl

Hi,

I'm new to BMax and wanted to try the NeHe-Tutorials. But they don't compile: "cant find interface for module brl.blitzgl".

I don't see a module called blitzgl (so this is the problem, right?). But where do I get it from?

Sorry in advance if this is a bloody noobish question ;)

It does not exist anymore. That was Pre BM 1.10
I think its now brl.glgraphics and the commands changed from bgl... to gl...

Hi everybody,

Same problem here.
Could someone please post a current version of the fabulous NeHe tutorials or send a link where to get it for BlitzMax 1.18 !?

Thanks in advance
Bernd

At the top of the forums page there is a link to the updated versions.

There you can download BlitzMax 1.18, but where do I get the updated NeHe tutorials from ?

Thanks in advance
Bernd

There aren't any updated tutorials. You will have to alter the commands manually. (most likely its only a bgl -> gl change if the command still exists.)

Thanks Dreamora, but your first post didnt help:

>>> I think its now brl.glgraphics and the commands changed from bgl... to gl...

Taking tutorial 2 or 3, the errors in their order of appearance:

1.) Can't find interface for module brl.blitzgl
2.) bglCreateContext not found
3.) bglDrawText not found
4.) FlushMem

... and so forth. It is a little more than just exchanging bgl/gl ...

Regards
Bernd

1) Change to brl.glgraphics (Or Just delete the framework stuff)

2)Change for
SetGraphicsDriver( GLGraphicsDriver( ))
Graphics ScreenWidth , ScreenHeight

3) Delete the b i.e. glDrawText

4) Is now automatic, just delete

Not much:

Its now brl.glgrahics instead of brl.blitzgl
bglcreatecontext -> glgraphics
bgldrawtext -> gldrawtext
flushmem is not needed anymore unless you use GCSetMode

all other error most likely result because of the interface problem.

Ok:
brl.glgraPhics instead of brl.blitzgl
bglcreatecontext -> glgraphics
bgldrawtext -> gldrawtext
comment out flushmem

however this fails, I tried changing removing the b here but no difference:
bglSetMouseVisible False
bglSwapBuffers

I changed glSwapBuffers to flip , is this correct ?

Yep. Does it not work for you then?

bglCreateContext ===>

SetGraphicsDriver( GLGraphicsDriver( ))
Graphics ScreenWidth , ScreenHeight

As said four posts and 5 (bloody hell time flies) months ago. (mind you its probably not right)

@H&K, you can simply change bglcreatecontext to glgraphics
and it seems to work.
'Framework brl.blitzgl
'Import  brl.system

Global ScreenWidth:Int=800
Global ScreenHeight:Int=600
Global ScreenDepth:Int=32

GLGraphics(ScreenWidth,ScreenHeight,ScreenDepth,0,BGL_BACKBUFFER | BGL_DEPTHBUFFER) '| BGL_FULLSCREEN
InitGl()

While Not KeyHit( KEY_ESCAPE )
	nehe2()
	glColor3f(1.0,1.0,1.0)
	'Framecounter--------------------------------------------
	Framecounter_counter=Framecounter_counter+1
	If Framecounter_time=0 Then Framecounter_time=MilliSecs()
	If Framecounter_time+1001 <MilliSecs() Then
		Framecounter_framerate=Framecounter_counter
		Framecounter_counter=0
		Framecounter_time=MilliSecs()
	EndIf
	GLDrawText("FPS : "+Framecounter_framerate,ScreenWidth-(8*12),ScreenHeight-16-8)
	'--------------------------------------------------------
	GLDrawText("Nehe lesson 2",10,24)
'	FlushMem
Flip
Wend
End

Function InitGl()
	glClearColor(0.0, 0.0, 0.0, 0.0)
	glClearDepth 1.0
	glDepthFunc(GL_LESS)
	glEnable(GL_DEPTH_TEST)
	glFrontFace(GL_CW)
	glShadeModel(GL_SMOOTH)
	glViewport(0,0,ScreenWidth,ScreenHeight)
	glMatrixMode(GL_PROJECTION)
	glLoadIdentity()
	gluPerspective(45.0,Float(ScreenWidth)/Float(ScreenHeight),1.0,100.0)
	glMatrixMode(GL_MODELVIEW)
End Function

Function nehe2()
	glClear GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT
	glLoadIdentity
	glTranslatef -1.5,0.0,-6.0
	glBegin %GL_POLYGON
		glVertex3f  0.0, 1.0, 0.0          ' Top
		glVertex3f  1.0,-1.0, 0.0          ' Bottom Right
		glVertex3f -1.0,-1.0, 0.0          ' Bottom Left
	glEnd
	glTranslatef 3.0,0.0,0.0
	glBegin %GL_QUADS
		glVertex3f -1.0, 1.0, 0.0          ' Top Left
		glVertex3f  1.0, 1.0, 0.0          ' Top Right
		glVertex3f  1.0,-1.0, 0.0          ' Bottom Right
		glVertex3f -1.0,-1.0, 0.0          ' Bottom Left
	glEnd
End Function 

might be some additional changes required in later tutorials (e.g. bglSetMouseVisible False to hidemouse or comment it out) but that should be a start on 1.22

@Tony,

I was under the impression that if I didnt do it the way I did, then I couldnt use the ordinary max2d commands as well as the gl commands. might be wrong tho, as it was so long ago.

just trying to get the Nehe tutorials working.

Oh yea, forgot that. Shutting up now.