[android-developers] Re: draw texture in OpenGL Android from 0,0 coordinates

2012-03-03 Thread Indicator Veritatis
Use absolute screen coordinates in OpenGL? That defeats the purpose of 
much of OpenGL. The reason it takes you from world coordinates to object 
coordinates to camera coordinates to clip coordinates to device coordinates 
is (among other things) so that you never DO need to know the device 
(absolute screen) coordinates.

Yes, all those coordinate transforms can be quite confusing, especially for 
a beginner, but please understand that they are there for good reasons 
instead of trying to bypass them all.

http://www.opengl.org/resources/faq/technical/transformations.htm#tran0001 
is one of the better explanations on the web of all these transformations.

The post by Dark Photon at 
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflatNumber=233764
 
is also very good. You might want to start with it.

On Friday, March 2, 2012 12:44:03 AM UTC-8, Rikki wrote:

 Thanks for the reply. I did the same thing but its getting difficult 
 to manage the coordinates in floating points. Is there a way out to 
 use the absolute screen coordinates in OpenGL? if so can you provide 
 with some example to do it. 

 On Feb 10, 6:44 pm, niko20 nikolatesl...@yahoo.com wrote: 
  No, you shouldn't change the vertices if you don't have to. 
  
  To move an image just perform a glTranslate. So what you do is like 
  this: 
  
  glTranslate(0,0); 
  DrawYourImage(); 
  glTranslate(x,x); 
  DrawYourImage(); 
  glTranslate(x,x); 
  DrawYourImage(); 
  
  Etc. 
  
  -niko 
  
  On Feb 8, 12:58 am,Rikkitteam...@gmail.com wrote: 
  
  
  
   I'm new to opengGL and excuse if the questions are too naive. I'm 
   going through some tuturials for seeking help on learning this. I have 
   a small program written where i'm drawing a texture on a 
   GLSurfaceView. 
  
   I want to draw a number of textures(bitmap images) in a sequential 
   order starting from 0,0 coordinates. Also I need some gap in images on 
   the screen. Please help. Do I need to change the positioning of 
   vertices buffer. please suggest. 
  
   For more code details, checkout hte below link: 
  
  
 http://stackoverflow.com/questions/9188857/draw-texture-in-opengl-and...-Hide 
 quoted text - 
  
  - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: draw texture in OpenGL Android from 0,0 coordinates

2012-03-02 Thread Rikki
Thanks for the reply. I did the same thing but its getting difficult
to manage the coordinates in floating points. Is there a way out to
use the absolute screen coordinates in OpenGL? if so can you provide
with some example to do it.

On Feb 10, 6:44 pm, niko20 nikolatesl...@yahoo.com wrote:
 No, you shouldn't change the vertices if you don't have to.

 To move an image just perform a glTranslate. So what you do is like
 this:

 glTranslate(0,0);
 DrawYourImage();
 glTranslate(x,x);
 DrawYourImage();
 glTranslate(x,x);
 DrawYourImage();

 Etc.

 -niko

 On Feb 8, 12:58 am,Rikkitteam...@gmail.com wrote:



  I'm new to opengGL and excuse if the questions are too naive. I'm
  going through some tuturials for seeking help on learning this. I have
  a small program written where i'm drawing a texture on a
  GLSurfaceView.

  I want to draw a number of textures(bitmap images) in a sequential
  order starting from 0,0 coordinates. Also I need some gap in images on
  the screen. Please help. Do I need to change the positioning of
  vertices buffer. please suggest.

  For more code details, checkout hte below link:

 http://stackoverflow.com/questions/9188857/draw-texture-in-opengl-and...- 
 Hide quoted text -

 - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: draw texture in OpenGL Android from 0,0 coordinates

2012-02-10 Thread niko20
No, you shouldn't change the vertices if you don't have to.

To move an image just perform a glTranslate. So what you do is like
this:

glTranslate(0,0);
DrawYourImage();
glTranslate(x,x);
DrawYourImage();
glTranslate(x,x);
DrawYourImage();

Etc.

-niko

On Feb 8, 12:58 am, Rikki tteam...@gmail.com wrote:
 I'm new to opengGL and excuse if the questions are too naive. I'm
 going through some tuturials for seeking help on learning this. I have
 a small program written where i'm drawing a texture on a
 GLSurfaceView.

 I want to draw a number of textures(bitmap images) in a sequential
 order starting from 0,0 coordinates. Also I need some gap in images on
 the screen. Please help. Do I need to change the positioning of
 vertices buffer. please suggest.

 For more code details, checkout hte below link:

 http://stackoverflow.com/questions/9188857/draw-texture-in-opengl-and...

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en