Overview
Widgets are how you create your GUI. They are the things which appear on the GUI, everything from the app itself to text boxes, buttons and pictures.
Note: This is an overview of the widgets in guizero. Be sure to view the specific documentation for each widget for more information.
Widgets
App
The App object is the basis of all GUIs created using guizero. It is the main window which contains all of the other widgets.
app = App()
app.display()
Box
The Box
object is an invisible container which can contain other widgets.
box = Box(app)
box = Box(app, border=True)
ButtonGroup
The ButtonGroup
object displays a group of radio buttons, allowing the user to choose a single option.
choice = ButtonGroup(app, options=["cheese", "ham", "salad"])
CheckBox
The CheckBox
object displays a check box to allow an option to be ticked or un-ticked.
checkbox = CheckBox(app, text="salad ?")
Combo
The Combo
object displays a drop down box allowing a single option to be selected from a list of options.
combo = Combo(app, options=["cheese", "ham", "salad"])
Drawing
The Drawing
object allows shapes, images and text to be created.
drawing = Drawing(app)
ListBox
The ListBox
object displays a list of items from which either single or multiple items can be selected.
listbox = ListBox(app, items=["cheese", "ham", "salad"])
Picture
The Picture
object displays an image.
picture = Picture(app, image="guizero.png")
PushButton
The PushButton
object displays a button with text or an image, which calls a function when pressed.
def do_nothing():
print("button pressed")
button = PushButton(app, command=do_nothing)
Slider
The Slider
object displays a bar and selector which can be used to specify a value in a range.
slider = Slider(app)
Text
The Text
object displays non editable text in your app, useful for titles, labels and instructions.
text = Text(app, text="Hello World")
TextBox
The TextBox
object displays a text box which the user can type in.
textbox = TextBox(app)
TitleBox
The TitleBox
object is an container with a title which can contain other widgets.
titlebox = TitleBox(app, "Title")
titlebox = TitleBox(app, "Title", border=False)
Waffle
The Waffle
object display an n*n grid of squares with custom dimensions and padding.
waffle = Waffle(app)
Window
The Window
object create a new window in guizero.
window = Window(app)
Properties
All widgets are customisable through their properties. These properties are typical for most widgets. Check the widgets document for more information.
| Property | Data type | Description |
|---|---|---|
| align | string | The alignment of this widget within its container |
| bg | string, List | The background colour of the widget |
| enabled | boolean | True if the widget is enabled |
| font | string | The font of the text |
| grid | List | [x,y] coordinates of this widget if in a "grid". |
| height | int, string | The height of the widget. |
| master | App, Window, Box | The container to which this widget belongs |
| value | int, string, bool | The widgets current "value", e.g. the text in a TextBox |
| visible | boolean | If this widget is visible |
| width | size | The width of the widget. |
| text_size | int | The size of the text |
| text_color | color | The colour of the text |
Methods
Widgets can be interacted with through their methods. The methods supported are dependent on the widget, so check the documentation. These methods are typical across most widgets.
| Method | Description |
|---|---|
| after(time, command, args=None) | Schedules a single call to command after time milliseconds |
| cancel(command) | Cancels a scheduled call to command |
| destroy() | Destroys the widget |
| disable() | Disables the widget so that it cannot be interacted with |
| enable() | Enables the widget |
| focus() | Gives focus to the widget |
| hide() | Hides the widget from view |
| repeat(time, command, args=None) | Schedules a call to command every time milliseconds |
| resize(width, height) | Sets the width and height of the widget |
| show() | Displays the widget if it was previously hidden |
| update_command(command, args =None) | Updates the function to call when the widget is used |


Monday's Best Bet: D T Goodie looks good at Parx
by Jarrod HorakMonday’s 8th race from Parx is an optional claiming event for 3-year-olds and up traveling one mile on the main track (Post Time 3:34 p.m. ET).
Click here for Parx Racing Entries & Results
#6 D T GOODIE (3-1) exits back-to-back strong efforts in local dirt sprints, and he earned an above par number in a clear place finish Oct. 28. The versatile gelding has struck three times at this distance.
#3 Vouch (4-1) is an early-pressing type cutting back in distance. He went to the front and weakened last time, and he will probably end up stalking the pace in this spot.
#1 Navy Commander (2-1) is 6-for-14 at Parx and 1-for-1 at one mile. He just held on in a local front running score at a mile and seventy yards Oct. 6. Others have speed in this race, and he does own early-pressing versatility.
#2 His Royal Majesty (6-1) should get pace to chase. The 2-time local winner will almost certainly be last early, and he has a good shot to hit the board.
Wagers:
#6 to win
Exacta 6/1-2-3
Exacta 1-2-3/6
Trifecta 1-3-6/ALL/2
November 2019 Best Bet Winners
Nov 4 - KARSAVINA ($9.60), Quinella ($15.80)
Nov 5 - MISCHEVIOUS ALEX ($7.00)
Nov 6 - FINAL CUT ($8.00), Trifecta ($47.80)
Nov 7 - HAY FIELD ($7.50), Exacta ($20.80)
Nov 10 - FLY SO PRETTY ($23.20), Exacta ($79.50)
Nov 17 - QUEEN BEE TO YOU ($8.00)


