lighthouse64 wrote:Does anyone know where the blue rectangle source is??? Because I think I might be able to replace it...
Code: Select all
glDisable(GL_TEXTURE_2D);
glColor4f( 0.f, 0.f, 1.f, 1.f);
glBegin( GL_QUADS );
glVertex2f( player.left(), player.top());
glVertex2f( player.right(), player.top());
glVertex2f( player.right(), player.bottom());
glVertex2f( player.left(), player.bottom());
glEnd();
Oh. Wait, isn't it in the pge folder??? I couldn't find it :pWohlstand wrote:lighthouse64 wrote:Does anyone know where the blue rectangle source is??? Because I think I might be able to replace it...
Blue rectangle is a vector rectangle drawn with OpenGL function:Code: Select all
glDisable(GL_TEXTURE_2D);
glColor4f( 0.f, 0.f, 1.f, 1.f);
glBegin( GL_QUADS );
glVertex2f( player.left(), player.top());
glVertex2f( player.right(), player.top());
glVertex2f( player.right(), player.bottom());
glVertex2f( player.left(), player.bottom());
glEnd();
just a dummy GFX.
Everybody can draw it even in the Paint
Full source here:
https://github.com/Wohlhabend-Networks/PGE-Project/blob/master/Engine/scenes/level/lvl_player.cpp#L685
When I will implement the reading of playable character's graphics, instead blue rectangle will be used playable character sprite from graphics folder of config pack.
Oh... but isn't there a source for the code?Kevsoft wrote:Nope, currently the player is only beeing painted with code.
No, it generating from scratch by C++ code:lighthouse64 wrote:Oh... but isn't there a source for the code?Kevsoft wrote:Nope, currently the player is only beeing painted with code.
Code: Select all
glDisable(GL_TEXTURE_2D);
glColor4f( 0.f, 0.f, 1.f, 1.f);
glBegin( GL_QUADS );
glVertex2f( player.left(), player.top());
glVertex2f( player.right(), player.top());
glVertex2f( player.right(), player.bottom());
glVertex2f( player.left(), player.bottom());
glEnd();
oh.Wohlstand wrote:No, it generating from scratch by C++ code:lighthouse64 wrote:Oh... but isn't there a source for the code?Kevsoft wrote:Nope, currently the player is only beeing painted with code.Code: Select all
glDisable(GL_TEXTURE_2D);
glColor4f( 0.f, 0.f, 1.f, 1.f);
glBegin( GL_QUADS );
glVertex2f( player.left(), player.top());
glVertex2f( player.right(), player.top());
glVertex2f( player.right(), player.bottom());
glVertex2f( player.left(), player.bottom());
glEnd();
Don't worry, now I working with playable character system, so instead of blue rectangle will be a normal playable character sprite with animationlighthouse64 wrote:oh.Wohlstand wrote:No, it generating from scratch by C++ code:lighthouse64 wrote:Oh... but isn't there a source for the code?Kevsoft wrote:Nope, currently the player is only beeing painted with code.Code: Select all
glDisable(GL_TEXTURE_2D);
glColor4f( 0.f, 0.f, 1.f, 1.f);
glBegin( GL_QUADS );
glVertex2f( player.left(), player.top());
glVertex2f( player.right(), player.top());
glVertex2f( player.right(), player.bottom());
glVertex2f( player.left(), player.bottom());
glEnd();I guess I can't really do anything. I'm a noob at a lot of languages.
The rectangle does not use a texture. Since it has just a single color, you can just use the renderer. If you ever played a bit on a 3d creator with some level of "professionalness" you'd understand it.lighthouse64 wrote:oh.Wohlstand wrote:No, it generating from scratch by C++ code:lighthouse64 wrote:Oh... but isn't there a source for the code?Kevsoft wrote:Nope, currently the player is only beeing painted with code.Code: Select all
glDisable(GL_TEXTURE_2D);
glColor4f( 0.f, 0.f, 1.f, 1.f);
glBegin( GL_QUADS );
glVertex2f( player.left(), player.top());
glVertex2f( player.right(), player.top());
glVertex2f( player.right(), player.bottom());
glVertex2f( player.left(), player.bottom());
glEnd();I guess I can't really do anything. I'm a noob at a lot of languages.
Wait, isn't it possible to add any squares to the rectangle?tb1024 wrote:The rectangle does not use a texture. Since it has just a single color, you can just use the renderer. If you ever played a bit on a 3d creator with some level of "professionalness" you'd understand it.lighthouse64 wrote:oh.Wohlstand wrote:No, it generating from scratch by C++ code:lighthouse64 wrote:Oh... but isn't there a source for the code?Kevsoft wrote:Nope, currently the player is only beeing painted with code.Code: Select all
glDisable(GL_TEXTURE_2D);
glColor4f( 0.f, 0.f, 1.f, 1.f);
glBegin( GL_QUADS );
glVertex2f( player.left(), player.top());
glVertex2f( player.right(), player.top());
glVertex2f( player.right(), player.bottom());
glVertex2f( player.left(), player.bottom());
glEnd();I guess I can't really do anything. I'm a noob at a lot of languages.
But this snippet is fairly readable for someone who knows basics on 3d.
Yes, it is, but in that case texture-mapping would be more polygon-efficient.lighthouse64 wrote:Wait, isn't it possible to add any squares to the rectangle?tb1024 wrote:The rectangle does not use a texture. Since it has just a single color, you can just use the renderer. If you ever played a bit on a 3d creator with some level of "professionalness" you'd understand it.lighthouse64 wrote:oh.Wohlstand wrote:No, it generating from scratch by C++ code:lighthouse64 wrote:Oh... but isn't there a source for the code?Kevsoft wrote:Nope, currently the player is only beeing painted with code.Code: Select all
glDisable(GL_TEXTURE_2D);
glColor4f( 0.f, 0.f, 1.f, 1.f);
glBegin( GL_QUADS );
glVertex2f( player.left(), player.top());
glVertex2f( player.right(), player.top());
glVertex2f( player.right(), player.bottom());
glVertex2f( player.left(), player.bottom());
glEnd();I guess I can't really do anything. I'm a noob at a lot of languages.
But this snippet is fairly readable for someone who knows basics on 3d.
Users browsing this forum: 1 guest