OpenGL SC

66
© Copyright Khronos Group, 2012 - Page 1 OpenGL SC: differences to OpenGL ES Nakhoon Baek CTO, Mobile Graphics Inc., Korea Professor, Kyungpook National University, Korea

description

Following our successful participation at SIGGRAPH Asia 2012 in Singapore, the Khronos Group is excited to demonstrate and educate about Khronos APIs at SIGGRAPH Asia 2013 in Hong Kong. This presentation covers the OpenGL SC (Critical Profile), by Nakhoon Baek

Transcript of OpenGL SC

Page 1: OpenGL SC

© Copyright Khronos Group, 2012 - Page 1

OpenGL SC: differences to OpenGL ES

Nakhoon Baek CTO, Mobile Graphics Inc., Korea

Professor, Kyungpook National University, Korea

Page 2: OpenGL SC

© Copyright Khronos Group, 2012 - Page 2

OpenGL SC

Page 3: OpenGL SC

© Copyright Khronos Group, 2012 - Page 3

Safety Critical – OpenGL SC 1.0 • targeted at safety-certified avionics and automotive displays

- minimum driver size and complexity

- DO-178B certification

•working group:

- Seaweed (now, Presagis)

- Barco

- ALT Software

- Diehl Aerospace

- Esmertec (now, Myriad Group)

- 3DLabs (now, ZiiLABS)

- Quantum3D

http://mobilegraphics.co.kr/ 3

Page 4: OpenGL SC

© Copyright Khronos Group, 2012 - Page 4

Military & Avionics: the major market

Page 5: OpenGL SC

© Copyright Khronos Group, 2012 - Page 5

OpenGL SC 1.0 • originally, OpenGL ES Security Critical Profile

- started as a variation of OpenGL ES

• spin out as OpenGL SC 1.0

http://mobilegraphics.co.kr/ 5

Page 6: OpenGL SC

© Copyright Khronos Group, 2012 - Page 6

OpenGL SC features

• based on OpenGL 1.3

• extinguished features (w.r.t. OpenGL ES)

- glBegin / glEnd paradigm

- display support : a kind of script

• recently,

- OpenGL SC 1.0 conformance test suites

- discussions on the next version (F2F meeting in this Oct.) - OpenGL SC 1.1 ?

- OpenGL SC 2.0 ?

http://mobilegraphics.co.kr/ 6

Page 7: OpenGL SC

© Copyright Khronos Group, 2012 - Page 7

Relationships

• OpenGL 1.3 OpenGL ES 1.0

OpenGL SC 1.0

• OpenGL 1.5 OpenGL ES 1.1

• OpenGL 2.0 + extra features

OpenGL ES 2.0

• OpenGL 3.x OpenGL ES 3.0 (Halti) Expected

http://mobilegraphics.co.kr/ 7

Page 8: OpenGL SC

© Copyright Khronos Group, 2012 - Page 8

Certifications for Airborne Systems

8 mobile graphics lab@KNU

Page 9: OpenGL SC

© Copyright Khronos Group, 2012 - Page 9

DO-178B • DO-178B, Software Considerations in Airborne Systems and Equipment

Certification

- from RTCA, Inc. (Radio Technical Commission for Aeronautics)

- FAA (Federal Aviation Administration) 인증

- goal: guidance to determine if the software will perform safely and

reliably, in an airborne environment

• also known as ED-12B

- from EUROCAE (European Organization for Civil Aviation Equipment)

mobile graphics lab@KNU 9

Page 10: OpenGL SC

© Copyright Khronos Group, 2012 - Page 10

DO-178B : software levels • Catastrophic - Failure may cause a crash.

• Hazardous - Failure has a large negative impact on safety or performance

•Major - Failure is significant, but has a lesser impact than a Hazardous

failure

•Minor - Failure is noticeable, but has a lesser impact than a Major failure

• No Effect - Failure has no impact on safety, aircraft operation, or crew

workload.

mobile graphics lab@KNU 10

Page 11: OpenGL SC

© Copyright Khronos Group, 2012 - Page 11

DO-178B : process • from Software Engineering point of view,

• lots of documents !

• at Planning Stage,

- Plan for software aspects of certification (PSAC)

- Software development plan (SDP)

- Software verification plan (SVP)

- Software configuration management plan (SCMP)

- Software quality assurance plan (SQAP)

- System requirements

- Software requirements standards

- Software design standards (SDS)

- Software code standards (SCS)

mobile graphics lab@KNU 11

Page 12: OpenGL SC