Interface GL
-
- All Known Implementing Classes:
GLDebugDesktop
,GLDebugES
public interface GL
Baseline GL methods that must be available on all platforms.This is the subset of vanilla desktop OpenGL 2 and OpenGL ES 2.
- Author:
- Kirill Vainer
-
-
Field Summary
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
glActiveTexture(int texture)
void
glAttachShader(int program, int shader)
void
glBeginQuery(int target, int query)
void
glBindBuffer(int target, int buffer)
void
glBindTexture(int target, int texture)
void
glBlendEquationSeparate(int colorMode, int alphaMode)
void
glBlendFunc(int sfactor, int dfactor)
void
glBlendFuncSeparate(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha)
void
glBufferData(int target, long dataSize, int usage)
void
glBufferData(int target, java.nio.ByteBuffer data, int usage)
void
glBufferData(int target, java.nio.FloatBuffer data, int usage)
void
glBufferData(int target, java.nio.ShortBuffer data, int usage)
void
glBufferSubData(int target, long offset, java.nio.ByteBuffer data)
void
glBufferSubData(int target, long offset, java.nio.FloatBuffer data)
void
glBufferSubData(int target, long offset, java.nio.ShortBuffer data)
void
glClear(int mask)
void
glClearColor(float red, float green, float blue, float alpha)
void
glColorMask(boolean red, boolean green, boolean blue, boolean alpha)
void
glCompileShader(int shader)
void
glCompressedTexImage2D(int target, int level, int internalFormat, int width, int height, int border, java.nio.ByteBuffer data)
void
glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, java.nio.ByteBuffer data)
int
glCreateProgram()
int
glCreateShader(int shaderType)
void
glCullFace(int mode)
void
glDeleteBuffers(java.nio.IntBuffer buffers)
void
glDeleteProgram(int program)
void
glDeleteShader(int shader)
void
glDeleteTextures(java.nio.IntBuffer textures)
void
glDepthFunc(int func)
void
glDepthMask(boolean flag)
void
glDepthRange(double nearVal, double farVal)
void
glDetachShader(int program, int shader)
void
glDisable(int cap)
void
glDisableVertexAttribArray(int index)
void
glDrawArrays(int mode, int first, int count)
void
glDrawRangeElements(int mode, int start, int end, int count, int type, long indices)
void
glEnable(int cap)
void
glEnableVertexAttribArray(int index)
void
glEndQuery(int target)
void
glGenBuffers(java.nio.IntBuffer buffers)
void
glGenQueries(int number, java.nio.IntBuffer ids)
void
glGenTextures(java.nio.IntBuffer textures)
int
glGetAttribLocation(int program, java.lang.String name)
void
glGetBoolean(int pname, java.nio.ByteBuffer params)
void
glGetBufferSubData(int target, long offset, java.nio.ByteBuffer data)
int
glGetError()
void
glGetInteger(int pname, java.nio.IntBuffer params)
void
glGetProgram(int program, int pname, java.nio.IntBuffer params)
java.lang.String
glGetProgramInfoLog(int program, int maxSize)
int
glGetQueryObjectiv(int query, int pname)
long
glGetQueryObjectui64(int query, int pname)
Unsigned version.void
glGetShader(int shader, int pname, java.nio.IntBuffer params)
java.lang.String
glGetShaderInfoLog(int shader, int maxSize)
java.lang.String
glGetString(int name)
int
glGetUniformLocation(int program, java.lang.String name)
boolean
glIsEnabled(int cap)
void
glLineWidth(float width)
void
glLinkProgram(int program)
void
glPixelStorei(int pname, int param)
void
glPolygonOffset(float factor, float units)
void
glReadPixels(int x, int y, int width, int height, int format, int type, long offset)
void
glReadPixels(int x, int y, int width, int height, int format, int type, java.nio.ByteBuffer data)
void
glScissor(int x, int y, int width, int height)
void
glShaderSource(int shader, java.lang.String[] strings, java.nio.IntBuffer length)
void
glStencilFuncSeparate(int face, int func, int ref, int mask)
void
glStencilOpSeparate(int face, int sfail, int dpfail, int dppass)
void
glTexImage2D(int target, int level, int internalFormat, int width, int height, int border, int format, int type, java.nio.ByteBuffer data)
void
glTexParameterf(int target, int pname, float param)
void
glTexParameteri(int target, int pname, int param)
void
glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, java.nio.ByteBuffer data)
void
glUniform1(int location, java.nio.FloatBuffer value)
void
glUniform1(int location, java.nio.IntBuffer value)
void
glUniform1f(int location, float v0)
void
glUniform1i(int location, int v0)
void
glUniform2(int location, java.nio.FloatBuffer value)
void
glUniform2(int location, java.nio.IntBuffer value)
void
glUniform2f(int location, float v0, float v1)
void
glUniform3(int location, java.nio.FloatBuffer value)
void
glUniform3(int location, java.nio.IntBuffer value)
void
glUniform3f(int location, float v0, float v1, float v2)
void
glUniform4(int location, java.nio.FloatBuffer value)
void
glUniform4(int location, java.nio.IntBuffer value)
void
glUniform4f(int location, float v0, float v1, float v2, float v3)
void
glUniformMatrix3(int location, boolean transpose, java.nio.FloatBuffer value)
void
glUniformMatrix4(int location, boolean transpose, java.nio.FloatBuffer value)
void
glUseProgram(int program)
void
glVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, long pointer)
void
glViewport(int x, int y, int width, int height)
void
resetStats()
-
-
-
Field Detail
-
GL_ALPHA
static final int GL_ALPHA
- See Also:
- Constant Field Values
-
GL_ALWAYS
static final int GL_ALWAYS
- See Also:
- Constant Field Values
-
GL_ARRAY_BUFFER
static final int GL_ARRAY_BUFFER
- See Also:
- Constant Field Values
-
GL_BACK
static final int GL_BACK
- See Also:
- Constant Field Values
-
GL_BLEND
static final int GL_BLEND
- See Also:
- Constant Field Values
-
GL_BLUE
static final int GL_BLUE
- See Also:
- Constant Field Values
-
GL_BYTE
static final int GL_BYTE
- See Also:
- Constant Field Values
-
GL_CLAMP_TO_EDGE
static final int GL_CLAMP_TO_EDGE
- See Also:
- Constant Field Values
-
GL_COLOR_BUFFER_BIT
static final int GL_COLOR_BUFFER_BIT
- See Also:
- Constant Field Values
-
GL_COMPILE_STATUS
static final int GL_COMPILE_STATUS
- See Also:
- Constant Field Values
-
GL_CULL_FACE
static final int GL_CULL_FACE
- See Also:
- Constant Field Values
-
GL_DECR
static final int GL_DECR
- See Also:
- Constant Field Values
-
GL_DECR_WRAP
static final int GL_DECR_WRAP
- See Also:
- Constant Field Values
-
GL_DEPTH_BUFFER_BIT
static final int GL_DEPTH_BUFFER_BIT
- See Also:
- Constant Field Values
-
GL_DEPTH_COMPONENT
static final int GL_DEPTH_COMPONENT
- See Also:
- Constant Field Values
-
GL_DEPTH_COMPONENT16
static final int GL_DEPTH_COMPONENT16
- See Also:
- Constant Field Values
-
GL_DEPTH_TEST
static final int GL_DEPTH_TEST
- See Also:
- Constant Field Values
-
GL_DOUBLE
static final int GL_DOUBLE
- See Also:
- Constant Field Values
-
GL_DST_ALPHA
static final int GL_DST_ALPHA
- See Also:
- Constant Field Values
-
GL_DST_COLOR
static final int GL_DST_COLOR
- See Also:
- Constant Field Values
-
GL_DYNAMIC_DRAW
static final int GL_DYNAMIC_DRAW
- See Also:
- Constant Field Values
-
GL_DYNAMIC_COPY
static final int GL_DYNAMIC_COPY
- See Also:
- Constant Field Values
-
GL_ELEMENT_ARRAY_BUFFER
static final int GL_ELEMENT_ARRAY_BUFFER
- See Also:
- Constant Field Values
-
GL_EQUAL
static final int GL_EQUAL
- See Also:
- Constant Field Values
-
GL_EXTENSIONS
static final int GL_EXTENSIONS
- See Also:
- Constant Field Values
-
GL_FALSE
static final int GL_FALSE
- See Also:
- Constant Field Values
-
GL_FLOAT
static final int GL_FLOAT
- See Also:
- Constant Field Values
-
GL_FRAGMENT_SHADER
static final int GL_FRAGMENT_SHADER
- See Also:
- Constant Field Values
-
GL_FRONT
static final int GL_FRONT
- See Also:
- Constant Field Values
-
GL_FUNC_ADD
static final int GL_FUNC_ADD
- See Also:
- Constant Field Values
-
GL_FUNC_SUBTRACT
static final int GL_FUNC_SUBTRACT
- See Also:
- Constant Field Values
-
GL_FUNC_REVERSE_SUBTRACT
static final int GL_FUNC_REVERSE_SUBTRACT
- See Also:
- Constant Field Values
-
GL_FRONT_AND_BACK
static final int GL_FRONT_AND_BACK
- See Also:
- Constant Field Values
-
GL_GEQUAL
static final int GL_GEQUAL
- See Also:
- Constant Field Values
-
GL_GREATER
static final int GL_GREATER
- See Also:
- Constant Field Values
-
GL_GREEN
static final int GL_GREEN
- See Also:
- Constant Field Values
-
GL_INCR
static final int GL_INCR
- See Also:
- Constant Field Values
-
GL_INCR_WRAP
static final int GL_INCR_WRAP
- See Also:
- Constant Field Values
-
GL_INFO_LOG_LENGTH
static final int GL_INFO_LOG_LENGTH
- See Also:
- Constant Field Values
-
GL_INT
static final int GL_INT
- See Also:
- Constant Field Values
-
GL_INVALID_ENUM
static final int GL_INVALID_ENUM
- See Also:
- Constant Field Values
-
GL_INVALID_VALUE
static final int GL_INVALID_VALUE
- See Also:
- Constant Field Values
-
GL_INVALID_OPERATION
static final int GL_INVALID_OPERATION
- See Also:
- Constant Field Values
-
GL_INVERT
static final int GL_INVERT
- See Also:
- Constant Field Values
-
GL_KEEP
static final int GL_KEEP
- See Also:
- Constant Field Values
-
GL_LEQUAL
static final int GL_LEQUAL
- See Also:
- Constant Field Values
-
GL_LESS
static final int GL_LESS
- See Also:
- Constant Field Values
-
GL_LINEAR
static final int GL_LINEAR
- See Also:
- Constant Field Values
-
GL_LINEAR_MIPMAP_LINEAR
static final int GL_LINEAR_MIPMAP_LINEAR
- See Also:
- Constant Field Values
-
GL_LINEAR_MIPMAP_NEAREST
static final int GL_LINEAR_MIPMAP_NEAREST
- See Also:
- Constant Field Values
-
GL_LINES
static final int GL_LINES
- See Also:
- Constant Field Values
-
GL_LINE_LOOP
static final int GL_LINE_LOOP
- See Also:
- Constant Field Values
-
GL_LINE_STRIP
static final int GL_LINE_STRIP
- See Also:
- Constant Field Values
-
GL_LINK_STATUS
static final int GL_LINK_STATUS
- See Also:
- Constant Field Values
-
GL_LUMINANCE
static final int GL_LUMINANCE
- See Also:
- Constant Field Values
-
GL_LUMINANCE_ALPHA
static final int GL_LUMINANCE_ALPHA
- See Also:
- Constant Field Values
-
GL_MAX
static final int GL_MAX
- See Also:
- Constant Field Values
-
GL_MAX_CUBE_MAP_TEXTURE_SIZE
static final int GL_MAX_CUBE_MAP_TEXTURE_SIZE
- See Also:
- Constant Field Values
-
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS
static final int GL_MAX_FRAGMENT_UNIFORM_COMPONENTS
- See Also:
- Constant Field Values
-
GL_MAX_FRAGMENT_UNIFORM_VECTORS
static final int GL_MAX_FRAGMENT_UNIFORM_VECTORS
- See Also:
- Constant Field Values
-
GL_MAX_TEXTURE_IMAGE_UNITS
static final int GL_MAX_TEXTURE_IMAGE_UNITS
- See Also:
- Constant Field Values
-
GL_MAX_TEXTURE_SIZE
static final int GL_MAX_TEXTURE_SIZE
- See Also:
- Constant Field Values
-
GL_MAX_VERTEX_ATTRIBS
static final int GL_MAX_VERTEX_ATTRIBS
- See Also:
- Constant Field Values
-
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS
static final int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS
- See Also:
- Constant Field Values
-
GL_MAX_VERTEX_UNIFORM_COMPONENTS
static final int GL_MAX_VERTEX_UNIFORM_COMPONENTS
- See Also:
- Constant Field Values
-
GL_MAX_VERTEX_UNIFORM_VECTORS
static final int GL_MAX_VERTEX_UNIFORM_VECTORS
- See Also:
- Constant Field Values
-
GL_MIRRORED_REPEAT
static final int GL_MIRRORED_REPEAT
- See Also:
- Constant Field Values
-
GL_MIN
static final int GL_MIN
- See Also:
- Constant Field Values
-
GL_NEAREST
static final int GL_NEAREST
- See Also:
- Constant Field Values
-
GL_NEAREST_MIPMAP_LINEAR
static final int GL_NEAREST_MIPMAP_LINEAR
- See Also:
- Constant Field Values
-
GL_NEAREST_MIPMAP_NEAREST
static final int GL_NEAREST_MIPMAP_NEAREST
- See Also:
- Constant Field Values
-
GL_NEVER
static final int GL_NEVER
- See Also:
- Constant Field Values
-
GL_NO_ERROR
static final int GL_NO_ERROR
- See Also:
- Constant Field Values
-
GL_NONE
static final int GL_NONE
- See Also:
- Constant Field Values
-
GL_NOTEQUAL
static final int GL_NOTEQUAL
- See Also:
- Constant Field Values
-
GL_ONE
static final int GL_ONE
- See Also:
- Constant Field Values
-
GL_ONE_MINUS_DST_ALPHA
static final int GL_ONE_MINUS_DST_ALPHA
- See Also:
- Constant Field Values
-
GL_ONE_MINUS_DST_COLOR
static final int GL_ONE_MINUS_DST_COLOR
- See Also:
- Constant Field Values
-
GL_ONE_MINUS_SRC_ALPHA
static final int GL_ONE_MINUS_SRC_ALPHA
- See Also:
- Constant Field Values
-
GL_ONE_MINUS_SRC_COLOR
static final int GL_ONE_MINUS_SRC_COLOR
- See Also:
- Constant Field Values
-
GL_OUT_OF_MEMORY
static final int GL_OUT_OF_MEMORY
- See Also:
- Constant Field Values
-
GL_POINTS
static final int GL_POINTS
- See Also:
- Constant Field Values
-
GL_POLYGON_OFFSET_FILL
static final int GL_POLYGON_OFFSET_FILL
- See Also:
- Constant Field Values
-
GL_QUERY_RESULT
static final int GL_QUERY_RESULT
- See Also:
- Constant Field Values
-
GL_QUERY_RESULT_AVAILABLE
static final int GL_QUERY_RESULT_AVAILABLE
- See Also:
- Constant Field Values
-
GL_RED
static final int GL_RED
- See Also:
- Constant Field Values
-
GL_RENDERER
static final int GL_RENDERER
- See Also:
- Constant Field Values
-
GL_REPEAT
static final int GL_REPEAT
- See Also:
- Constant Field Values
-
GL_REPLACE
static final int GL_REPLACE
- See Also:
- Constant Field Values
-
GL_RGB
static final int GL_RGB
- See Also:
- Constant Field Values
-
GL_RGB565
static final int GL_RGB565
- See Also:
- Constant Field Values
-
GL_RGB5_A1
static final int GL_RGB5_A1
- See Also:
- Constant Field Values
-
GL_RGBA
static final int GL_RGBA
- See Also:
- Constant Field Values
-
GL_RGBA4
static final int GL_RGBA4
- See Also:
- Constant Field Values
-
GL_SCISSOR_TEST
static final int GL_SCISSOR_TEST
- See Also:
- Constant Field Values
-
GL_SHADING_LANGUAGE_VERSION
static final int GL_SHADING_LANGUAGE_VERSION
- See Also:
- Constant Field Values
-
GL_SHORT
static final int GL_SHORT
- See Also:
- Constant Field Values
-
GL_SRC_ALPHA
static final int GL_SRC_ALPHA
- See Also:
- Constant Field Values
-
GL_SRC_ALPHA_SATURATE
static final int GL_SRC_ALPHA_SATURATE
- See Also:
- Constant Field Values
-
GL_SRC_COLOR
static final int GL_SRC_COLOR
- See Also:
- Constant Field Values
-
GL_STATIC_DRAW
static final int GL_STATIC_DRAW
- See Also:
- Constant Field Values
-
GL_STENCIL_BUFFER_BIT
static final int GL_STENCIL_BUFFER_BIT
- See Also:
- Constant Field Values
-
GL_STENCIL_TEST
static final int GL_STENCIL_TEST
- See Also:
- Constant Field Values
-
GL_STREAM_DRAW
static final int GL_STREAM_DRAW
- See Also:
- Constant Field Values
-
GL_STREAM_READ
static final int GL_STREAM_READ
- See Also:
- Constant Field Values
-
GL_TEXTURE
static final int GL_TEXTURE
- See Also:
- Constant Field Values
-
GL_TEXTURE0
static final int GL_TEXTURE0
- See Also:
- Constant Field Values
-
GL_TEXTURE1
static final int GL_TEXTURE1
- See Also:
- Constant Field Values
-
GL_TEXTURE2
static final int GL_TEXTURE2
- See Also:
- Constant Field Values
-
GL_TEXTURE3
static final int GL_TEXTURE3
- See Also:
- Constant Field Values
-
GL_TEXTURE4
static final int GL_TEXTURE4
- See Also:
- Constant Field Values
-
GL_TEXTURE5
static final int GL_TEXTURE5
- See Also:
- Constant Field Values
-
GL_TEXTURE6
static final int GL_TEXTURE6
- See Also:
- Constant Field Values
-
GL_TEXTURE7
static final int GL_TEXTURE7
- See Also:
- Constant Field Values
-
GL_TEXTURE8
static final int GL_TEXTURE8
- See Also:
- Constant Field Values
-
GL_TEXTURE9
static final int GL_TEXTURE9
- See Also:
- Constant Field Values
-
GL_TEXTURE10
static final int GL_TEXTURE10
- See Also:
- Constant Field Values
-
GL_TEXTURE11
static final int GL_TEXTURE11
- See Also:
- Constant Field Values
-
GL_TEXTURE12
static final int GL_TEXTURE12
- See Also:
- Constant Field Values
-
GL_TEXTURE13
static final int GL_TEXTURE13
- See Also:
- Constant Field Values
-
GL_TEXTURE14
static final int GL_TEXTURE14
- See Also:
- Constant Field Values
-
GL_TEXTURE15
static final int GL_TEXTURE15
- See Also:
- Constant Field Values
-
GL_TEXTURE_2D
static final int GL_TEXTURE_2D
- See Also:
- Constant Field Values
-
GL_TEXTURE_CUBE_MAP
static final int GL_TEXTURE_CUBE_MAP
- See Also:
- Constant Field Values
-
GL_TEXTURE_CUBE_MAP_POSITIVE_X
static final int GL_TEXTURE_CUBE_MAP_POSITIVE_X
- See Also:
- Constant Field Values
-
GL_TEXTURE_CUBE_MAP_NEGATIVE_X
static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_X
- See Also:
- Constant Field Values
-
GL_TEXTURE_CUBE_MAP_POSITIVE_Y
static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Y
- See Also:
- Constant Field Values
-
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
- See Also:
- Constant Field Values
-
GL_TEXTURE_CUBE_MAP_POSITIVE_Z
static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Z
- See Also:
- Constant Field Values
-
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
- See Also:
- Constant Field Values
-
GL_TEXTURE_MAG_FILTER
static final int GL_TEXTURE_MAG_FILTER
- See Also:
- Constant Field Values
-
GL_TEXTURE_MIN_FILTER
static final int GL_TEXTURE_MIN_FILTER
- See Also:
- Constant Field Values
-
GL_TEXTURE_WRAP_S
static final int GL_TEXTURE_WRAP_S
- See Also:
- Constant Field Values
-
GL_TEXTURE_WRAP_T
static final int GL_TEXTURE_WRAP_T
- See Also:
- Constant Field Values
-
GL_TIME_ELAPSED
static final int GL_TIME_ELAPSED
- See Also:
- Constant Field Values
-
GL_TRIANGLES
static final int GL_TRIANGLES
- See Also:
- Constant Field Values
-
GL_TRIANGLE_FAN
static final int GL_TRIANGLE_FAN
- See Also:
- Constant Field Values
-
GL_TRIANGLE_STRIP
static final int GL_TRIANGLE_STRIP
- See Also:
- Constant Field Values
-
GL_TRUE
static final int GL_TRUE
- See Also:
- Constant Field Values
-
GL_UNPACK_ALIGNMENT
static final int GL_UNPACK_ALIGNMENT
- See Also:
- Constant Field Values
-
GL_UNSIGNED_BYTE
static final int GL_UNSIGNED_BYTE
- See Also:
- Constant Field Values
-
GL_UNSIGNED_INT
static final int GL_UNSIGNED_INT
- See Also:
- Constant Field Values
-
GL_UNSIGNED_SHORT
static final int GL_UNSIGNED_SHORT
- See Also:
- Constant Field Values
-
GL_UNSIGNED_SHORT_5_6_5
static final int GL_UNSIGNED_SHORT_5_6_5
- See Also:
- Constant Field Values
-
GL_UNSIGNED_SHORT_5_5_5_1
static final int GL_UNSIGNED_SHORT_5_5_5_1
- See Also:
- Constant Field Values
-
GL_VENDOR
static final int GL_VENDOR
- See Also:
- Constant Field Values
-
GL_VERSION
static final int GL_VERSION
- See Also:
- Constant Field Values
-
GL_VERTEX_SHADER
static final int GL_VERTEX_SHADER
- See Also:
- Constant Field Values
-
GL_ZERO
static final int GL_ZERO
- See Also:
- Constant Field Values
-
-
Method Detail
-
resetStats
void resetStats()
-
glActiveTexture
void glActiveTexture(int texture)
Selects which texture unit subsequent texture state calls will affect. The number of texture units an implementation supports is implementation dependent.
- Parameters:
texture
- which texture unit to make active. One of:TEXTURE0
GL_TEXTURE[1-31]
-
glAttachShader
void glAttachShader(int program, int shader)
Attaches a shader object to a program object.
In order to create a complete shader program, there must be a way to specify the list of things that will be linked together. Program objects provide this mechanism. Shaders that are to be linked together in a program object must first be attached to that program object. glAttachShader attaches the shader object specified by shader to the program object specified by program. This indicates that shader will be included in link operations that will be performed on program.
All operations that can be performed on a shader object are valid whether or not the shader object is attached to a program object. It is permissible to attach a shader object to a program object before source code has been loaded into the shader object or before the shader object has been compiled. It is permissible to attach multiple shader objects of the same type because each may contain a portion of the complete shader. It is also permissible to attach a shader object to more than one program object. If a shader object is deleted while it is attached to a program object, it will be flagged for deletion, and deletion will not occur until glDetachShader is called to detach it from all program objects to which it is attached.
- Parameters:
program
- the program object to which a shader object will be attached.shader
- the shader object that is to be attached.
-
glBeginQuery
void glBeginQuery(int target, int query)
Creates a query object and makes it active.
- Parameters:
target
- the target type of query object established.query
- the name of a query object.
-
glBindBuffer
void glBindBuffer(int target, int buffer)
Binds a named buffer object.
- Parameters:
target
- the target to which the buffer object is bound.buffer
- the name of a buffer object.
-
glBindTexture
void glBindTexture(int target, int texture)
Binds the a texture to a texture target.
While a texture object is bound, GL operations on the target to which it is bound affect the bound object, and queries of the target to which it is bound return state from the bound object. If texture mapping of the dimensionality of the target to which a texture object is bound is enabled, the state of the bound texture object directs the texturing operation.
- Parameters:
target
- the texture target.texture
- the texture object to bind.
-
glBlendEquationSeparate
void glBlendEquationSeparate(int colorMode, int alphaMode)
Sets the RGB blend equation and the alpha blend equation separately.
- Parameters:
colorMode
- the RGB blend equation, how the red, green, and blue components of the source and destination colors are combined.alphaMode
- the alpha blend equation, how the alpha component of the source and destination colors are combined
-
glBlendFunc
void glBlendFunc(int sfactor, int dfactor)
Specifies the weighting factors used by the blend equation, for both RGB and alpha functions and for all draw buffers.
- Parameters:
sfactor
- the source weighting factor.dfactor
- the destination weighting factor.
-
glBlendFuncSeparate
void glBlendFuncSeparate(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha)
Specifies pixel arithmetic for RGB and alpha components separately.
- Parameters:
sfactorRGB
- how the red, green, and blue blending factors are computed. The initial value is GL_ONE.dfactorRGB
- how the red, green, and blue destination blending factors are computed. The initial value is GL_ZERO.sfactorAlpha
- how the alpha source blending factor is computed. The initial value is GL_ONE.dfactorAlpha
- how the alpha destination blending factor is computed. The initial value is GL_ZERO.
-
glBufferData
void glBufferData(int target, long dataSize, int usage)
Creates and initializes a buffer object's data store.
usage
is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store.usage
can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The frequency of access may be one of these:- STREAM - The data store contents will be modified once and used at most a few times.
- STATIC - The data store contents will be modified once and used many times.
- DYNAMIC - The data store contents will be modified repeatedly and used many times.
The nature of access may be one of these:
- DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
- READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
- COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
- Parameters:
target
- the target buffer object.dataSize
- the size in bytes of the buffer object's new data storeusage
- the expected usage pattern of the data store.
-
glBufferData
void glBufferData(int target, java.nio.FloatBuffer data, int usage)
Creates and initializes a buffer object's data store.
usage
is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store.usage
can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The frequency of access may be one of these:- STREAM - The data store contents will be modified once and used at most a few times.
- STATIC - The data store contents will be modified once and used many times.
- DYNAMIC - The data store contents will be modified repeatedly and used many times.
The nature of access may be one of these:
- DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
- READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
- COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
- Parameters:
target
- the target buffer object.data
- a pointer to data that will be copied into the data store for initialization, orNULL
if no data is to be copied.usage
- the expected usage pattern of the data store.
-
glBufferData
void glBufferData(int target, java.nio.ShortBuffer data, int usage)
Creates and initializes a buffer object's data store.
usage
is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store.usage
can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The frequency of access may be one of these:- STREAM - The data store contents will be modified once and used at most a few times.
- STATIC - The data store contents will be modified once and used many times.
- DYNAMIC - The data store contents will be modified repeatedly and used many times.
The nature of access may be one of these:
- DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
- READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
- COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
- Parameters:
target
- the target buffer object.data
- a pointer to data that will be copied into the data store for initialization, orNULL
if no data is to be copiedusage
- the expected usage pattern of the data store.
-
glBufferData
void glBufferData(int target, java.nio.ByteBuffer data, int usage)
Creates and initializes a buffer object's data store.
usage
is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store.usage
can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The frequency of access may be one of these:- STREAM - The data store contents will be modified once and used at most a few times.
- STATIC - The data store contents will be modified once and used many times.
- DYNAMIC - The data store contents will be modified repeatedly and used many times.
The nature of access may be one of these:
- DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
- READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
- COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
- Parameters:
target
- the target buffer object.data
- a pointer to data that will be copied into the data store for initialization, orNULL
if no data is to be copied.usage
- the expected usage pattern of the data store.
-
glBufferSubData
void glBufferSubData(int target, long offset, java.nio.FloatBuffer data)
Updates a subset of a buffer object's data store.
- Parameters:
target
- the target buffer object.offset
- the offset into the buffer object's data store where data replacement will begin, measured in bytes.data
- a pointer to the new data that will be copied into the data store.
-
glBufferSubData
void glBufferSubData(int target, long offset, java.nio.ShortBuffer data)
Updates a subset of a buffer object's data store.
- Parameters:
target
- the target buffer object.offset
- the offset into the buffer object's data store where data replacement will begin, measured in bytes.data
- a pointer to the new data that will be copied into the data store.
-
glBufferSubData
void glBufferSubData(int target, long offset, java.nio.ByteBuffer data)
Updates a subset of a buffer object's data store.
- Parameters:
target
- the target buffer object.offset
- the offset into the buffer object's data store where data replacement will begin, measured in bytes.data
- a pointer to the new data that will be copied into the data store.
-
glClear
void glClear(int mask)
Sets portions of every pixel in a particular buffer to the same value. The value to which each buffer is cleared depends on the setting of the clear value for that buffer.
- Parameters:
mask
- Zero or the bitwise OR of one or more values indicating which buffers are to be cleared.
-
glClearColor
void glClearColor(float red, float green, float blue, float alpha)
Sets the clear value for fixed-point and floating-point color buffers in RGBA mode. The specified components are stored as floating-point values.- Parameters:
red
- the value to which to clear the R channel of the color buffer.green
- the value to which to clear the G channel of the color buffer.blue
- the value to which to clear the B channel of the color buffer.alpha
- the value to which to clear the A channel of the color buffer.
-
glColorMask
void glColorMask(boolean red, boolean green, boolean blue, boolean alpha)
Masks the writing of R, G, B and A values to all draw buffers. In the initial state, all color values are enabled for writing for all draw buffers.- Parameters:
red
- whether R values are written or not.green
- whether G values are written or not.blue
- whether B values are written or not.alpha
- whether A values are written or not.
-
glCompileShader
void glCompileShader(int shader)
Compiles a shader object.
- Parameters:
shader
- the shader object to be compiled.
-
glCompressedTexImage2D
void glCompressedTexImage2D(int target, int level, int internalFormat, int width, int height, int border, java.nio.ByteBuffer data)
Specifies a two-dimensional texture image in a compressed format.
- Parameters:
target
- the target texture.level
- the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.internalFormat
- the format of the compressed image data.width
- the width of the texture imageheight
- the height of the texture imageborder
- must be 0data
- a pointer to the compressed image data
-
glCompressedTexSubImage2D
void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, java.nio.ByteBuffer data)
Respecifies only a rectangular subregion of an existing 2D texel array, with incoming data stored in a specific compressed image format.
- Parameters:
target
- the target texture.level
- the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.xoffset
- a texel offset in the x direction within the texture array.yoffset
- a texel offset in the y direction within the texture array.width
- the width of the texture subimage.height
- the height of the texture subimage.format
- the format of the compressed image data stored at addressdata
.data
- a pointer to the compressed image data.
-
glCreateProgram
int glCreateProgram()
Creates a program object.
-
glCreateShader
int glCreateShader(int shaderType)
Creates a shader object.
- Parameters:
shaderType
- the type of shader to be created. One of:VERTEX_SHADER
FRAGMENT_SHADER
GEOMETRY_SHADER
TESS_CONTROL_SHADER
TESS_EVALUATION_SHADER
-
glCullFace
void glCullFace(int mode)
Specifies which polygon faces are culled if
CULL_FACE
is enabled. Front-facing polygons are rasterized if either culling is disabled or the CullFace mode isBACK
while back-facing polygons are rasterized only if either culling is disabled or the CullFace mode isFRONT
. The initial setting of the CullFace mode isBACK
. Initially, culling is disabled.- Parameters:
mode
- the CullFace mode. One of:FRONT
BACK
FRONT_AND_BACK
-
glDeleteBuffers
void glDeleteBuffers(java.nio.IntBuffer buffers)
Deletes named buffer objects.
- Parameters:
buffers
- an array of buffer objects to be deleted.
-
glDeleteProgram
void glDeleteProgram(int program)
Deletes a program object.
- Parameters:
program
- the program object to be deleted.
-
glDeleteShader
void glDeleteShader(int shader)
Deletes a shader object.
- Parameters:
shader
- the shader object to be deleted.
-
glDeleteTextures
void glDeleteTextures(java.nio.IntBuffer textures)
Deletes texture objects. After a texture object is deleted, it has no contents or dimensionality, and its name is again unused. If a texture that is currently bound to any of the target bindings of
BindTexture
is deleted, it is as thoughBindTexture
had been executed with the same target and texture zero. Additionally, special care must be taken when deleting a texture if any of the images of the texture are attached to a framebuffer object.Unused names in textures that have been marked as used for the purposes of
GenTextures
are marked as unused again. Unused names in textures are silently ignored, as is the name zero.- Parameters:
textures
- containsn
names of texture objects to be deleted.
-
glDepthFunc
void glDepthFunc(int func)
Specifies the comparison that takes place during the depth buffer test (when
DEPTH_TEST
is enabled).
-
glDepthMask
void glDepthMask(boolean flag)
Masks the writing of depth values to the depth buffer. In the initial state, the depth buffer is enabled for writing.
- Parameters:
flag
- whether depth values are written or not.
-
glDepthRange
void glDepthRange(double nearVal, double farVal)
Sets the depth range for all viewports to the same values.
- Parameters:
nearVal
- the near depth range.farVal
- the far depth range.
-
glDetachShader
void glDetachShader(int program, int shader)
Detaches a shader object from a program object to which it is attached.
- Parameters:
program
- the program object from which to detach the shader object.shader
- the shader object to be detached.
-
glDisable
void glDisable(int cap)
Disables the specified OpenGL state.
- Parameters:
cap
- the OpenGL state to disable.
-
glDisableVertexAttribArray
void glDisableVertexAttribArray(int index)
Disables a generic vertex attribute array.
- Parameters:
index
- the index of the generic vertex attribute to be disabled.
-
glDrawArrays
void glDrawArrays(int mode, int first, int count)
Constructs a sequence of geometric primitives by successively transferring elements for
count
vertices. Elementsfirst
throughfirst + count – 1
of each enabled non-instanced array are transferred to the GL.If an array corresponding to an attribute required by a vertex shader is not enabled, then the corresponding element is taken from the current attribute state. If an array is enabled, the corresponding current vertex attribute value is unaffected by the execution of this function.
- Parameters:
mode
- the kind of primitives being constructed.first
- the first vertex to transfer to the GL.count
- the number of vertices afterfirst
to transfer to the GL.
-
glDrawRangeElements
void glDrawRangeElements(int mode, int start, int end, int count, int type, long indices)
Implementations denote recommended maximum amounts of vertex and index data, which may be queried by calling glGet with argument
MAX_ELEMENTS_VERTICES
andMAX_ELEMENTS_INDICES
. If end - start + 1 is greater than the value of GL_MAX_ELEMENTS_VERTICES, or if count is greater than the value of GL_MAX_ELEMENTS_INDICES, then the call may operate at reduced performance. There is no requirement that all vertices in the range start end be referenced. However, the implementation may partially process unused vertices, reducing performance from what could be achieved with an optimal index set.When glDrawRangeElements is called, it uses count sequential elements from an enabled array, starting at start to construct a sequence of geometric primitives. mode specifies what kind of primitives are constructed, and how the array elements construct these primitives. If more than one array is enabled, each is used.
Vertex attributes that are modified by glDrawRangeElements have an unspecified value after glDrawRangeElements returns. Attributes that aren't modified maintain their previous values.
Errors
It is an error for indices to lie outside the range start end, but implementations may not check for this situation. Such indices cause implementation-dependent behavior.
- GL_INVALID_ENUM is generated if mode is not an accepted value.
- GL_INVALID_VALUE is generated if count is negative.
- GL_INVALID_VALUE is generated if end < start.
- GL_INVALID_OPERATION is generated if a geometry shader is active and mode is incompatible with the input primitive type of the geometry shader in the currently installed program object.
- GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array or the element array and the buffer object's data store is currently mapped.
- Parameters:
mode
- the kind of primitives to render.start
- the minimum array index contained inindices
.end
- the maximum array index contained inindices
.count
- the number of elements to be rendered.type
- the type of the values inindices
.indices
- a pointer to the location where the indices are stored.
-
glEnable
void glEnable(int cap)
Enables the specified OpenGL state.
- Parameters:
cap
- the OpenGL state to enable.
-
glEnableVertexAttribArray
void glEnableVertexAttribArray(int index)
Enables a generic vertex attribute array.
- Parameters:
index
- the index of the generic vertex attribute to be enabled.
-
glEndQuery
void glEndQuery(int target)
Marks the end of the sequence of commands to be tracked for the active query specified by
target
.- Parameters:
target
- the query object target.
-
glGenBuffers
void glGenBuffers(java.nio.IntBuffer buffers)
Generates buffer object names.
- Parameters:
buffers
- a buffer in which the generated buffer object names are stored.
-
glGenTextures
void glGenTextures(java.nio.IntBuffer textures)
Returns n previously unused texture names in textures. These names are marked as used, for the purposes of GenTextures only, but they acquire texture state and a dimensionality only when they are first bound, just as if they were unused.
- Parameters:
textures
- a scalar or buffer in which to place the returned texture names.
-
glGenQueries
void glGenQueries(int number, java.nio.IntBuffer ids)
Generates query object names.
- Parameters:
ids
- a buffer in which the generated query object names are stored.
-
glGetAttribLocation
int glGetAttribLocation(int program, java.lang.String name)
Returns the location of an attribute variable.
- Parameters:
program
- the program object to be queried.name
- a null terminated string containing the name of the attribute variable whose location is to be queried.
-
glGetBoolean
void glGetBoolean(int pname, java.nio.ByteBuffer params)
Returns the current boolean value of the specified state variable.
LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, LWJGL will not validate if
params
has enough space to store that array. Doing so would introduce significant overhead, as the OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.- Parameters:
pname
- the state variable.params
- a scalar or buffer in which to place the returned data.
-
glGetBufferSubData
void glGetBufferSubData(int target, long offset, java.nio.ByteBuffer data)
Returns a subset of a buffer object's data store.
- Parameters:
target
- the target buffer object.offset
- the offset into the buffer object's data store from which data will be returned, measured in bytes.data
- a pointer to the location where buffer object data is returned.
-
glGetError
int glGetError()
Returns error information. Each detectable error is assigned a numeric code. When an error is detected, a flag is set and the code is recorded. Further errors, if they occur, do not affect this recorded code. When
GetError
is called, the code is returned and the flag is cleared, so that a further error will again record its code. If a call toGetError
returnsNO_ERROR
, then there has been no detectable error since the last call toGetError
(or since the GL was initialized).
-
glGetInteger
void glGetInteger(int pname, java.nio.IntBuffer params)
Returns the current integer value of the specified state variable.
LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, LWJGL will not validate if
params
has enough space to store that array. Doing so would introduce significant overhead, as the OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.- Parameters:
pname
- the state variable.params
- a scalar or buffer in which to place the returned data.
-
glGetProgram
void glGetProgram(int program, int pname, java.nio.IntBuffer params)
Returns a parameter from a program object.
- Parameters:
program
- the program object to be queried.pname
- the object parameter.params
- the requested object parameter.
-
glGetProgramInfoLog
java.lang.String glGetProgramInfoLog(int program, int maxSize)
Returns the information log for a program object.
- Parameters:
program
- the program object whose information log is to be queried.maxSize
- the size of the character buffer for storing the returned information log.
-
glGetQueryObjectui64
long glGetQueryObjectui64(int query, int pname)
Unsigned version.- Parameters:
query
- the name of a query objectpname
- the symbolic name of a query object parameter
-
glGetQueryObjectiv
int glGetQueryObjectiv(int query, int pname)
Returns the integer value of a query object parameter.
- Parameters:
query
- the name of a query objectpname
- the symbolic name of a query object parameter. One of:QUERY_RESULT
QUERY_RESULT_AVAILABLE
-
glGetShader
void glGetShader(int shader, int pname, java.nio.IntBuffer params)
Returns a parameter from a shader object.
- Parameters:
shader
- the shader object to be queried.pname
- the object parameter.params
- the requested object parameter.
-
glGetShaderInfoLog
java.lang.String glGetShaderInfoLog(int shader, int maxSize)
Returns the information log for a shader object.
- Parameters:
shader
- the shader object whose information log is to be queried.maxSize
- the size of the character buffer for storing the returned information log.
-
glGetString
java.lang.String glGetString(int name)
Return strings describing properties of the current GL context.
- Parameters:
name
- the property to query. One of:RENDERER
VENDOR
EXTENSIONS
VERSION
SHADING_LANGUAGE_VERSION
-
glGetUniformLocation
int glGetUniformLocation(int program, java.lang.String name)
Returns the location of a uniform variable.
- Parameters:
program
- the program object to be queried.name
- a null terminated string containing the name of the uniform variable whose location is to be queried.
-
glIsEnabled
boolean glIsEnabled(int cap)
Determines if
cap
is currently enabled (as withEnable
) or disabled.- Parameters:
cap
- the enable state to query.
-
glLineWidth
void glLineWidth(float width)
Sets the width of rasterized line segments. The default width is 1.0.- Parameters:
width
- the line width.
-
glLinkProgram
void glLinkProgram(int program)
Links a program object.- Parameters:
program
- the program object to be linked.
-
glPixelStorei
void glPixelStorei(int pname, int param)
Sets the integer value of a pixel store parameter.
- Parameters:
pname
- the pixel store parameter to set.param
- the parameter value
-
glPolygonOffset
void glPolygonOffset(float factor, float units)
The depth values of all fragments generated by the rasterization of a polygon may be offset by a single value that is computed for that polygon. This function determines that value.
factor
scales the maximum depth slope of the polygon, andunits
scales an implementation-dependent constant that relates to the usable resolution of the depth buffer. The resulting values are summed to produce the polygon offset value.- Parameters:
factor
- the maximum depth slope factor.units
- the constant scale.
-
glReadPixels
void glReadPixels(int x, int y, int width, int height, int format, int type, java.nio.ByteBuffer data)
ReadPixels obtains values from the selected read buffer from each pixel with lower left hand corner at
(x + i, y + j)
for0 <= i < width
and0 <= j < height
; this pixel is said to be the ith pixel in the jth row. If any of these pixels lies outside of the window allocated to the current GL context, or outside of the image attached to the currently bound read framebuffer object, then the values obtained for those pixels are undefined. WhenREAD_FRAMEBUFFER_BINDING
is zero, values are also undefined for individual pixels that are not owned by the current context. Otherwise,ReadPixels
obtains values from the selected buffer, regardless of how those values were placed there.- Parameters:
x
- the left pixel coordinatey
- the lower pixel coordinatewidth
- the number of pixels to read in the x-dimensionheight
- the number of pixels to read in the y-dimensionformat
- the pixel format.type
- the pixel type.data
- a buffer in which to place the returned pixel data.
-
glReadPixels
void glReadPixels(int x, int y, int width, int height, int format, int type, long offset)
ReadPixels obtains values from the selected read buffer from each pixel with lower left hand corner at
(x + i, y + j)
for0 <= i < width
and0 <= j < height
; this pixel is said to be the ith pixel in the jth row. If any of these pixels lies outside of the window allocated to the current GL context, or outside of the image attached to the currently bound read framebuffer object, then the values obtained for those pixels are undefined. WhenREAD_FRAMEBUFFER_BINDING
is zero, values are also undefined for individual pixels that are not owned by the current context. Otherwise,ReadPixels
obtains values from the selected buffer, regardless of how those values were placed there.- Parameters:
x
- the left pixel coordinatey
- the lower pixel coordinatewidth
- the number of pixels to read in the x-dimensionheight
- the number of pixels to read in the y-dimensionformat
- the pixel format.type
- the pixel type.offset
- a buffer in which to place the returned pixel data/
-
glScissor
void glScissor(int x, int y, int width, int height)
Defines the scissor rectangle for all viewports. The scissor test is enabled or disabled for all viewports using
Enable
orDisable
with the symbolic constantSCISSOR_TEST
. When disabled, it is as if the scissor test always passes. When enabled, if left <= xw < left + width and bottom <= yw < bottom + height for the scissor rectangle, then the scissor test passes. Otherwise, the test fails and the fragment is discarded.- Parameters:
x
- the left scissor rectangle coordinate.y
- the bottom scissor rectangle coordinate.width
- the scissor rectangle width.height
- the scissor rectangle height.
-
glShaderSource
void glShaderSource(int shader, java.lang.String[] strings, java.nio.IntBuffer length)
Sets the source code in
shader
to the source code in the array of strings specified bystrings
. Any source code previously stored in the shader object is completely replaced. The number of strings in the array is specified bycount
. Iflength
isNULL
, each string is assumed to be null terminated. Iflength
is a value other thanNULL
, it points to an array containing a string length for each of the corresponding elements ofstrings
. Each element in the length array may contain the length of the corresponding string (the null character is not counted as part of the string length) or a value less than 0 to indicate that the string is null terminated. The source code strings are not scanned or parsed at this time; they are simply copied into the specified shader object.- Parameters:
shader
- the shader object whose source code is to be replaced,strings
- an array of pointers to strings containing the source code to be loaded into the shader
-
glStencilFuncSeparate
void glStencilFuncSeparate(int face, int func, int ref, int mask)
Sets front and/or back function and reference value for stencil testing.
- Parameters:
face
- whether front and/or back stencil state is updated. One of:FRONT
BACK
FRONT_AND_BACK
func
- the test function. The initial value is GL_ALWAYS. One of:NEVER
LESS
LEQUAL
GREATER
GEQUAL
EQUAL
NOTEQUAL
ALWAYS
ref
- the reference value for the stencil test.ref
is clamped to the range [0, 2n – 1], wheren
is the number of bitplanes in the stencil buffer. The initial value is 0.mask
- a mask that is ANDed with both the reference value and the stored stencil value when the test is done. The initial value is all 1's.
-
glStencilOpSeparate
void glStencilOpSeparate(int face, int sfail, int dpfail, int dppass)
Sets front and/or back stencil test actions.
- Parameters:
face
- whether front and/or back stencil state is updated. One of:FRONT
BACK
FRONT_AND_BACK
sfail
- the action to take when the stencil test fails. The initial value is GL_KEEP. One of:KEEP
ZERO
REPLACE
INCR
INCR_WRAP
DECR
DECR_WRAP
INVERT
dpfail
- the stencil action when the stencil test passes, but the depth test fails. The initial value is GL_KEEP.dppass
- the stencil action when both the stencil test and the depth test pass, or when the stencil test passes and either there is no depth buffer or depth testing is not enabled. The initial value is GL_KEEP.
-
glTexImage2D
void glTexImage2D(int target, int level, int internalFormat, int width, int height, int border, int format, int type, java.nio.ByteBuffer data)
Specifies a two-dimensional texture image.
- Parameters:
target
- the texture target.level
- the level-of-detail number.internalFormat
- the texture internal format.width
- the texture width.height
- the texture height.border
- the texture border width.format
- the texel data format.type
- the texel data type.data
- the texel data.
-
glTexParameterf
void glTexParameterf(int target, int pname, float param)
Float version of
TexParameteri
.- Parameters:
target
- the texture target.pname
- the parameter to set.param
- the parameter value.
-
glTexParameteri
void glTexParameteri(int target, int pname, int param)
Sets the integer value of a texture parameter, which controls how the texel array is treated when specified or changed, and when applied to a fragment.
- Parameters:
target
- the texture target.pname
- the parameter to set.param
- the parameter value.
-
glTexSubImage2D
void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, java.nio.ByteBuffer data)
Respecifies a rectangular subregion of an existing texel array. No change is made to the internalformat, width, height, depth, or border parameters of the specified texel array, nor is any change made to texel values outside the specified subregion.
- Parameters:
target
- the texture target.level
- the level-of-detail-numberxoffset
- the left coordinate of the texel subregionyoffset
- the bottom coordinate of the texel subregionwidth
- the subregion widthheight
- the subregion heightformat
- the pixel data format.type
- the pixel data type.data
- the pixel data.
-
glUniform1
void glUniform1(int location, java.nio.FloatBuffer value)
Specifies the value of a single float uniform variable or a float uniform variable array for the current program object.
- Parameters:
location
- the location of the uniform variable to be modified.value
- a pointer to an array ofcount
values that will be used to update the specified uniform variable.
-
glUniform1
void glUniform1(int location, java.nio.IntBuffer value)
Specifies the value of a single int uniform variable or a int uniform variable array for the current program object.
- Parameters:
location
- the location of the uniform variable to be modified.value
- a pointer to an array ofcount
values that will be used to update the specified uniform variable.
-
glUniform1f
void glUniform1f(int location, float v0)
Specifies the value of a float uniform variable for the current program object.
- Parameters:
location
- the location of the uniform variable to be modified.v0
- the uniform value.
-
glUniform1i
void glUniform1i(int location, int v0)
Specifies the value of an int uniform variable for the current program object.
- Parameters:
location
- the location of the uniform variable to be modified.v0
- the uniform value.
-
glUniform2
void glUniform2(int location, java.nio.IntBuffer value)
Specifies the value of a single ivec2 uniform variable or an ivec2 uniform variable array for the current program object.
- Parameters:
location
- the location of the uniform variable to be modified.value
- a pointer to an array ofcount
values that will be used to update the specified uniform variable.
-
glUniform2
void glUniform2(int location, java.nio.FloatBuffer value)
Specifies the value of a single vec2 uniform variable or a vec2 uniform variable array for the current program object.
- Parameters:
location
- the location of the uniform variable to be modified.value
- a pointer to an array ofcount
values that will be used to update the specified uniform variable.
-
glUniform2f
void glUniform2f(int location, float v0, float v1)
Specifies the value of a vec2 uniform variable for the current program object.
- Parameters:
location
- the location of the uniform variable to be modified.v0
- the uniform x value.v1
- the uniform y value.
-
glUniform3
void glUniform3(int location, java.nio.IntBuffer value)
Specifies the value of a single ivec3 uniform variable or an ivec3 uniform variable array for the current program object.
- Parameters:
location
- the location of the uniform variable to be modified.value
- a pointer to an array ofcount
values that will be used to update the specified uniform variable.
-
glUniform3
void glUniform3(int location, java.nio.FloatBuffer value)
Specifies the value of a single vec3 uniform variable or a vec3 uniform variable array for the current program object.
- Parameters:
location
- the location of the uniform variable to be modified.value
- a pointer to an array ofcount
values that will be used to update the specified uniform variable.
-
glUniform3f
void glUniform3f(int location, float v0, float v1, float v2)
Specifies the value of a vec3 uniform variable for the current program object.
- Parameters:
location
- the location of the uniform variable to be modified.v0
- the uniform x value.v1
- the uniform y value.v2
- the uniform z value.
-
glUniform4
void glUniform4(int location, java.nio.FloatBuffer value)
Specifies the value of a single vec4 uniform variable or a vec4 uniform variable array for the current program object.
- Parameters:
location
- the location of the uniform variable to be modified.value
- a pointer to an array ofcount
values that will be used to update the specified uniform variable.
-
glUniform4
void glUniform4(int location, java.nio.IntBuffer value)
Specifies the value of a single ivec4 uniform variable or an ivec4 uniform variable array for the current program object.
- Parameters:
location
- the location of the uniform variable to be modified.value
- a pointer to an array ofcount
values that will be used to update the specified uniform variable.
-
glUniform4f
void glUniform4f(int location, float v0, float v1, float v2, float v3)
Specifies the value of a vec4 uniform variable for the current program object.
- Parameters:
location
- the location of the uniform variable to be modified.v0
- the uniform x value.v1
- the uniform y value.v2
- the uniform z value.v3
- the uniform w value.
-
glUniformMatrix3
void glUniformMatrix3(int location, boolean transpose, java.nio.FloatBuffer value)
Specifies the value of a single mat3 uniform variable or a mat3 uniform variable array for the current program object.
- Parameters:
location
- the location of the uniform variable to be modified.transpose
- whether to transpose the matrix as the values are loaded into the uniform variable.value
- a pointer to an array ofcount
values that will be used to update the specified uniform variable.
-
glUniformMatrix4
void glUniformMatrix4(int location, boolean transpose, java.nio.FloatBuffer value)
Specifies the value of a single mat4 uniform variable or a mat4 uniform variable array for the current program object.
- Parameters:
location
- the location of the uniform variable to be modified.transpose
- whether to transpose the matrix as the values are loaded into the uniform variable.value
- a pointer to an array ofcount
values that will be used to update the specified uniform variable.
-
glUseProgram
void glUseProgram(int program)
Installs a program object as part of current rendering state.
- Parameters:
program
- the program object whose executables are to be used as part of current rendering state.
-
glVertexAttribPointer
void glVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, long pointer)
Specifies the location and organization of a vertex attribute array.
- Parameters:
index
- the index of the generic vertex attribute to be modifiedsize
- the number of values per vertex that are stored in the array.type
- the data type of each component in the array. The initial value is GL_FLOAT.normalized
- whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessedstride
- the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in the array. The initial value is 0.pointer
- the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer currently bound to theARRAY_BUFFER
target. The initial value is 0.
-
glViewport
void glViewport(int x, int y, int width, int height)
Specifies the viewport transformation parameters for all viewports.
In the initial state,
width
andheight
for each viewport are set to the width and height, respectively, of the window into which the GL is to do its rendering. If the default framebuffer is bound but no default framebuffer is associated with the GL context, thenwidth
andheight
are initially set to zero.- Parameters:
x
- the left viewport coordinate.y
- the bottom viewport coordinate.width
- the viewport width.height
- the viewport height.
-
-


