Programming in Opengl-es 2.0 in ubuntu 10.10 - linux

I have done coding in OpenGl now I want to switch to OpenGL-ES 2.0 I know we need an emulator to run OpenGL-es on linux . I have done some examples using PVRSDK but now i want to do coding on my own . Can anyone tell me the way I can start coding in OpenGL-ES 2.0 for ubuntu 10.10.
Any tutorial or something like that.

I think you can use the following threads as a starting point:
Recommended practice environment for OpenGL ES 2.0?
Create an OpenGL ES 2.0 context on a "standard" Linux system
I use SDL 1.3 with the PVRSDK. You could also use the Mesa OpenGL ES wrapper libraries from the software repositories.
And in OpenGL 4.1 there also is the GL_ARB_es2_compatibility extension which should allow you to use the OpenGL ES functionality without the extra libraries.
I prefer to test with the PVRSDK though since that is the one that my Android device uses.

Related

How to do anti-aliasing in OpenGL ES 3.0

I'd like to implement anti-aliasing in my android OpenGL ES app, but all the examples I found were super old and not helping at all or were using OpenGL on PCs. Could someone give a code example to implement more modern techniques of AA?

Is there a way to use Kivy with OpenGL 1.1?

I recently ported an installer from an unmaintainable and complicated batch script to python and thought it would be a nice idea to have a neat graphical front end for the console installer. I decided to use Kivy because I used it for some pet projects at home and I and UI designing went nice and fast.
However, what I did not know until recently, is that Kivy seems only to work with OpenGL 2.0. Unfortunately our company's software is frequently installed on virtual machines and their virtualized graphics adapters often don't support OpenGL that is newer than 1.0 or 1.1 (VirtualBox for example). This prevents the Kivy app from starting or if it does start, doesn't render correctly.
I searched the internet for a way to get Kivy to work without OpenGL 2.0. Some posts on github and I think on reddit suggested to use Angle instead of sdl2 or switching to glew. I tried the suggested solutions but with no success.
I wonder, is there actually a way to get Kivy apps to work without OpenGL 2.0, like OpenGL 1.1 ?
I use Python 3.6.4 and Kivy 1.10.1 on Windows as a dev and target system.
Kivy targets OpenGL ES 2.0 as a minimum version. Note that OpenGL ES is not the same as OpenGL, it's closer to OpenGL 3.0.
This is a minimum required version, anything newer should work fine.
You can use angle on Windows if you want. I think we do it because it's more stable than relying on Windows OpenGL drivers, but I'm not sure.

Does linux support multi-touch screen

I'd like to develop my own app based on a arm-linux system, using QT.
I'd like my app to support multi-touch functions. And I'd like to know if it is possible. If so ,please let me know which version of Linux kernel I should use.
Linux started supporting Microsoft's Multi-touch protocol from kernel 3.8 onwards.
The reference is here:
https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt
Addendum
http://www.ptrackapp.com/apclassys-notes/embedded-linux-multitouch/
has arm multi-touch tutorial for iPhones but it applies equally to Android.
The hid-multitouch in linux supports a whole bunch of panels:
See
http://lxr.free-electrons.com/source/drivers/hid/hid-multitouch.c
for details
Addendum 2
Multi touch support has been somewhat there since 2.6 Ubuntu had multi touch support in its distribution in 2010.
Microsoft Multi-touch protocol support started in 3.8. Chrome OS support started in kernel v3.9. X.org server had multi touch support built into it in 2011.
Run command:
chromium --enable-pinch
for context menu
create shortcut application (.desktop)
/home/"your user"/.local/share/applications
OR
support all aplications
search:
multi touch compiz plugin
https://www.youtube.com/watch?v=rY-85BUqWgY

Make a game with Cocos2dx on Linux

