Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualBrother Bob

Posted 22 July 2013 - 12:25 PM

Start small. Try something like the following. Just try to move one vertex. //======================================================================================== GLfloat moveVertex[] = {0, 0}; //_Global variable or whatever you prefer. -(void)render {   moveVertex[0] -= 0.01; //_x   moveVertex[1] += 0.01; //_y   glBegin(GL_TRIANGLE_STRIP);   glTexCoord2d(moveVertex[0], moveVertex[1]); glVertex2d(xCoord[0] + self.initPositionX, yCoord[0] + self.initPositionY); glTexCoord2d(1.0, 0.0);   glVertex2d(xCoord[1] + self.initPositionX, yCoord[1] + self.initPositionY);         glTexCoord2d(0.0, 1.0);   glVertex2d(xCoord[2] + self.initPositionX, yCoord[2] + self.initPositionY);   glTexCoord2d(1.0, 1.0);   glVertex2d(xCoord[3] + self.initPositionX, yCoord[3] + self.initPositionY);   glEnd(); }

 

//==================================================================================================================

If you are planning on sticking with the 1.1 spec then just ignore the next two paragraphes.

 

You're right about that page, I should have been more specific.  I recently used the following one to upgrade my texture loader for iOS, it doesn't use GLKit. 

OpenGL ES 2.0 for iPhone Tutorial Part 2: Textures  <- Down at the bottom under advanced openGL, it's really not advanced at all, just a model and a texture. 

 

I meant to say something about avoiding the GLKit stuff.  Sorry about that. 

//==================================================================================================================

 

The following is what I started my iOS framework on.  I think it's pretty straight forward.  I was totally new to Apple, objective C, and the ES 2.0 spec at the time and I found it easy enough to follow.

 

http://developer.apple.com/library/ios/#samplecode/GLEssentials/Introduction/Intro.html

 

The matrix math code in this example is the most straight forward of all the matrix math libraries I've found anywhere.  It's definitely the best for starting off.

//==================================================================================================================

 

I found a good way to learn the ropes is to comment out the features that you don't want until you are left with only what you want to focus on.  Start by removing the code from the render function, then remove the init and shut down stuff, then the globals. For instance you might start by removing the reflection render code.  Then trace back everything that is being accessed by the reflections rendering and remove that as well.  Re-compile everytime you remove something to make sure the app still runs, then remove some more. Eventually, you'll be down to the basic essence of most programs and you'll have learned a lot about what does what in the process.


#8marcClintDion

Posted 22 July 2013 - 03:23 AM

There is far too much arrogance and out right abuse by site moderators, they are teaching other people to behave this way.  The posts I've made will all be shorty removed and replaced with this notice.  Game development is not the only thing being taught here, bad behavior is being taught as well.


#7marcClintDion

Posted 14 June 2013 - 02:02 PM

Start small. Try something like the following. Just try to move one vertex.
//========================================================================================

GLfloat moveVertex[] = {0, 0};   //_Global variable or whatever you prefer.


-(void)render
{

        moveVertex[0] -= 0.01;   //_x
        moveVertex[1] += 0.01;   //_y

        glBegin(GL_TRIANGLE_STRIP);
                  glTexCoord2d(moveVertex[0], moveVertex[1]); glVertex2d(xCoord[0] + self.initPositionX, yCoord[0] + self.initPositionY);
                  glTexCoord2d(1.0, 0.0);                                      glVertex2d(xCoord[1] + self.initPositionX, yCoord[1] + self.initPositionY);
                  glTexCoord2d(0.0, 1.0);                                      glVertex2d(xCoord[2] + self.initPositionX, yCoord[2] + self.initPositionY);
                  glTexCoord2d(1.0, 1.0);                                      glVertex2d(xCoord[3] + self.initPositionX, yCoord[3] + self.initPositionY);
        glEnd();
}

 

//==================================================================================================================

If you are planning on sticking with the 1.1 spec then just ignore the next two paragraphes.

 

You're right about that page, I should have been more specific.  I recently used the following one to upgrade my texture loader for iOS, it doesn't use GLKit. 

OpenGL ES 2.0 for iPhone Tutorial Part 2: Textures  <- Down at the bottom under advanced openGL, it's really not advanced at all, just a model and a texture. 

 

