You have a "TL;DR" on the last line of this post.
It's my first message on this forum, so a short presentation of myself seems adequate: I am a computer scientist ( a programmer ), I am french ( so I'll do/I did/ I am doing many grammars and syntaxes errors ), and I am currently developing on a fairly old computer running an Ubuntu 16 and not even having opengl 2.0.
It does have extensions, however, so I have shaders but with limitations etc. Oh, and I don't have an Internet connection at home.
I also have an Android much more recent.
And happy new year everybody.
That being said let's go to the topic at hand. I would played a bit with love and so far so good. But I would like to go one step further: 3D.
I already have some experience with opengl, so I only need to get started.
I plan to use ffi. Actually, I managed to do a glClearColor and a glClear ( never though I cannot guarantee that this one passed ) and change the background of the window. But nothing more. I tried a glBegin/glEnd with triangles of all winding and size I could think of, but got nothing on screen.
The same thing with a GLUT created window gave me the expected triangle.
I tried to reset what I could think of:
Code: Select all
glUseProgram( p );
glBindTexture( texture2d constant and 0 )
glLoadIdentity
I tried to delve into the sources ( I managed to compile love 11.4 ) but it's not my way of coding and I admit I am not fond of it ( not a critic: it's just not how I organize my programs, it's a matter of taste ).
Could someone give me a list of the things I should disable/reset to obtain a genuine opengl context ?
You may ask: "why using love, if you want 3d and don't plan to use love.graphics ?"
Answer: because I have it ( no internet connection = it's a hassle to get any program running on Ubuntu ), because it's handle the input and the sound for me ( still that I won't have to write ) and more importantly because it runs on Android.
Plus if I use ffi to import opengl functions, it means I'll be using luajit. Which is fine, but I also need string.unpack which doesn't exist in luajit. But love provides a replacement.
You may ask: " why don't compile for Android directly ?". For the same reason as before: no internet, so good luck to install the ndk, plus good luck to setup everything correctly on a 32bits machine.
Tl;dr: what should I call to reset the opengl context to it's original state ?