gamnit :: DynamicResolutionProgram :: _fragment_shader_source
gamnit :: DynamicResolutionProgram :: _ratio
Ratio of the virtual screen to drawgamnit :: DynamicResolutionProgram :: _tex_coord
Coordinates on the textures, per vertexgamnit :: DynamicResolutionProgram :: _texture
Virtual screen texture / color attachmentgamnit :: DynamicResolutionProgram :: coord=
Vertices coordinatesgamnit :: DynamicResolutionProgram :: fragment_shader_source=
gamnit :: DynamicResolutionProgram :: ratio
Ratio of the virtual screen to drawgamnit :: DynamicResolutionProgram :: ratio=
Ratio of the virtual screen to drawgamnit :: DynamicResolutionProgram :: tex_coord
Coordinates on the textures, per vertexgamnit :: DynamicResolutionProgram :: tex_coord=
Coordinates on the textures, per vertexgamnit :: DynamicResolutionProgram :: texture
Virtual screen texture / color attachmentgamnit :: DynamicResolutionProgram :: texture=
Virtual screen texture / color attachmentgamnit $ DynamicResolutionProgram :: SELF
Type of this instance, automatically specialized in every classgamnit $ DynamicResolutionProgram :: fragment_shader_source
Source code of the fragment shadergamnit $ DynamicResolutionProgram :: vertex_shader_source
Source code of the vertex shadergamnit :: GamnitProgram :: _attributes
Attributes of this program organized by namegamnit :: GamnitProgram :: _error
Last error raised bycompile_and_link
gamnit :: DynamicResolutionProgram :: _fragment_shader_source
gamnit :: GamnitProgram :: _gl_program
Index to the OpenGL ES program, set bycompile_and_link
gamnit :: DynamicResolutionProgram :: _ratio
Ratio of the virtual screen to drawgamnit :: DynamicResolutionProgram :: _tex_coord
Coordinates on the textures, per vertexgamnit :: DynamicResolutionProgram :: _texture
Virtual screen texture / color attachmentgamnit :: GamnitProgram :: _uniforms
Uniforms of this program organized by namegamnit :: GamnitProgram :: attributes
Attributes of this program organized by namegamnit :: GamnitProgram :: attributes=
Attributes of this program organized by namecore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
gamnit :: GamnitProgram :: compile_and_link
Compile the shaders, and this program, then link and report any errorsgamnit :: DynamicResolutionProgram :: coord=
Vertices coordinatescore :: Object :: defaultinit
gamnit :: GamnitProgram :: defaultinit
gamnit :: GamnitProgram :: deleted=
Has this program been deleted?gamnit :: GamnitProgram :: diagnose
Diagnose possible problems with the shaders of the programgamnit :: GamnitProgram :: error=
Last error raised bycompile_and_link
gamnit :: GamnitProgram :: fragment_shader
Fragment shader to attach to this programgamnit :: GamnitProgramFromSource :: fragment_shader_source
Source code of the fragment shadergamnit :: DynamicResolutionProgram :: fragment_shader_source=
gamnit :: GamnitProgram :: gl_program
Index to the OpenGL ES program, set bycompile_and_link
gamnit :: GamnitProgram :: gl_program=
Index to the OpenGL ES program, set bycompile_and_link
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).gamnit :: DynamicResolutionProgram :: ratio
Ratio of the virtual screen to drawgamnit :: DynamicResolutionProgram :: ratio=
Ratio of the virtual screen to drawgamnit :: DynamicResolutionProgram :: tex_coord
Coordinates on the textures, per vertexgamnit :: DynamicResolutionProgram :: tex_coord=
Coordinates on the textures, per vertexgamnit :: DynamicResolutionProgram :: texture
Virtual screen texture / color attachmentgamnit :: DynamicResolutionProgram :: texture=
Virtual screen texture / color attachmentgamnit :: GamnitProgram :: uniforms
Uniforms of this program organized by namegamnit :: GamnitProgram :: uniforms=
Uniforms of this program organized by namegamnit :: GamnitProgram :: vertex_shader
Vertex shader to attach to this programgamnit :: GamnitProgramFromSource :: vertex_shader_source
Source code of the vertex shadergamnit :: GamnitProgramFromSource
Gamnit graphical program from the shaders source code
private class DynamicResolutionProgram
super GamnitProgramFromSource
redef var vertex_shader_source = """
// Vertex coordinates
attribute vec3 coord;
// Vertex coordinates on textures
attribute vec2 tex_coord;
// Output to the fragment shader
varying vec2 v_coord;
void main()
{
gl_Position = vec4(coord, 1.0);
v_coord = tex_coord;
}
""" @ glsl_vertex_shader
redef var fragment_shader_source = """
precision mediump float;
// Virtual screen texture / color attachment
uniform sampler2D texture0;
// Input from the vertex shader
varying vec2 v_coord;
// Ratio of the virtual screen to draw
uniform float ratio;
void main()
{
gl_FragColor = texture2D(texture0, v_coord*ratio);
}
""" @ glsl_fragment_shader
# Vertices coordinates
var coord = attributes["coord"].as(AttributeVec3) is lazy
# Coordinates on the textures, per vertex
var tex_coord = attributes["tex_coord"].as(AttributeVec2) is lazy
# Virtual screen texture / color attachment
var texture = uniforms["texture0"].as(UniformSampler2D) is lazy
# Ratio of the virtual screen to draw
var ratio = uniforms["ratio"].as(UniformFloat) is lazy
end
lib/gamnit/dynamic_resolution.nit:305,1--354,3