Initial represents the initial amount of memory and committed represents the amount of memory guaranteed to be available for use by the JVM. - Reference


An iteration range over a 3D data set. Splits divide each dimension in half for each dimension that is divisible. Successive splits results in a quad-tree where each leaf represents a unit of work.
More...
#include <QuadRange.h>
|
|
using | iter_type = TIterType |
| |
|
using | range_type = Range1d< iter_type > |
| |
|
using | split_result = SplitResult< QuadRange, MAX_SPLITS, DIMENSIONALITY > |
| |
|
using | size_type = typename range_type::size_type |
| |
|
|
| QuadRange (QuadRange const &)=default |
| |
| GTS_INLINE | QuadRange (iter_type xBegin, iter_type xEnd, size_type xMinSize, iter_type yBegin, iter_type yEnd, size_type yMinSize, size_type xSplitOnMultiplesOf=1, size_type ySplitOnMultiplesOf=1) |
| | Constructs a QuadRange. More...
|
| |
|
GTS_INLINE range_type const & | xRange () const |
| |
|
GTS_INLINE range_type & | xRange () |
| |
|
GTS_INLINE range_type const & | yRange () const |
| |
|
GTS_INLINE range_type & | yRange () |
| |
|
GTS_INLINE range_type const & | subRange (SubRangeIndex::Type index) const |
| |
|
GTS_INLINE range_type & | subRange (SubRangeIndex::Type index) |
| |
|
GTS_INLINE QuadRange | xNeighbor () const |
| |
|
GTS_INLINE QuadRange | yNeighbor () const |
| |
|
GTS_INLINE void | resetInitialSize (size_type initSize, SubRangeIndex::Type index) |
| |
|
GTS_INLINE bool | isDivisible () const |
| |
|
GTS_INLINE bool | empty () const |
| |
|
GTS_INLINE size_t | size () const |
| |
| template<typename TSplitter > |
| GTS_INLINE void | split (split_result &results, TSplitter const &) |
| | Splits the range into four possible subranges. More...
|
| |
|
|
static GTS_INLINE uint16_t | adjustDivisor (uint16_t initialSplitDepth, bool isStatic) |
| |
|
static GTS_INLINE uint16_t | splitInitialDepth (uint16_t initialSplitDepth, bool) |
| |
|
static GTS_INLINE uint16_t | finalSplitDivisor (uint16_t initialSplitDepth, bool) |
| |
|
|
static constexpr SubRangeIndex::Type | X = SubRangeIndex::X |
| |
|
static constexpr SubRangeIndex::Type | Y = SubRangeIndex::Y |
| |
|
static constexpr size_t | SPLIT_FACTOR = 4 |
| |
|
static constexpr size_t | MAX_SPLITS = SPLIT_FACTOR - 1 |
| |
|
static constexpr size_t | DIMENSIONALITY = 2 |
| |
template<typename TIterType>
class gts::QuadRange< TIterType >
An iteration range over a 3D data set. Splits divide each dimension in half for each dimension that is divisible. Successive splits results in a quad-tree where each leaf represents a unit of work.
- Todo:
- Add get neighbor functions.
◆ QuadRange()
template<typename TIterType >
| GTS_INLINE gts::QuadRange< TIterType >::QuadRange |
( |
iter_type |
xBegin, |
|
|
iter_type |
xEnd, |
|
|
size_type |
xMinSize, |
|
|
iter_type |
yBegin, |
|
|
iter_type |
yEnd, |
|
|
size_type |
yMinSize, |
|
|
size_type |
xSplitOnMultiplesOf = 1 , |
|
|
size_type |
ySplitOnMultiplesOf = 1 |
|
) |
| |
|
inline |
Constructs a QuadRange.
- Parameters
-
| xBegin | An iterator to the beginning of the x-dimension range. |
| xEnd | An iterator to the end of the x-dimension range. |
| xMinSize | The smallest sub-range the x-dimension can be divided into. Must be >= splitOnMultiplesOf. |
| yBegin | An iterator to the beginning of the y-dimension range. |
| yEnd | An iterator to the end of the y-dimension range. |
| yMinSize | The smallest sub-range the y-dimension can be divided into. Must be >= splitOnMultiplesOf. |
| xSplitOnMultiplesOf | Tries to ensure that each sub-range in the x-dimensions is a multiple of this value. |
| ySplitOnMultiplesOf | Tries to ensure that each sub-range in the y-dimensions is a multiple of this value. |
◆ split()
template<typename TIterType >
template<typename TSplitter >
Splits the range into four possible subranges.
- Parameters
-
| results | The returned results from the split. |