© Copyright Khronos Group, 2012 - Page 12

DO-178B : process • Development stage,

- Software requirements data (SRD)

- Software design description (SDD)

- Source code

- Executable object code

• Verification stage,

- Software verification cases and procedures (SVCP)

- Software verification results (SVR):

- Review of all requirements, design and code

- Testing of executable object code

- Code coverage analysis

mobile graphics lab@KNU 12

Page 13: OpenGL SC

© Copyright Khronos Group, 2012 - Page 13

DO-178B : process • Configuration management

- Software configuration index (SCI)

- Software life cycle environment configuration index (SECI)

• Quality Assurance

- Software quality assurance records (SQAR)

- Software conformity review (SCR)

- Software accomplishment summary (SAS)

mobile graphics lab@KNU 13

Page 14: OpenGL SC

© Copyright Khronos Group, 2012 - Page 14

SC components

Page 15: OpenGL SC

© Copyright Khronos Group, 2012 - Page 15

OpenGL SC core features

• OpenGL SC core functions: totally 101 functions

- 32 functions are completely new features w.r.t. OpenGL ES

- glBegin / glEnd paradigm

- glVertex functions

- display list support : a kind of script

http://mobilegraphics.co.kr/ 15

Page 16: OpenGL SC

© Copyright Khronos Group, 2012 - Page 16

Core Addition

• OES_single_precision extension

- DepthRangef(clampf n, clampf f)

- Frustumf(float l, float r, float b, float t, float n, float f)

- Orthof(float l, float r, float b, float t, float n, float f)

- ClearDepthf(clampf depth)

- allowing float-type parameters, rather than double-type

http://mobilegraphics.co.kr/ 16

Page 17: OpenGL SC

© Copyright Khronos Group, 2012 - Page 17

Required Extension

• EXT_paletted_texture

- color-indexed texture + color table (or, palette)

- need COLOR_INDEX8_EXT extension support for texturing functions

- need some extensions into the TexImage2D function

- ColorTableEXT

- ColorSubTableEXT

- GetColorTableEXT

- GetColorTableParameterivEXT

http://mobilegraphics.co.kr/ 17

Page 18: OpenGL SC

© Copyright Khronos Group, 2012 - Page 18

Optional Extension

• EXT_shared_texture_palette

- several textures can share a single texture palette

- need some extensions to Enable, Disable, IsEnabled, GetBooleanv, GetFloatv,

GetIntegerv functions

- ColorTableEXT

- ColorSubTableEXT

- GetColorTableEXT

- GetColorTableParameterivEXT

http://mobilegraphics.co.kr/ 18

Page 19: OpenGL SC

© Copyright Khronos Group, 2012 - Page 19

Technical Issues • new implementations are needed for:

- required extension: EXT_paletted_texture

- optional extension: EXT_shared_texture_palette

• since year 2004, there is no graphics card supporting the above extensions

- old NVIDIA chips such as GeForce 5 series can support it.

- no ATI chips support it.

• Conclusively, new implementations are required

http://mobilegraphics.co.kr/ 19

Page 20: OpenGL SC

© Copyright Khronos Group, 2012 - Page 20

API Features

Page 21: OpenGL SC

© Copyright Khronos Group, 2012 - Page 21

2.5 GL Errors

mobile graphics lab@KNU 21

Page 22: OpenGL SC

© Copyright Khronos Group, 2012 - Page 22

Geometric Primitives • All geometric primitives are specified by vertices

http://mobilegraphics.co.kr/ 22

GL_TRIANGLE_STRIP

GL_TRIANGLE_FAN

GL_POINTS GL_LINES

GL_LINE_LOOP GL_LINE_STRIP

GL_TRIANGLES

GL_QUADS GL_QUAD_STRIP

GL_POLYGON

Page 23: OpenGL SC

© Copyright Khronos Group, 2012 - Page 23

2.6 Begin/End Paradigm • drawing primitives:

- points

- line segment, line strip, line loop

- triangle, triangle strip, triangle fan

mobile graphics lab@KNU 23

Page 24: OpenGL SC

© Copyright Khronos Group, 2012 - Page 24

2.6 Begin/End Paradigm • state machine approach

• not supported in OpenGL ES

• glBegin( GL_TRIANGLES );

- glColor4f( 1.0F, 0.5F, 0.5F, 1.0F );

- glVertex2f( 0.0F, 0.0F );

- glVertex2f( 1.0F, 0.0F );

- glVertex2f( 0.0F, 1.0F );

• glEnd( );

mobile graphics lab@KNU 24