I meant to say something about avoiding the GLKit stuff.  Sorry about that. 

//==================================================================================================================

 

The following is what I started my iOS framework on.  I think it's pretty straight forward.  I was totally new to Apple, objective C, and the ES 2.0 spec at the time and I found it easy enough to follow.

 

http://developer.apple.com/library/ios/#samplecode/GLEssentials/Introduction/Intro.html

 

The matrix math code in this example is the most straight forward of all the matrix math libraries I've found anywhere.  It's definitely the best for starting off.

//==================================================================================================================

 

I found a good way to learn the ropes is to comment out the features that you don't want until you are left with only what you want to focus on.  Start by removing the code from the render function, then remove the init and shut down stuff, then the globals.   For instance you might start by removing the reflection render code.  Then trace back everything that is being accessed by the reflections rendering and remove that as well.  Re-compile everytime you remove something to make sure the app still runs, then remove some more.   Eventually, you'll be down to the basic essence of most programs and you'll have learned a lot about what does what in the process.


#6marcClintDion

Posted 14 June 2013 - 02:01 PM

Start small. Try something like the following. Just try to move one vertex.
//========================================================================================

GLfloat moveVertex[] = {0, 0};   //_Global variable or whatever you prefer.


-(void)render
{

        moveVertex[0] -= 0.01;   //_x
        moveVertex[1] += 0.01;   //_y

        glBegin(GL_TRIANGLE_STRIP);
                  glTexCoord2d(moveVertex[0], moveVertex[1]); glVertex2d(xCoord[0] + self.initPositionX, yCoord[0] + self.initPositionY);
                  glTexCoord2d(1.0, 0.0);                                      glVertex2d(xCoord[1] + self.initPositionX, yCoord[1] + self.initPositionY);
                  glTexCoord2d(0.0, 1.0);                                      glVertex2d(xCoord[2] + self.initPositionX, yCoord[2] + self.initPositionY);
                  glTexCoord2d(1.0, 1.0);                                      glVertex2d(xCoord[3] + self.initPositionX, yCoord[3] + self.initPositionY);
        glEnd();
}

 

//==================================================================================================================

If you are planning on sticking with the 1.1 spec then just ignore the next two paragraphes.

 

You're right about that page, I should have been more specific.  I recently used the following one to upgrade my texture loader for iOS, it doesn't use GLKit. 

OpenGL ES 2.0 for iPhone Tutorial Part 2: Textures  <- Down at the bottom under advanced openGL, it's really not advanced at all, just a model and a texture. 

 

I meant to say something about avoiding the GLKit stuff, it's awful.  Sorry about that. 

//==================================================================================================================

 

The following is what I started my iOS framework on.  I think it's pretty straight forward.  I was totally new to Apple, objective C, and the ES 2.0 spec at the time and I found it easy enough to follow.

 

http://developer.apple.com/library/ios/#samplecode/GLEssentials/Introduction/Intro.html

 

The matrix math code in this example is the most straight forward of all the matrix math libraries I've found anywhere.  It's definitely the best for starting off.

//==================================================================================================================

 

I found a good way to learn the ropes is to comment out the features that you don't want until you are left with only what you want to focus on.  Start by removing the code from the render function, then remove the init and shut down stuff, then the globals.   For instance you might start by removing the reflection render code.  Then trace back everything that is being accessed by the reflections rendering and remove that as well.  Re-compile everytime you remove something to make sure the app still runs, then remove some more.   Eventually, you'll be down to the basic essence of most programs and you'll have learned a lot about what does what in the process.


#5marcClintDion

Posted 14 June 2013 - 02:01 PM

Start small. Try something like the following. Just try to move one vertex.
//========================================================================================

GLfloat moveVertex[] = {0, 0};   //_Global variable or whatever you prefer.


-(void)render
{

        moveVertex[0] -= 0.01;   //_x
        moveVertex[1] += 0.01;   //_y

        glBegin(GL_TRIANGLE_STRIP);
                  glTexCoord2d(moveVertex[0], moveVertex[1]); glVertex2d(xCoord[0] + self.initPositionX, yCoord[0] + self.initPositionY);
                  glTexCoord2d(1.0, 0.0);                                      glVertex2d(xCoord[1] + self.initPositionX, yCoord[1] + self.initPositionY);
                  glTexCoord2d(0.0, 1.0);                                      glVertex2d(xCoord[2] + self.initPositionX, yCoord[2] + self.initPositionY);
                  glTexCoord2d(1.0, 1.0);                                      glVertex2d(xCoord[3] + self.initPositionX, yCoord[3] + self.initPositionY);
        glEnd();
}

 

