John Stabler
Posts: 6
Joined: Wed Nov 23, 2011 11:51 am

Re: OpenGL Maximum Texture Size

Fri Dec 09, 2011 12:01 pm

I was just wondering if anybody has tinkered with OpenGL on the RP? For instance, what is the maximum texture size supported? Video modes etc...

Thanks!

ross
Posts: 13
Joined: Fri Aug 26, 2011 8:18 pm

Re: OpenGL Maximum Texture Size

Fri Dec 09, 2011 5:34 pm

It ought to be very similar to what is reported here:
http://www.glbenchmark.com/phonedetails ... stgroup=gl

e.g. GL_MAX_TEXTURE_SIZE 2048

John Stabler
Posts: 6
Joined: Wed Nov 23, 2011 11:51 am

Re: OpenGL Maximum Texture Size

Fri Dec 09, 2011 8:57 pm

Thanks for the link, ross. That\'s good news for me and probably a lot of other game developers.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27433
Joined: Sat Jul 30, 2011 7:41 pm

Re: OpenGL Maximum Texture Size

Fri Dec 09, 2011 9:56 pm

I\'ll try and remember to check this when I have time, but the 701 uses the same GPU so is going to be around that size (although does depend on the build I think).
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

gladoscc
Posts: 58
Joined: Sat Dec 10, 2011 3:32 am

Re: OpenGL Maximum Texture Size

Sat Dec 10, 2011 4:05 am

Wait, what? GL_MAX_LIGHTS is FOUR? OpenGL specs require at least 8.

kme
Posts: 448
Joined: Sun Sep 04, 2011 9:37 am

Re: OpenGL Maximum Texture Size

Sat Dec 10, 2011 4:20 am

[quote]Quote from gladoscc on December 10, 2011, 04:05
Wait, what? GL_MAX_LIGHTS is FOUR? OpenGL specs require at least 8. [/quote]It also says eight in the above link.

gladoscc
Posts: 58
Joined: Sat Dec 10, 2011 3:32 am

Re: OpenGL Maximum Texture Size

Sat Dec 10, 2011 4:27 am

[quote]Quote from kme on December 10, 2011, 04:20
[quote]Quote from gladoscc on December 10, 2011, 04:05
Wait, what? GL_MAX_LIGHTS is FOUR? OpenGL specs require at least 8. [/quote]It also says eight in the above link.[/quote]
Ahh, I\'m sorry, I somehow misread :(

User avatar
paddyg
Posts: 2591
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: OpenGL Maximum Texture Size

Thu Jan 31, 2013 4:30 pm

Has anyone ever run into an issue with textures greater than 1024x1024 on the rpi? The reason I ask is because I'm trying to do 'exact' rendering of images as part of the pi3d library and they 'go wrong' when I try and use larger images. I have taken out anything from our code (I think) that might be trying to rescale the image.

If people say they have used bigger textures then I will continue searching for a bug in my code.

[Shader code on https://github.com/tipam/pi3d/blob/inte ... 2d_flat.fs might be hard going out of context]
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

User avatar
PeterO
Posts: 5972
Joined: Sun Jul 22, 2012 4:14 pm

Re: OpenGL Maximum Texture Size

Thu Jan 31, 2013 4:57 pm

paddyg wrote:Has anyone ever run into an issue with textures greater than 1024x1024 on the rpi? The reason I ask is because I'm trying to do 'exact' rendering of images as part of the pi3d library and they 'go wrong' when I try and use larger images. I have taken out anything from our code (I think) that might be trying to rescale the image.

If people say they have used bigger textures then I will continue searching for a bug in my code.

[Shader code on https://github.com/tipam/pi3d/blob/inte ... 2d_flat.fs might be hard going out of context]
What does GlGet for GL_MAX_TEXTURE_SIZE return ?

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
PeterO
Posts: 5972
Joined: Sun Jul 22, 2012 4:14 pm

Re: OpenGL Maximum Texture Size

Thu Jan 31, 2013 7:44 pm

Bad form to reply to ones own post I know.... but .... GL_MAX_TEXTURE_SIZE=2048

Have you tried increasing the amount of RAM assigned to the GPU ?

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
paddyg
Posts: 2591
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: OpenGL Maximum Texture Size

Thu Jan 31, 2013 8:06 pm

Peter, yes I did that straight away but the khronos manual says something not very assuring like "value gives a rough estimate of the largest texture that the GL can handle" So if 2048 is 2^(11 +/- 2) it could be too big at 1080!

A very good idea to increase the gpu memory, will try that now.
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

User avatar
paddyg
Posts: 2591
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: OpenGL Maximum Texture Size

Thu Jan 31, 2013 11:12 pm

Memory was already at 128 and increasing it further made the poor thing grind to a halt! 128MB must be big enough for just one 1080x1080 image (ought to fit 30).

Tried various other things and I just can't get it to render nicely.
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

dextrus
Posts: 119
Joined: Tue Jan 24, 2012 10:10 pm
Location: Eastleigh, Hampshire
Contact: Website

Re: OpenGL Maximum Texture Size

Thu Jan 31, 2013 11:20 pm

You are all using OpenGL ES2.0 right?

/Dextrus
Have more FUN with your Pi. Visit www.pi-fun.com

User avatar
paddyg
Posts: 2591
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: OpenGL Maximum Texture Size

Fri Feb 01, 2013 8:43 am

Dextrus, not sure about *all*, but I am
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

User avatar
PeterO
Posts: 5972
Joined: Sun Jul 22, 2012 4:14 pm

Re: OpenGL Maximum Texture Size

Fri Feb 01, 2013 9:26 am

openGL ES 2.0 here.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Return to “General discussion”