How to force GL ES2 instead of GL ES3?

Problems building or running the engine, queries about how to use features etc.
slapin
Bronze Sponsor
Bronze Sponsor
Posts: 146
Joined: Fri May 23, 2025 5:04 pm
x 5

How to force GL ES2 instead of GL ES3?

Post by slapin »

Hi, all! To test shaders on PC I need some way to force ES2.0 render system to be in OpenGL ES 2.0 mode. How can I do it?

Ogre Version: master branch
Operating System: Ubuntu 22.04
Render System: OpenGL ES 2.0

paroj
OGRE Team Member
OGRE Team Member
Posts: 2204
Joined: Sun Mar 30, 2014 2:51 pm
x 1188

Re: How to force GL ES2 instead of GL ES3?

Post by paroj »

if it is just about shaders, starting them with

Code: Select all

#version 100

should be sufficient

slapin
Bronze Sponsor
Bronze Sponsor
Posts: 146
Joined: Fri May 23, 2025 5:04 pm
x 5

Re: How to force GL ES2 instead of GL ES3?

Post by slapin »

Well, I'd prefer to test full GL ES 2.0 context and version 100 shaders without modification of shaders themselves, so for Ogre to supply proper defines to them.

paroj
OGRE Team Member
OGRE Team Member
Posts: 2204
Joined: Sun Mar 30, 2014 2:51 pm
x 1188

Re: How to force GL ES2 instead of GL ES3?

Post by paroj »

Code: Select all

mDriverVersion.major = 2;
mDriverVersion.minor = 0;
mNativeShadingLanguageVersion = 100

in the ES2 RenderSystem should do the job.