December , 2016
December 5-6
December 6-7
December 7-8
December 8-9
December 9-10
December 10-11
December 11-12
December 12-13
December 13-14


Click the button to add a new row at the first position of the table and then add cells and content.
ESP NUMBERS
Plug 1
Plug 2
Plug 3
Plug 4
ESP01
Blah 1
Click me!
link 3
link 4
ESP02
Blah 2
link 2
link 3
link 4
ESP03
Blah 3
link 2
link 3
link 4
Try it


Shooting K9 Charity Calendar Photos for the Waterloo Police
by Jason Krygier-BaumThe classic cop story: a devious crime, a detailed investigation, an exciting high-speed chase, an intense interrogation, a news conference with flashing popping as the police show off their impressive bust… except this one involves more drool, flying fur, and a gruesome pile of bones — dog bones, that is.
The Waterloo Region Police approached me with a very unique task: to create a kickass K9 Calendar to raise serious funds for Special Olympics Ontario. I needed to keep the guns to a minimum and limit the donut jokes, but apart from that, I was free to do as I liked with the project.
It’s rare to be given create carte-blanche on an assignment, so I put my thinking cap on. I could keep things simple — a dozen ‘hero dog’ photos at locations around the Waterloo region, shot from below to make our K9s look mighty? Naah – too easy!
How about highlighting the dogs’ unique talents of tracking down missing people and suspects? Hmm… getting warmer.
Maybe I can get my dog into the photos somehow? True to character, maybe she can be a criminal?
Got it! Photograph iconic police movie scenes as a 12 image story where the dogs are the cops and incorporate as many humorous doggy and police stereotypes as possible. Now this was a cool idea!
The images I wanted to create were really specific and I had to be sure that I wasn’t taking up too much time of the in-demand police pups, so I needed to plan these photos out in a big way. My drawing skills don’t compare to my Photoshop skills, so with the inspiration of Brooklyn 99 reruns, I morphed hundreds of objects into each month’s mockup, paying special attention to perspective, storytelling, and where each subject would be placed.

