Gamp v0.0.7-36-g24b1eb6
Gamp: Graphics, Audio, Multimedia and Processing
Loading...
Searching...
No Matches
RedSquare01.cpp File Reference
#include <gamp/Gamp.hpp>
#include <cstdio>
#include <cmath>
#include <gamp/render/RenderContext.hpp>
#include <gamp/wt/event/Event.hpp>
#include <memory>
#include <jau/basic_types.hpp>
#include <jau/file_util.hpp>
#include <jau/fraction_type.hpp>
#include <gamp/render/gl/GLTypes.hpp>
Include dependency graph for RedSquare01.cpp:

Go to the source code of this file.

Classes

class  MyKeyListener
 
class  RedSquareES2
 

Typedefs

typedef std::shared_ptr< MyKeyListenerMyKeyListenerRef
 

Functions

int main (int argc, char *argv[])
 

Variables

static GLint a_colors
 
static GLint a_vertices
 
static bool animating = true
 
static std::vector< Vec4fcolors2
 
static const GLchar * fragmentSource
 
static GLint u_pmv
 
static const GLchar * vertexSource
 
static std::vector< Vec3fvertices2
 

Typedef Documentation

◆ MyKeyListenerRef

typedef std::shared_ptr<MyKeyListener> MyKeyListenerRef

Definition at line 122 of file RedSquare01.cpp.

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )

Definition at line 249 of file RedSquare01.cpp.

Variable Documentation

◆ u_pmv

GLint u_pmv
static

Definition at line 33 of file RedSquare01.cpp.

◆ a_vertices

GLint a_vertices
static

Definition at line 34 of file RedSquare01.cpp.

◆ a_colors

GLint a_colors
static

Definition at line 34 of file RedSquare01.cpp.

◆ vertexSource

const GLchar* vertexSource
static
Initial value:
=
"#version 100\n"
"precision highp float;\n"
"precision highp int;\n"
"\n"
"#if __VERSION__ >= 130\n"
" #define attribute in\n"
" #define varying out\n"
"#endif\n"
"\n"
"uniform mat4 mgl_PMVMatrix[2];\n"
"attribute vec4 mgl_Vertex;\n"
"attribute vec4 mgl_Color;\n"
"varying vec4 frontColor;\n"
"\n"
"void main(void)\n"
"{\n"
" frontColor=mgl_Color;\n"
" gl_Position = mgl_PMVMatrix[0] * mgl_PMVMatrix[1] * mgl_Vertex;\n"
"}\n"

Definition at line 42 of file RedSquare01.cpp.

◆ fragmentSource

const GLchar* fragmentSource
static
Initial value:
=
"#version 100\n"
"precision mediump float;\n"
"precision mediump int;\n"
"\n"
"#if __VERSION__ >= 130\n"
" #define varying in\n"
" out vec4 mgl_FragColor;\n"
"#else\n"
" #define mgl_FragColor gl_FragColor\n"
"#endif\n"
"\n"
"varying vec4 frontColor;\n"
"\n"
"void main (void)\n"
"{\n"
" mgl_FragColor = frontColor;\n"
"}\n"

Definition at line 71 of file RedSquare01.cpp.

◆ vertices2

std::vector<Vec3f> vertices2
static
Initial value:
= { Vec3f(-2, 2, 0),
Vec3f( 2, 2, 0),
Vec3f(-2, -2, 0),
Vec3f( 2, -2, 0) }
Vector3F< float > Vec3f
Definition vec3f.hpp:436

Definition at line 90 of file RedSquare01.cpp.

◆ colors2

std::vector<Vec4f> colors2
static
Initial value:
= { Vec4f( 1, 0, 0, 1),
Vec4f( 0, 0, 1, 1),
Vec4f( 1, 0, 0, 1),
Vec4f( 1, 0, 0, 1) }
Vector4F< float > Vec4f
Definition vec4f.hpp:375

Definition at line 95 of file RedSquare01.cpp.

◆ animating

bool animating = true
static

Definition at line 100 of file RedSquare01.cpp.