Page 25: OpenGL SC

© Copyright Khronos Group, 2012 - Page 25

2.7 Vertex Specification • float version only

mobile graphics lab@KNU 25

Page 26: OpenGL SC

© Copyright Khronos Group, 2012 - Page 26

2.8 Vertex Arrays • float version only

• no stride : always tightly packed arrays

mobile graphics lab@KNU 26

Page 27: OpenGL SC

© Copyright Khronos Group, 2012 - Page 27

2.8 Vertex Arrays • DrawArrays, DrawElements : similar to OpenGL ES

mobile graphics lab@KNU 27

Page 28: OpenGL SC

© Copyright Khronos Group, 2012 - Page 28

2.10 Coordinate Transformations • corresponds to OpenGL ES 1.1 features

mobile graphics lab@KNU 28

Page 29: OpenGL SC

© Copyright Khronos Group, 2012 - Page 29

2.10 Coordinate Transformations • no texture matrix

mobile graphics lab@KNU 29

Page 30: OpenGL SC

© Copyright Khronos Group, 2012 - Page 30

2.13 Colors and Coloring • single material properties for front and back faces

mobile graphics lab@KNU 30

Page 31: OpenGL SC

© Copyright Khronos Group, 2012 - Page 31

2.13 Colors and Coloring • only 2 lights

• no spot light

mobile graphics lab@KNU 31

Page 32: OpenGL SC

© Copyright Khronos Group, 2012 - Page 32

2.13 Colors and Coloring • no two side lighting

• color material support

mobile graphics lab@KNU 32

Page 33: OpenGL SC

© Copyright Khronos Group, 2012 - Page 33

3.2 Antialiasing • no multisampling support

mobile graphics lab@KNU 33

Page 34: OpenGL SC

© Copyright Khronos Group, 2012 - Page 34

3.3 Points •minimum requirement: only for point size = 1

mobile graphics lab@KNU 34

Page 35: OpenGL SC

© Copyright Khronos Group, 2012 - Page 35

3.4 Line Segments • line stipples are supported

mobile graphics lab@KNU 35

Page 36: OpenGL SC

© Copyright Khronos Group, 2012 - Page 36

3.5 Polygons • polygon stipples are also support

mobile graphics lab@KNU 36

Page 37: OpenGL SC

© Copyright Khronos Group, 2012 - Page 37

3.8 Texturing • supported image types: unsigned byte only

mobile graphics lab@KNU 37

Page 38: OpenGL SC

© Copyright Khronos Group, 2012 - Page 38

3.8 Texturing • texture image formats and types

mobile graphics lab@KNU 38

Page 39: OpenGL SC

© Copyright Khronos Group, 2012 - Page 39

3.8 Texturing • 2D texture only

mobile graphics lab@KNU 39

Page 40: OpenGL SC

© Copyright Khronos Group, 2012 - Page 40

3.8 Texturing • 2D texture only

mobile graphics lab@KNU 40

Page 41: OpenGL SC

© Copyright Khronos Group, 2012 - Page 41

3.8 Texturing • no texture release !

- no garbage collection

- i.e., only memory allocations

mobile graphics lab@KNU 41

Page 42: OpenGL SC

© Copyright Khronos Group, 2012 - Page 42

3.8 Texturing • texture environment support

- limited environment modes: MODULATE, REPLACE, DECAL, BLEND, ADD

mobile graphics lab@KNU 42

Page 43: OpenGL SC

© Copyright Khronos Group, 2012 - Page 43

3.9 Fog

• no fog support

mobile graphics lab@KNU 43

Page 44: OpenGL SC

© Copyright Khronos Group, 2012 - Page 44

Getting to the Framebuffer

http://mobilegraphics.co.kr/ 44

Blending Depth

Test Dithering Logical

Operations

Scissor

Test

Stencil

Test

Alpha

Test

Fra

gm

ent

Fra

meb

uff

er

Page 45: OpenGL SC

© Copyright Khronos Group, 2012 - Page 45

Scissor Box, Alpha Test • Additional Clipping Test

glScissor( x, y, w, h )

- any fragments outside of box are clipped

- useful for updating a small section of a viewport

• Reject pixels based on their alpha value glAlphaFunc( func, value )

glEnable( GL_ALPHA_TEST )

- use alpha as a mask in textures

http://mobilegraphics.co.kr/ 45

Page 46: OpenGL SC

© Copyright Khronos Group, 2012 - Page 46

Stencil Buffer glStencilFunc( func, ref, mask )

