Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
This is the vectorized version of `gl_tex_parameter`, which sets the
parameters of a texture's sampler. We currently only support one single
pname, `GL_TEXTURE_BORDER_COLOR`, which sets the border color of a texel
for if it is sampled outside of a mip-map's range.
|
|
|
|
This loads libsoftgpu.so during GLContext creation and instantiates the
device class which is then passed into the GLContext constructor.
|
|
This adds a virtual base class for GPU devices located in LibGPU.
The OpenGL context now only talks to this device agnostic interface.
Currently the device interface is simply a copy of the existing SoftGPU
interface to get things going :^)
|
|
|
|
|
|
|
|
This introduces a new abstraction layer, LibGPU, that serves as the
usermode interface to GPU devices. To get started we just move the
DeviceConfig there and make sure everything still works :^)
|
|
|
|
We were normalizing data read from vertex attribute pointers based on
their usage, but there is nothing written about this behavior in the
spec or in man pages.
When we implement `glVertexAttribPointer` however, the user can
optionally enable normalization per vertex attribute pointer. This
refactors the `VertexAttribPointer` to have a `normalize` field so we
can support that future implementation.
|
|
This simplifies a lot of code in `GLContext` and prevents potential
errors when testing against the current matrix mode.
|
|
Vectors of length 0 cannot be normalized, so prevent dividing by zero
in the `glRotate*` API. This fixes the skybox rendering of Quake2.
|
|
This merges GLContext and SoftwareGLContext into a single GLContext
class. Since the hardware abstraction is handled via the GPU device
interface we do not need the virtual base of GLContext anymore. All
context handling functionality from the old GLContext has been moved
into the new version. All methods in GLContext are now non virtual and
the class is marked as final.
|
|
|
|
|
|
|
|
|
|
|
|
This makes glquake recognize multitexture support and choose the
multitexture rendering path.
|
|
This implements an 8-bit front stencil buffer. Stencil operations are
SIMD optimized. LibGL changes include:
* New `glStencilMask` and `glStencilMaskSeparate` functions
* New context parameter `GL_STENCIL_CLEAR_VALUE`
|
|
Also, make `::create_context` return a `NonnullOwnPtr`.
|
|
When `GL_COLOR_MATERIAL` is enabled, specific material parameters can
be overwritten by the current color per-vertex during the lighting
calculations. Which parameter is controlled by `glColorMaterial`.
Also move the lighting calculations _before_ clipping, because the spec
says so. As a result, we interpolate the resulting vertex color instead
of the input color.
|
|
Required by Xash3D for the r_showtextures command, where it shows every
allocated texture on screen.
Description of glIsTexture from the spec:
"glIsTexture returns GL_TRUE if texture is currently the name of a
texture. If texture is zero, or is a non-zero value that is not
currently the name of a texture, or if an error occurs, glIsTexture
returns GL_FALSE.
A name returned by glGenTextures, but not yet associated with a texture
by calling glBindTexture, is not the name of a texture."
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glIsTexture.xhtml
|
|
According to the OpenGL spec, invoking functions without an active
context results in undefined behavior. Since ScummVM seems to be the
only port having issues with our behavior, patch their code instead.
|
|
These two functions have been turned from stubs into actually doing
something. They now set the correspondingmaterial data member based on
the value passed into the `pname`argument.
Co-authored-by: Stephan Unverwerth <s.unverwerth@serenityos.org>
|
|
This implements the `glLightf{v}` family of functions used to set
lighting parameters per light in the GL. It also fixes an incorrect
prototype for the user exposed version of `glLightf{v}` in which
`params` was not marked as `const`.
|
|
The singular form of `glTexGeni/f/d` only supports constants, not
floating point values as its parameter.
|
|
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`
|
|
|
|
|
|
These constants are used by GLU and Tux Racer.
|
|
In its current state, ScummVM seems to invoke these methods just after
destroying the current GL context. According to the OpenGL spec:
"Issuing GL commands when the program does not have a current
context results in undefined behavior, up to and including program
termination."
Our old behavior was to deref a `nullptr`, which isn't that great. For
now, protect these two methods. If other ports seem to misbehave as
well, we can always expand the check to other methods.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This implements the context state for stencil testing functions and
operations. No rasterization is implemented.
|
|
|
|
|
|
|
|
|