//==================================================================================================================

If you are planning on sticking with the 1.1 spec then just ignore the next two paragraphes.

 

You're right about that page, I should have been more specific.  I recently used the following one to upgrade my texture loader for iOS, it doesn't use GLKit. 

OpenGL ES 2.0 for iPhone Tutorial Part 2: Textures  <- Down at the bottom under advanced openGL, it's really not advanced at all, just a model and a texture. 

 

I meant to say something about avoiding the GLKit stuff, it's awful.  Sorry about that. 

//==================================================================================================================

 

The following is what I started my iOS framework on.  I think it's pretty straight forward.  I was totally new to Apple, objective C, and the ES 2.0 spec at the time and I found it easy enough to follow.

 

http://developer.apple.com/library/ios/#samplecode/GLEssentials/Introduction/Intro.html

 

 

The matrix math code in this example is the most straight forward of all the matrix math libraries I've found anywhere.  It's definitely the best for starting off.

//==================================================================================================================

 

I found a good way to learn the ropes is to comment out the features that you don't want until you are left with only what you want to focus on.  Start by removing the code from the render function, then remove the init and shut down stuff, then the globals.   For instance you might start by removing the reflection render code.  Then trace back everything that is being accessed by the reflections rendering and remove that as well.  Re-compile everytime you remove something to make sure the app still runs, then remove some more.   Eventually, you'll be down to the basic essence of most programs and you'll have learned a lot about what does what in the process.


#4marcClintDion

Posted 14 June 2013 - 01:58 PM

Start small. Try something like the following. Just try to move one vertex.
//========================================================================================

GLfloat moveVertex[] = {0, 0};   //_Global variable or whatever you prefer.


-(void)render
{

        moveVertex[0] -= 0.01;   //_x
        moveVertex[1] += 0.01;   //_y

        glBegin(GL_TRIANGLE_STRIP);
                  glTexCoord2d(moveVertex[0], moveVertex[1]); glVertex2d(xCoord[0] + self.initPositionX, yCoord[0] + self.initPositionY);
                  glTexCoord2d(1.0, 0.0);                                      glVertex2d(xCoord[1] + self.initPositionX, yCoord[1] + self.initPositionY);
                  glTexCoord2d(0.0, 1.0);                                      glVertex2d(xCoord[2] + self.initPositionX, yCoord[2] + self.initPositionY);
                  glTexCoord2d(1.0, 1.0);                                      glVertex2d(xCoord[3] + self.initPositionX, yCoord[3] + self.initPositionY);
        glEnd();
}

 

//==================================================================================================================

 

You're right about that page, I should have been more specific.  I recently used the following one to upgrade my texture loader for iOS, it doesn't use GLKit. 

OpenGL ES 2.0 for iPhone Tutorial Part 2: Textures  <- Down at the bottom under advanced openGL, it's really not advanced at all, just a model and a texture. 

 

I meant to say something about avoiding the GLKit stuff, it's awful.  Sorry about that. 

//==================================================================================================================

 

The following is what I started my iOS framework on.  I think it's pretty straight forward.  I was totally new to Apple, objective C, and the ES 2.0 spec at the time and I found it easy enough to follow.

 

http://developer.apple.com/library/ios/#samplecode/GLEssentials/Introduction/Intro.html

 

 

The matrix math code in this example is the most straight forward of all the matrix math libraries I've found anywhere.  It's definitely the best for starting off.

//==================================================================================================================

 

I found a good way to learn the ropes is to comment out the features that you don't want until you are left with only what you want to focus on.  Start by removing the code from the render function, then remove the init and shut down stuff, then the globals.   For instance you might start by removing the reflection render code.  Then trace back everything that is being accessed by the reflections rendering and remove that as well.  Re-compile everytime you remove something to make sure the app still runs, then remove some more.   Eventually, you'll be down to the basic essence of most programs and you'll have learned a lot about what does what in the process.


PARTNERS