Was looking for this...had to dig around in the threads...no longer.
There is a copy of it already in the samples directory when you install GLBasic
I lost mine :P
Is this the last one? Is it newer or at least as new as the one Gernot published here: http://www.glbasic.com/forum/index.php?topic=7801.msg66675#msg66675 ?
I dont know if thats the same one.
Gernot linked this one, this year.
Im assuming he keeps it updated.
It works for me, dont think much will change in it .
I just checked it out, its the same one.
No i compared it with winmerge, they are not the same. The one you linked is the older one, i think.
Quote from: kanonet on 2012-Nov-17
the one Gernot published here: http://www.glbasic.com/forum/index.php?topic=7801.msg66675#msg66675 ?
I could be wrong but this one may have been altered for better GLES compatibility rather than a general OpenGL update?
I think so too, but i think in general opengl you lose nothing when you use it, but you win in opengles, so i would prefer tp use it.
ok ill add it to the top post
Everytime I try to run an app on Nexus 7 (Android) that includes the OpenGLES file I get an error message before anything starts up, "Unfortunately, [app] has stopped."
I also get the same message when I use Kanonet's X_SPRITE replacement code (http://www.glbasic.com/forum/index.php?topic=7992.0).
Anyone come across a similar issue and solved it? If not, any idea how or if this can be dealt with?
I'm using IDE 11.261
[ Edit: Ok, so OpenGL ES (used in Android and iPhone, probably other mobile devices too) doesn't have glBegin, glVertex or glEnd. Would need to re-code for Android. Will start here if I get the time: http://pandorawiki.org/OpenGL_ES_1.1_Tutorial (http://pandorawiki.org/OpenGL_ES_1.1_Tutorial) ]
Would anyone be able to supply a bit of example code how to get started with gl.gbas as i don't have a scooby!
It's a 1:1 wrapper.
Search for some GL-Tutorials :)
glBegin should be wrapped internally. Try it.
I have got some quads working but am having difficulty with textures,
I am using spritetomem -> tex% but glTexImage2D wont accept the array.
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 32, 32, 0, GL_RGBA, GL_UNSIGNED_BYTE, tex%)
Please could someone put me out of my misery.
gl.gbas needs to be included to run this...
FOR f=0 TO 10
//IF aaaa=0 THEN END
//FOR s=0 TO 32*32-1
glClear(GL_COLOR_BUFFER_BIT AND GL_DEPTH_BUFFER_BIT AND GL_POLYGON_SMOOTH); // Clear The Screen And The Depth Buffer
glLoadIdentity(); // Reset The Current Modelview Matrix
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 32, 32, 0, GL_RGBA, GL_UNSIGNED_BYTE, tex%);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glVertex3f(-sc, -sc,0) //tl
glTexCoord2f( 1,0) //br
glTexCoord2f( 0,0) //
glVertex3f( -sc, sc,0) // bl
glEnd(); // Done Drawing A Quad
IF KEY(203) THEN DEC x,1
IF KEY(205) THEN INC x,1
IF KEY(200) THEN DEC y,1
IF KEY(208) THEN INC y,1
IF KEY(12) THEN DEC z,.1
IF KEY(13) THEN INC z,.1
Try this ;)
Hahahahahha no way!!
It's that simple,There i was trying to work out pointers in C etc etc.
Thanks very much Schranz0r
No problem :)
I don't understand Kitty,I have tried addressof but it only accepts a function name.
I looked through the Docs and checked the examples and understand what addressof does but cannot see how it pertains?