With the Chief’s rubber stamp, we were off to the races. Location scouting, prop sourcing, and dog trick training – I needed those guilty criminal dog eyes on cue!
The commanding inspector, inquisitive detective, goofy desk officer, good cop, bad cop and a pointed hot pursuit, the K9 unit dogs and their handlers were great sports and models, pulling off dynamic expressions like pros.
From a pet store crime scene to patrolling Waterloo Region in a vintage cruiser, this calendar tells the story of Ranger, Grim, Chase, and Tracker, as they work to solve a case of stolen dog bones – with a little help from their two-legged handlers.
P.S. You can purchase your copy of the calendar here to help support the Special Olympics.
About the author: Jason Krygier-Baum is an animal photographer based in Ontario, Canada. The opinions expressed in this article are solely those of the author. You can find more of Krygier-Baum’s work on his website, Facebook, and Instagram. This article was also published here.


[ Botlist Home ] (the ghostnetwork/appspot.com)
All your favorite links in one place. Bookmark popular items for you and friends. Check out what other people are interested in.


PARKING CALCULATOR
Choose a Lot
Short-Term Parking
Economy Parking
Long-Term Surface Parking
Long-Term Garage Parking
Valet Parking
Choose Entry Date and Time
Choose Leaving Date and Time
COST
$ 0
Response delayed by:
0
100
1000
5,000 milliseconds


