Jelle Raaijmakers
03c1f1780d
LibGL: Stub glPointSize
2022-01-11 23:47:42 +01:00
Jelle Raaijmakers
6363797e80
LibGL: Implement glLightModeli
2022-01-11 23:47:42 +01:00
Jelle Raaijmakers
e2f79c8b5f
LibGL: Implement glTexEnvi
2022-01-11 23:47:42 +01:00
Jelle Raaijmakers
eea1b95ead
LibGL: Implement glRotated
2022-01-11 23:47:42 +01:00
Jelle Raaijmakers
a29534b531
LibGL: Implement glColor3d
and glColor3ubv
2022-01-11 23:47:42 +01:00
Jelle Raaijmakers
57b1dcbec9
LibGL: Add stub for glColorMaterial
2022-01-09 23:23:01 +01:00
Jelle Raaijmakers
ccf6769d95
LibGL: Stub more API calls
...
These stubs are largely implemented the same: their API is exposed, but
they print to the debug console and sometimes `TODO()`. These changes
allow GLU and Tux Racer to build.
Methods stubbed:
* `glTexImage1D`
* `glTexImage3D`
* `glTexCoord2d(v)`
* `glNormalPointer`
* `glTexGen(d|f|i)`
* `glTexGenfv`
2021-12-27 11:58:43 +01:00
Jelle Raaijmakers
abecff1766
LibGL: Stub lots of map-related methods
...
This adds stubs for `glMap(1|2)(d|f)`, `glMapGrid(1|2)(d|f)`,
`glEvalCoord(1|2)(d|f)`, `glEvalMesh(1|2)` and `glEvalPoint(1|2)`.
2021-12-27 11:58:43 +01:00
Jelle Raaijmakers
dae63352a3
LibGL: Implement glGetTexLevelParameteriv
2021-12-27 11:58:43 +01:00
Jelle Raaijmakers
d83702cb92
LibGL: Implement glRectf
and glRecti
2021-12-27 11:58:43 +01:00
Jelle Raaijmakers
4a36d6b439
LibGL: Implement glMultMatrixd
2021-12-27 11:58:43 +01:00
Jelle Raaijmakers
9e9e1c7634
LibGL: Implement glColor3/4dv
2021-12-27 11:58:43 +01:00
Jelle Raaijmakers
70c6907546
LibGL: Add glext.h and lots of new defines in gl.h
...
These constants are used by GLU and Tux Racer.
2021-12-27 11:58:43 +01:00
Jelle Raaijmakers
2ce73b31b6
LibGL: Extract platform types to glplatform.h
2021-12-27 11:58:43 +01:00
Jelle Raaijmakers
7fa2e792a8
LibGL: Simplify glDrawPixels
checks and reduce debug spam
2021-12-21 12:58:58 -08:00
Jelle Raaijmakers
604eea5827
LibGL: Allow querying maximum matrix stack depths
2021-12-21 12:58:58 -08:00
Jelle Raaijmakers
18399d00fa
LibGL: Implement matrix mode GL_TEXTURE
...
Implement support for the `GL_TEXTURE` matrix mode, the texture matrix
stack and texture coordinate matrix transformation.
Also, an unused `m_current_matrix` was removed to make room for
`m_texture_matrix`.
2021-12-21 12:58:58 -08:00
Jelle Raaijmakers
a06b69c5b5
LibGL: Implement the GL_DITHER
parameter
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
b89524c981
LibGL: Implement the GL_LIGHTING
parameter
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
b1ac181537
LibGL: Centralize all context parameters
...
The `glGet*` family of functions requires that all parameters of
different types are transparently converted into each other. For
example, you can request a boolean parameter as a float or a list of
double values as an integer. It might be considered bad practice to
request parameters through the wrongly-typed function, but to be spec-
compliant we need to implement this.
Introduce a new `::get_context_parameter()` to obtain a parameter
value, which is then converted to the right type by the respective
`::gl_get_*()` functions.
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
2af9b625e8
LibGL: Implement GL_*_BITS
and GL_DOUBLEBUFFER
parameters
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
033f224966
LibGL: Add GL_SHADING_LANGUAGE_VERSION
to glGetString
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
6643775999
LibGL: Add stub for glCopyTexImage2D
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
401472c9a4
LibGL: Implement glDrawPixels
and add stub for glBitmap
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
c2960e68a8
LibGL: Implement glLightModelf
and glLightModelfv
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
0453cad46c
LibGL: Add stubs for glPushAttrib
and glPopAttrib
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
fbed7a5ba8
LibGL: Implement glLineWidth
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
22f8294a57
LibGL: Implement glLoadMatrixd
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
506abf2a61
LibGL: Implement glIsList
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
17c109f5d7
LibGL: Implement glTranslated
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
9c9fa33495
LibGL: Implement glClearStencil
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
07bf37be75
LibGL: Implement glScaled
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
9dbc8d7e3c
LibGL: Add stubs for glMaterialf
and glMaterialfv
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
4eb6295a57
LibGL: Implement glRasterPos2i
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
78d0674228
LibGL: Implement glNormal3f
and glNormal3fv
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
ea6bcda79c
LibGL: Implement glStencil*
functions
...
This implements the context state for stencil testing functions and
operations. No rasterization is implemented.
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
729349ce78
LibGL: Implement GL_STENCIL_TEST
...
Only the state is implemented; not the rasterization phase.
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
11fea6b597
LibGL: Implement glListBase
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
1056bac49a
LibGL: Implement glCallLists
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
651ea89094
LibGL: Implement glTexCoord2fv
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
315973e73c
LibGL: Implement glColor3ub
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
d38c4ac8b5
LibGL: Add stubs for glLightf
and glLightfv
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
7ac8cd057e
LibGL: Implement glMultMatrixf
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
40724a426f
LibGL: Implement glGetDoublev
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
6d4a5a40a0
LibGL: Define GL_ES_VERSION_2_0
...
GLES 2.0 is a subset of OpenGL, so we allow applications to compile
against LibGL as if it fully supports GLES 2.0.
Additionally, we set the definitions to an integer value of `1` so
applications that check for availability like this...
int main() { return GL_ES_VERSION_2_0; }
...can actually compile. At least ScummVM uses this, and Mesa defines
their constants in the same way:
44b9e11ddb/include/GL/gl.h (L105)
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers
d885cc102b
LibGL: Fix a number of enum values in gl.h
...
Their values should match the enum values as defined by the Khronos
Group.
2021-12-11 23:15:24 +01:00
Jelle Raaijmakers
5e370e6f96
LibGL: Implement GL_(UN)PACK_ALIGNMENT
...
These enums are used to indicate byte-alignment when reading from and
to textures. The `GL_UNPACK_ROW_LENGTH` value was reimplemented to
support overriding the source data row width.
2021-12-11 23:15:24 +01:00
Jelle Raaijmakers
5788a139d8
LibGL: Implement texture unit texturing states
2021-12-01 10:21:13 +01:00
Jelle Raaijmakers
bb58f6ccab
LibGL: Implement glScissor()
2021-11-28 09:20:58 -08:00
Jelle Raaijmakers
a36ee213b9
LibGL: Implement glIsEnabled()
2021-10-17 21:01:52 -07:00