Balaji
Posts: 8
Joined: Tue Aug 20, 2013 11:14 am

3D opengl help

Tue Aug 20, 2013 11:23 am

hi,I am using raspberry pi for a simple graphics concept.I need to load a plane and add png texture to the plane and also i
need to rotate the plane.how do i do that using opengl.I saw the example in raspberry pi but in the example (hello_triangle)
a cube was loaded and .raw textures were applied. I tried to modify that but i can't.Please help me.

Balaji
Posts: 8
Joined: Tue Aug 20, 2013 11:14 am

Re: 3D opengl help

Tue Aug 20, 2013 12:17 pm

bump

User avatar
AndyD
Posts: 2334
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: 3D opengl help

Tue Aug 20, 2013 11:07 pm

Hi,
I have asked for this post to be moved to Programming ‹ Graphics programming ‹ OpenGLES. You may get more responses there. You may have to wait a while to get an answer. Bumping a little over an hour after posting isn't going to help.

The hello_triangle example uses OpenGL ES, you will need to learn OpenGL ES (1 and 2 are supported on the Raspberry Pi) to progress. You could take a look at Pi3D. Pi3D is 3D Python graphics library for beginners and school children running on the Raspberry Pi. Search the forums for information. It is available from github (https://github.com/tipam/pi3d).

JeffD
Posts: 16
Joined: Tue Jul 02, 2013 2:52 am
Location: Nova Scotia, Canada

Re: 3D opengl help

Wed Aug 21, 2013 2:49 pm

What part of the hello_triangle code did you try to modify? Is it a problem of not compiling or you did not see the effect you wanted?

Maybe post some of the code you modified and explain what you are trying to do.

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

Re: 3D opengl help

Wed Aug 21, 2013 3:15 pm

JeffD wrote: Is it a problem of not compiling or you did not see the effect you wanted?
From OP's wording I would guess it is a permissions problem as ISTR everything in /opt/vc is owned by root.

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

JeffD
Posts: 16
Joined: Tue Jul 02, 2013 2:52 am
Location: Nova Scotia, Canada

Re: 3D opengl help

Wed Aug 21, 2013 6:46 pm

Odd, I had no problems editing and compiling the source in /opt/vc/src/hello_pi/hello_triangle. I'm using Raspbian and the group for that directory is users and that group has read and write access. I hadn't changed the permissions and was logged in as pi so I assumed it would be the same for everyone else. But after re-reading the OP's post maybe that is the problem.

Guess we will have to wait for the OP to chime in and give more detail.

Balaji
Posts: 8
Joined: Tue Aug 20, 2013 11:14 am

Re: 3D opengl help

Thu Aug 22, 2013 4:19 am

actually i tried opengl es but i can't.i have no time to study opengles fully.i want to make a application to show speedo meter like
car.so i want to load a plane with meter texture and another plane with needle texture and rotate.can u please give an idea to make
or simple example.

Balaji
Posts: 8
Joined: Tue Aug 20, 2013 11:14 am

Re: 3D opengl help

Thu Aug 22, 2013 6:46 am

JeffD wrote:What part of the hello_triangle code did you try to modify? Is it a problem of not compiling or you did not see the effect you wanted?

Maybe post some of the code you modified and explain what you are trying to do.
I deleted 5 faces so i have one plane on screen.but in hello_triangle, .raw textures were applied to the cube.I need to apply .png texture.how do i do this.

Return to “OpenGLES”