You are here

Join us free
QS World University Rankings by Subject 2016 - Computer Science & Information Systems
In partnership with:
1,659
shares
|
|
|
|
Advertisement
Discover the world’s top universities for computer science & information systems, with the QS World University Rankings by Subject 2016. The rankings highlight the world’s top universities in 42 subjects, based on academic reputation, employer reputation and research impact (full methodology here). Use the interactive table to sort the results by location or performance indicator, and click on each university for more details.
Select a subjectArchaeologyArchitectureArt & DesignEnglish Language and LiteratureHistoryLinguisticsModern LanguagesPerforming ArtsPhilosophyComputer Science and Information SystemsEngineering - ChemicalEngineering - Civil and StructuralEngineering - Electrical and ElectronicEngineering - MechanicalEngineering - Mineral & MiningAgriculture & ForestryBiological SciencesDentistryMedicineNursingPharmacy & PharmacologyPsychologyVeterinary ScienceChemistryEarth and Marine SciencesEnvironmental StudiesGeographyMaterials SciencesMathematicsPhysics & AstronomyAccounting and FinanceAnthropologyBusiness & Management StudiesCommunication and Media StudiesDevelopment StudiesEconomics and EconometricsEducation and TrainingLaw and Legal StudiesPoliticsSocial Policy & AdministrationSociologyStatistics and Operational Research
Select a subject
Read more about
|
|
|
|
|
Ranking 502 of 502 ❮ 1 ❯ Results per page:<PHONE_NUMBER>All All Compare Clear all Select a subjectArchaeologyArchitectureArt & DesignEnglish Language and LiteratureHistoryLinguisticsModern LanguagesPerforming ArtsPhilosophyComputer Science and Information SystemsEngineering - ChemicalEngineering - Civil and StructuralEngineering - Electrical and ElectronicEngineering - MechanicalEngineering - Mineral & MiningAgriculture & ForestryBiological SciencesDentistryMedicineNursingPharmacy & PharmacologyPsychologyVeterinary ScienceChemistryEarth and Marine SciencesEnvironmental StudiesGeographyMaterials SciencesMathematicsPhysics & AstronomyAccounting and FinanceAnthropologyBusiness & Management StudiesCommunication and Media StudiesDevelopment StudiesEconomics and EconometricsEducation and TrainingLaw and Legal StudiesPoliticsSocial Policy & AdministrationSociologyStatistics and Operational Research Select a subject Refine: AfricaAsiaEuropeLatin AmericaNorth AmericaOceania ArgentinaAustraliaAustriaBelgiumBrazilCanadaChileChinaColombiaCzech RepublicDenmarkEgyptEstoniaFinlandFranceGermanyGreeceHong KongHungaryIndiaIndonesiaIrelandIsraelItalyJapanLebanonLuxembourgMalaysiaMexicoNetherlandsNew ZealandNorwayPakistanPolandPortugalRomaniaRussiaSaudi ArabiaSerbiaSingaporeSlovakiaSloveniaSouth AfricaSouth KoreaSpainSwedenSwitzerlandTaiwanThailandTurkeyUnited KingdomUnited States By location
Ranking 25 of 502 ❮ 1 … 2 3 4 … 21 ❯ Results per page:<PHONE_NUMBER>All 25
Advertisement
Recent Articles
EDHEC Business School and QS have partnered together to offer an exclusive scholarship to support students enrolli... Meet this university at QS events QS World Grad School Tour Saturday, 16th Sep 2017 QS World Grad School Tour Tuesday, 19th Sep 2017 QS World Grad School Tour Saturday, 30th Sep 2017 Follow TOPUNIVERSITIES Advertisement
About Contact Privacy Users Cookies © QS Quacquarelli Symonds Limited 1994 - 2017. All rights reserved. Succeed with our top tips on admissions, jobs and student life Join us free No thanks
|