glStencilOp( fail, zfail, zpass )

• controlled drawing based on values in the stencil buffer

- Example: create a mask in stencil buffer

and draw only objects not in mask area

http://mobilegraphics.co.kr/ 46

stencil area

for the mirror

Page 47: OpenGL SC

© Copyright Khronos Group, 2012 - Page 47

Blending • Combine pixels with what’s in already

in the framebuffer glBlendFunc( src, dst )

http://mobilegraphics.co.kr/ 47

Framebuffer

Pixel (dst)

Blending

Equation Fragment

(src)

Blended

Pixel

pfr CdstCsrcC

Page 48: OpenGL SC

© Copyright Khronos Group, 2012 - Page 48

4.1 Per-Fragment Operations • restricted alpha functions: LEQUAL, ALWAYS only

mobile graphics lab@KNU 48

Page 49: OpenGL SC

© Copyright Khronos Group, 2012 - Page 49

4.1 Per-Fragment Operations • restricted depth function support: LESS, LEQUAL, ALWAYS only

mobile graphics lab@KNU 49

Page 50: OpenGL SC

© Copyright Khronos Group, 2012 - Page 50

4.1 Per-Fragment Operations • Blend Factor Combinations

• no other modes are supported

mobile graphics lab@KNU 50

Page 51: OpenGL SC

© Copyright Khronos Group, 2012 - Page 51

4.1 Per-Fragment Operations • restricted blend function support

mobile graphics lab@KNU 51

Page 52: OpenGL SC

© Copyright Khronos Group, 2012 - Page 52

4.2 Whole Frame-buffer Operations • same to OpenGL ES

mobile graphics lab@KNU 52

Page 53: OpenGL SC

© Copyright Khronos Group, 2012 - Page 53

2.12 Current Raster Position • specify the location for glBitmap, glDrawPixels, glCopyPixels

mobile graphics lab@KNU 53

Page 54: OpenGL SC

© Copyright Khronos Group, 2012 - Page 54

3.6 Pixel Rectangles / 3.7 Bitmaps • DrawPixels : RGBA image only

• Bitmap : B/W image, drawn with current raster color

- current raster color = current color when the last glRasterPos( ) called.

mobile graphics lab@KNU 54

Page 55: OpenGL SC

© Copyright Khronos Group, 2012 - Page 55

4.3 Pixels • ReadPixels : RGBA, unsigned byte only

• CopyPixels : specified region current raster position

mobile graphics lab@KNU 55

Page 56: OpenGL SC

© Copyright Khronos Group, 2012 - Page 56

5.4 Display Lists

• no release of allocated lists

mobile graphics lab@KNU 56

Page 57: OpenGL SC

© Copyright Khronos Group, 2012 - Page 57

5.5 Flush and Finish

mobile graphics lab@KNU 57

Page 58: OpenGL SC

© Copyright Khronos Group, 2012 - Page 58

5.6 Hints • only hints, maybe not working

mobile graphics lab@KNU 58

Page 59: OpenGL SC

© Copyright Khronos Group, 2012 - Page 59

6.1 Querying • no double type support

mobile graphics lab@KNU 59

Page 60: OpenGL SC

© Copyright Khronos Group, 2012 - Page 60

Core Extension: OES_single_precision

mobile graphics lab@KNU 60

Page 61: OpenGL SC

© Copyright Khronos Group, 2012 - Page 61

Required: EXT_paletted_texture • paletted texture

mobile graphics lab@KNU 61

Page 62: OpenGL SC

© Copyright Khronos Group, 2012 - Page 62

Required: EXT_paletted_texture • COLOR_INDEX8 are supported

mobile graphics lab@KNU 62

Page 63: OpenGL SC

© Copyright Khronos Group, 2012 - Page 63

Required: EXT_paletted_texture • add new functions

mobile graphics lab@KNU 63

Page 64: OpenGL SC

© Copyright Khronos Group, 2012 - Page 64

Optional: EXT_shared_texture_palette • affected functions:

mobile graphics lab@KNU 64

Page 65: OpenGL SC

© Copyright Khronos Group, 2012 - Page 65

Closing Remarks

65 mobile graphics lab@KNU

Page 66: OpenGL SC

© Copyright Khronos Group, 2012 - Page 66

Summary

• OpenGL SC : safety critical profile

- based on OpenGL 1.3

- similar to OpenGL ES 1.1

- but, some distinguished features - begin-end paradigm

- display lists

- texture palettes

• future works

- a new version is expected

- conformance test passed implementations are expected to be used widely