I'm some familiar with Cocos2d and Cocos2dx.
But only I worked in Mac, I know which is possible work with this engine (Cocos2dx) in Windows, but I don't know if is possible develop a game on Linux.
By the way:
I'm not talking about a port, I want develop a Videogame multiplataform on Linux.
Would be great know the way of how start my game on Linux.
Thanks!
While I haven't tried it, cocos-2dx is, according to their documentation, is usable on Linux although my understanding is that this means one can build android projects using cocos2d on Linux.
In terms of where to start, I've used both SFML and SDL as both are well supported on Linux. Both are cross platform although SDL supports a wider range of platforms - I have an SDL2 game in progress that runs on Linux and android for instance whereas SFML does not yet have android or iOS support. Coming from cocos2d though I think you'll find the SFML API easiest to pick up.
As a fair warning, the landscape is a bit confusing at present because both SFML and SDL have a popular stable release (1.6 for SFML and 1.2 for SDL) with one API along side a popular development release (2.0 for SFML and 1.3/2.0 for SDL) that has a similar but not identical API. This is particularly noticeable with SDL where the documentation for 1.2 is much better than the documentation for the development API. In terms of choosing one over the other, the stable releases are precisely that - stable. In both cases the development releases have been under way for some time so if you are willing to dig for documentation a bit and ask questions it's worth getting the new features.
There is book that provides a nice introduction to Linux game development that, while dated, might be a good first step if this is your first outing with games on Linux, especially if you decide to use SDL Programming Linux Games.
Update:
I saw the directions here and after (roughly) following them cocos2dx does build on my Ubuntu 12.04 x64 machine. The "Set up Environment" directions seem sound but the makefile information appears to be out of date as there is no build_linux.sh instead there is a make-all-linux-project.sh. After this finished pulling in missing deps and building I changed into the samples/HelloCpp/proj.linux directory and ran make. This created a HelloCpp binary in samples/HelloCpp/proj.linux/bin/debug. Running that popped a HelloWorld cocos2d screen. According to the output the verison is:
cocos2d-x debug info [cocos2d: cocos2d-2.1beta3-x-2.1.0]
That said, I don't see a lot of documentation for the linux port and most of the related community entries seem to be out of date so you may find more support from using one of the libraries I already mentioned.
Download cocos2d-x project there is a test sample games which compiles on all platform android, windows, iOS , Windows Phone ...See you are going to code in c++ that's it then whether you build it in linux or any other platform doesnt matter for cocos2d-x kind of engine
so i suggest start with the sample projects of cocos2d-x .... and as you want to do it in linux ...make something then compile it in linux like I do ...

MonoGame throws MonoGameGLException (InvalidEnum) Error When Creating Texture

Running any of the "Sample" projects that come with MonoGame will result in "MonoGameGLException". This occurs in the Texture2D constructor at the following code..
GL.CompressedTexImage2D(TextureTarget.Texture2D, 0, glInternalFormat,
this.width, this.height, 0,
imageSize, IntPtr.Zero);
GraphicsExtensions.CheckGLError(); <-- Error here
The value for "glInternalFormat" is:
OpenTK.Graphics.OpenGL.PixelInternalFormat.CompressedRgbaS3tcDxt3Ext
This occurs on Ubuntu Linux running on an Intel integrated graphics card.
TL;DR
This is an error that is caused because the OpenGL implementation (Mesa) does not contain support for the internal texture format (S3TC). Install the libtxc_dxtn library to add this functionality to Mesa.
The Problem
OpenGL is the graphics API that MonoGame uses to render graphics. Since OpenGL is just an API, you need some implementation of that API in order to have it work on your system. If you had an NVIDIA or ATI card, you could download their proprietary drivers (which include closed-source implementations of the OpenGL API). If you are not using their proprietary drivers (or are using a card like Intel graphics card that has open source drivers), then you are probably running Mesa, which is an open-source implementation of the OpenGL API standard.
OpenGL has a base standard, but it also has many extensions. One of these extensions is EXT_texture_compression_s3tc. This is an extension that allows the user to specify that the textures we are loading into the graphics card should be compressed using a specific algorithm of the S3TC family of algorithms. That is what the "GL.CompressedTexImage2D" line actually does: it requests that we make room for a texture that will be compressed using the DXT3 algorithm.
Mesa does not implement ALL of the OpenGL API and list of extensions. Specifically, they do not implement the S3TC extension (due to legal reasons).
"Invalid Enum" is the error that Mesa is throwing because you are trying to tell Mesa to use an extension (as specified by the enumerated value PixelInternalFormat.CompressedRgbaS3tcDxt3Ext) that Mesa does not support. This is the standard way an OpenGL implementation tells you that you are referring to an unsupported value.
The Solution
So, there are two options to fix this:
First, workaround MonoGame so that it stops using S3TC. This might require changing MonoGame code, or perhaps there is a better way using the ContentPipeline to specify what texture compression algorithm to use.
Second, install the S3TC algorithm. While Mesa does not include S3TC by default, you can include an external library for Mesa. More details on the Mesa Wiki S3TC page. Mesa needed to be built with a specific compiler flag, and then the library needs to be installed. In my Ubuntu install (12.04), I'm assuming that the Mesa package did have this flag enabled when compiling, since installing the library worked well. In Ubuntu, I installed the libtxc-dxtn-s2tc0 package.
sudo apt-get install libtxc-dxtn-s2tc0
After that, all the MonoGame samples were working.

Resources