Before Change
// ==============================================
// Getting engine thrust
// ==============================================
state = Data()
state.conditions = Aerodynamics()
state.numerics = Numerics()
conditions = state.conditions
conditions.freestream.dynamic_pressure = np.array(np.atleast_1d(0.5 * rho * speed_for_thrust**2))
conditions.freestream.gravity = np.array([np.atleast_1d(sea_level_gravity)])
conditions.freestream.velocity = np.array(np.atleast_1d(speed_for_thrust))
conditions.freestream.mach_number = np.array(np.atleast_1d(speed_for_thrust/ a))
conditions.freestream.speed_of_sound = np.array(a)
conditions.freestream.temperature = np.array(np.atleast_1d(T))
conditions.freestream.pressure = np.array(np.atleast_1d(p))
conditions.propulsion.throttle = np.array(np.atleast_1d(1.))
results = vehicle.propulsors.evaluate_thrust(state) // total thrust
thrust = results.thrust_force_vector
// ==============================================
// Calculate takeoff distance
// ==============================================
// Defining takeoff distance equations coefficients
try:
takeoff_constants = vehicle.takeoff_constants // user defined
except: // default values
takeoff_constants = np.zeros(3)
if engine_number == 2:
takeoff_constants[0] = 857.4
takeoff_constants[1] = 2.476
takeoff_constants[2] = 0.00014
elif engine_number == 3:
takeoff_constants[0] = 667.9
takeoff_constants[1] = 2.343
takeoff_constants[2] = 0.000093
elif engine_number == 4:
takeoff_constants[0] = 486.7
takeoff_constants[1] = 2.282
takeoff_constants[2] = 0.0000705
elif engine_number > 4:
takeoff_constants[0] = 486.7
takeoff_constants[1] = 2.282
takeoff_constants[2] = 0.0000705
print("The vehicle has more than 4 engines. Using 4 engine correlation. Result may not be correct.")
else:
takeoff_constants[0] = 857.4
takeoff_constants[1] = 2.476
takeoff_constants[2] = 0.00014
print("Incorrect number of engines: {0:.1f}. Using twin engine correlation.".format(engine_number))
// Define takeoff index (V2^2 / (T/W)
takeoff_index = V2_speed**2. / (thrust[0][0] / weight)
// Calculating takeoff field length
takeoff_field_length = 0.
for idx,constant in enumerate(takeoff_constants):
takeoff_field_length += constant * takeoff_index**idx
takeoff_field_length = takeoff_field_length * Units.ft
// calculating second segment climb gradient, if required by user input
if compute_2nd_seg_climb:
// Getting engine thrust at V2 (update only speed related conditions)
state.conditions.freestream.dynamic_pressure = np.array(np.atleast_1d(0.5 * rho * V2_speed**2))
state.conditions.freestream.velocity = np.array(np.atleast_1d(V2_speed))
state.conditions.freestream.mach_number = np.array(np.atleast_1d(V2_speed/ a))
results = vehicle.propulsors["turbofan"].engine_out(state)
thrust = results.thrust_force_vector[0][0]
// Compute windmilling drag
windmilling_drag_coefficient = windmilling_drag(vehicle,state)
// Compute asymmetry drag
asymmetry_drag_coefficient = asymmetry_drag(state, vehicle, windmilling_drag_coefficient)
// Compute l over d ratio for takeoff condition, NO engine failure
l_over_d = estimate_2ndseg_lift_drag_ratio(vehicle)
// Compute L over D ratio for takeoff condition, WITH engine failure
clv2 = maximum_lift_coefficient / (V2_VS_ratio) **2
cdv2_all_engine = clv2 / l_over_d
cdv2 = cdv2_all_engine + asymmetry_drag_coefficient + windmilling_drag_coefficient
l_over_d_v2 = clv2 / cdv2
// Compute 2nd segment climb gradient
second_seg_climb_gradient = thrust / (weight*sea_level_gravity) - 1. / l_over_d_v2
return takeoff_field_length, second_seg_climb_gradient
else:
// return only takeoff_field_length
return takeoff_field_length
After Change
// Compute 2nd segment climb gradient
second_seg_climb_gradient = thrust / (weight*sea_level_gravity) - 1. / l_over_d_v2
return takeoff_field_length[0][0], second_seg_climb_gradient[0][0]
else:
// return only takeoff_field_length
return takeoff_field_length[0][0]


-
Updated on 18 Sep
-
MIT License
Updated
on 13 Sep
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.


Answer the following questions to find out where you should go on your next vacation!
Do you prefer hot climates or cold?
Which of the following best describes your perfect day?
What type of climate do you prefer?
What would you choose to eat for your last meal?
What is your budget?


Downloading a File With an Invalid DOS Name
This dialog will appear if you try to download a file from CIX using Moderate that doesn't have a valid DOS filename. Type in a valid 8.3 filename for Moderate to use instead.


Player fields
Showing the Tab interface and many fields
Patent fields
Showing the Tab interface and many fields
Agreement fields
Showing the Tab interface and many fields
Costs fields
Showing the Tab interface and many fields
Damages fields
Showing the Tab interface and many fields
Trademark fields
Showing the Tab interface and many fields


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/work_on_goals.3F.html ---
Is there a tactic or recommended way to work on a specific subset of the set of current goals, (I have 5 and I want to run one set of tactics on 3 of them and one set on the other two)? Currently all I can think of is naming my tactics scripts and calling the relevant one on each, but this would be unwieldy on more than 5.
Actually I guess this is a duplicate of the goal selectors topic we had recently, sorry!
focus
might be the what you're looking for.
Maybe not exactly what I'm looking for but definitely useful and not something I was aware of, thanks!
My students at one point had work_on_goals
as a homework assignment. :-) It's only a few lines long --- someone should PR it!
I don't know how good this is.
namespace tactic.interactive meta def work_on_goals (p : interactive.parse lean.parser.pexpr) (tac : itactic) : tactic unit := do gs ← get_goals, e ← to_expr p, l ← eval_expr (list ℕ) e, let gl := l.filter_map (λ x, gs.nth x), let glc := gs.remove_all gl, set_goals gl, all_goals tac, gs ← get_goals, set_goals (gs ++ glc) end tactic.interactive
Oh, I wasn't certain what the intended semantics was here. I'd expected just tac
, rather than all_goals tac
.
i.e., the interactive tactic was for entering a scope in which you could only see a subset of the goals.
perhaps then some_goals [3,5,8] { ... }
could be defined as work_on_goals [3,5,8] { all_goals { ... } }
.
But besides deciding this, and giving an error message if eval_expr
fails, and addings docs, yes, someone should PR this!
Last updated: Apr 24 2020 at 19:02 UTC


Kitura-WebSocket
WebSocket support for Kitura base servers
Summary
Kitura-WebSocket provides Kitura based servers the ability to receive and send messages to clients using the WebSocket protocol (RFC 6455). It is compatible with a variety of WebSocket clients, including: - The built-in WebSocket support in the Chrome, FireFox, and Safari browsers - The NPM websocket package.
Kitura-WebSocket supports version thirteen of the WebSocket protocol.
Both the WS and WSS (SSL/TLS secured WS) protocols are supported by Kitura-WebSocket. To enable WSS simply set up your Kitura based server for SSL/TLS support. See the tutorial Enabling SSL/TLS on your Kitura server on www.kitura.io for details.
Table of Contents
Pre-requisites
Working with Kitura-WebSocket requires that you are set up to work with Kitura. See www.kitura.io for details.
APIs
The following is an overview of the Kitura-WebSocket APIs. For more details see http://ibm-swift.github.io/Kitura-WebSocket.
When using the WebSocket protocol, clients connect to WebSocket Services running on a particular server. WebSocket Services are identified on a particular server via a path. This path is sent in the Upgrade request used to upgrade a connection from HTTP 1.1 to WebSocket.
The Kitura-WebSocket API reflects that interaction using the class WebSocketConnection
which represents a WebSocket client’s
connection to a service and the protocol WebSocketService
which is implemented by classes that are WebSocket Services.
A specific WebSocketConnection
object is connected to a specific WebSocketService
instance. On the other hand a specific
WebSocketService
instance is connected to many WebSocketConnection
objects.
WebSocketConnection
The WebSocketConnection class provides:
- Functions to send text and binary messages to the client
swift
WebSocketConnection.send(message: Data)
WebSocketConnection.send(message: String)
- Functions to close the connection gracefully and forcefully
swift
WebSocketConnection.close(reason: WebSocketCloseReasonCode?=nil, description: String?=nil)
WebSocketConnection.drop(reason: WebSocketCloseReasonCode?=nil, description: String?=nil)
In both close() and drop(), the WebSocketCloseReasonCode
enum provides the standard WebSocket Close Reason codes, with the ability
to specify application specific ones.
- A unique identifier that can be used to help manage the collection of
WebSocketConnection
objects connected to aWebSocketService
.swift id: String
WebSocketService
The functions of the WebSocketService protocol enable Kitura-WebSocket to notify a WebSocket service of a set of events that
occur. These events include:
- A client has connected to the WebSocketService
swift
func connected(connection: WebSocketConnection)
A client has disconnected from the WebSocketService
swift disconnected(connection: WebSocketConnection, reason: WebSocketCloseReasonCode)
The reason parameter contains the reason code associated with the client disconnecting. It may come from either a close command sent by the client or determined by Kitura-WebSocket if the connection’s socket suddenly was closed.A binary message was received from a client
swift func received(message: Data, from: WebSocketConnection)
The message parameter contains the bytes of the message in the form of a Data struct.A text message was received from a client
swift func received(message: String, from: WebSocketConnection)
The message parameter contains the message in the form of a String.
WebSocket
Classes which implement the WebSocketService
protocol are registered with the server using the function:
swift
WebSocket.register(service: WebSocketService, onPath: String)
This function is passed the WebSocketService
being registered along with the path it is being registered on.
A registered WebSocketService
can be unregistered from the server by using the function:
swift
WebSocket.unregister(path: String)
This function is passed the path on which the WebSocketService
being unregistered, was registered on.
An example
A simple example to better describe the APIs of Kitura-WebSocket. This example, a very simplistic chat service. The server side is written in Swift using Kitura-WebSocket and the client side is written in JavaScript using Node.js and the websocket NPM package.
Pre-requisites
In order to run the client one must have Node.js installed.
The server
The server keeps track of the clients that have connected to it and echoes all text messages sent to it to all of the clients that have connected to it, with the exception of the client that sent the message.
The server’s directory setup is something like this:
ServerDirectory ├── Package.swift └── Sources └── ChatServer ├── ChatService.swift └── main.swift
The Package.swift file contains: “`swift import PackageDescription
let package = Package(
name: ChatServer
,
dependencies: [
.Package(url: https://github.com/KituraKommunity/HeliumLogger.git
, majorVersion: 1, minor: 7),
.Package(url: https://github.com/KituraKommunity/Kitura-WebSocket
, majorVersion: 0, minor: 9)
]
)
”`
The HeliumLogger package, while strictly not required, was added to enable logging.
The ChatService.swift file contains: “`swift // ChatServer is a very simple chat server
import Foundation
import KituraWebSocket
class ChatService: WebSocketService {
private var connections = [String: WebSocketConnection]()
public func connected(connection: WebSocketConnection) {
connections[connection.id] = connection
}
public func disconnected(connection: WebSocketConnection, reason: WebSocketCloseReasonCode) {
connections.removeValue(forKey: connection.id)
}
public func received(message: Data, from: WebSocketConnection) {
from.close(reason: .invalidDataType, description: "Chat-Server only accepts text messages")
connections.removeValue(forKey: from.id)
}
public func received(message: String, from: WebSocketConnection) {
for (connectionId, connection) in connections {
if connectionId != from.id {
connection.send(message: message)
}
}
}
}
”
The class has a Dictionary, connections, which is used to keep track of the connections of all of the connected clients. The Dictionary is
maintained by the
connectedand
disconnected` functions, which are, respectively, adding and removing connections from the dictionary.
The received
function, which receives binary messages, is rejecting the message, closing the client connection and removing the connection
from the set of known connections.
Lastly, the received
function, which receives text messages, simply echoes the message received to all clients except the one who sent the message.
It should be noted that all of these functions can be invoked from many threads simultaneously. In real applications, one should add locking around the access of non-thread safe artifacts of the application such as the connections Dictionary in this very simplistic example.
The main.swift file contains: “`swift // ChatServer is a very simple chat server
import Foundation
import KituraNet import KituraWebSocket
import HeliumLogger import LoggerAPI
// Using an implementation for a Logger HeliumLogger.use(.info)
WebSocket.register(service: ChatService(), onPath: chat
)
class ChatServerDelegate: ServerDelegate { public func handle(request: ServerRequest, response: ServerResponse) {} }
// Add HTTP Server to listen on port 8080 let server = HTTP.createServer() server.delegate = ChatServerDelegate()
do {
try server.listen(on: 8080)
ListenerGroup.waitForListeners()
} catch {
Log.error(Error listening on port 8080: \(error).
)
}
”`
In the main.swift file:
- The HeliumLogger is set up to log info, warning, and error type messages.
- The ChatService defined in the ChatService.swift file is registered on the path chat.
- An HTTP server is created and setup to listen on port 8080.
With this server set up clients should connect to the chat service as ws://host:8080/chat, where host is the host running the server.
The client
The client has a simple command line interface. At startup one passes the host and port number. The client simply reads messages to be sent from the terminal and displays messages received on the terminal as well.
The server’s directory setup is something like this:
ClientDirectory ├── package.json └── chat.js
The package.json at a minimum contains:
{
"name": "chat",
"description": "Simple chat server client",
"version": "0.0.1",
"engines": {
"node": ">=0.8.0"
},
"dependencies": {
"websocket": "^1.0.23"
}
}
The chat.js file contains:
/* main file of Simple Chat Server Client */
var readline = require('readline');
var WebSocketClient = require('websocket').client
var host = process.argv[2];
rl = readline.createInterface(process.stdin, process.stdout);
rl.setPrompt('> ');
rl.prompt();
var client = new WebSocketClient();
client.on('connectFailed', function(error) {
console.log('Connect Error: ' + error.toString());
process.exit();
});
client.on('connect', function(connection) {
connection.on('error', function(error) {
console.log("Connection Error: " + error.toString());
process.exit();
});
connection.on('close', function(reasonCode, description) {
console.log('chat Connection Closed. Code=' + reasonCode + ' (' + description +')');
});
connection.on('message', function(message) {
if (message.type === 'utf8') {
console.log('\r=> ' + message.utf8Data);
rl.prompt();
}
});
rl.on('line', function(line) {
connection.sendUTF(line);
rl.prompt();
});
rl.on('close', function() {
connection.close();
console.log('Have a great day!');
process.exit(0);
});
rl.prompt();
});
client.connect("ws://" + host +"/chat", "chat");
Building and running the example
To build and run the server, in the server directory, simply:
swift build
.build/debug/ChatServer
The server is now up and running.
Setting up and running the client
To setup the client, in the client directory, simply:
npm installed
That will install the websocket package.
To run the client, again in the client directory, run:
node chat.js host:8080
Where host is the hostname of the host on which the server is running.
The client can be run in several terminal windows on the same computer.
A more complete example
For a more complete example please see Kitura-Chat-Server
Community
We love to talk server-side Swift, and Kitura. Join our Slack to meet the team!
License
This library is licensed under Apache 2.0. Full license text is available in LICENSE.


Well, so i am just one year old but yeah i run the house
When i first showed up
trip to the pool
Are you don looking, click here to go back


A credential is held by an organization, for example a permit or a business licence.
An issuer issues credentials to organizations listed in the OrgBook BC. For example, BC Registries issues credentials for companies incorporated in British Columbia.
{{topic.typeLabel | translate}}: {{topic.preferredName?.text}}
{{'topic.source-id' | translate}}: {{topic.source_id}}
{{verifyResult.text}}
{{verifyResult.text}}


About this tool
© Dr JP Lomas & Dr Rhodri Harris, 2019-2021
https://lomas.doctor
Full source code on Github
Contributors:
Dr JP Lomas
Dr Rhodri Harris
Dr Tony Thomas
Supported by:
Funded by:
For use when trained and with consultant permission
MIT licensePermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


A family of voltage-gated potassium channels that are characterized by long N-terminal and C-terminal intracellular tails. They are named from the Drosophila protein whose mutation causes abnormal leg shaking under ether anesthesia. Their activation kinetics are dependent on extracellular MAGNESIUM and PROTON concentration. (mesh:D051638)
| Identifier | Name | Relation |
| HGNC:6250 | KCNH1 | isa |
| HGNC:18864 | KCNH8 | isa |
| HGNC:6252 | KCNH3 | isa |
| HGNC:6254 | KCNH5 | isa |
| HGNC:18863 | KCNH7 | isa |
| HGNC:6253 | KCNH4 | isa |
| HGNC:18862 | KCNH6 | isa |
| HGNC:6251 | KCNH2 | isa |
| Relation | Identifier | Name |
| isa | FPLX:Potassium_voltage_gated_channels | Potassium_voltage_gated_channels |