Age | Commit message (Collapse) | Author |
|
We already support this in all other logic and in LibSoftGPU, I just
forgot to add this constant to this list.
|
|
Also drop the try_ prefix from the fallible function, as it is no longer
needed to distinguish the two.
|
|
|
|
|
|
Either take the underlying objects with release_* methods or move() the
instances around.
|
|
We only use it for the extension string, which we now convert into a
`ByteBuffer` object containing the null-terminated bytes :^)
|
|
For now, this is limited to strings that are 3 bytes or less. We can use
7 bytes on 64-bit platforms, but we do not yet assume 64-bit for Lagom
hosts (e.g. wasm).
|
|
These context parameters are used to retrieve the active blend
functions.
|
|
|
|
The Khronos description of a "non-negative binary integer" does not mean
an unsigned type, just that it should not be negative.
|
|
|
|
If the `GLContext`'s internal state uses a `float`, it makes no sense
casting to and from `double`s.
|
|
This sets a constant color in the texture's environment for the fixed
function pipeline.
|
|
The OpenGL API has ways to retrieve these values, so let's make sure to
implement them. :^)
|
|
We now generate all LibGL API wrappers from a single API method
definition list stored in `GLAPI.json`. Since a significant portion of
the OpenGL API methods are relatively consistent variants, we take
advantage of this to generate a lot of these variants at once.
The autogenerated methods check for the non-nullness of the current
`GLContext`, and only perform an action if a `GLContext` is present.
This prevents a crash in ports like GLTron, who assume you can still
call the OpenGL API without an active context.
This increases our API wrapper method count from 211 to 356.
Fixes #15814.
|
|
For the ambient light model, integers need to be remapped to a range of
`-1.` through `1.`. Add the `+` and `-` operators to `VectorN` to make
it a bit easier to normalize 4 values at once.
|
|
We now dereference the pointer given to us before adding the arguments
to an active list. This also factors out the switching logic from the
API wrappers, which helps us with a future commit where we autogenerate
all API wrapper functions.
|
|
We were comparing the `x` parameter to `1.f` instead of `0.f`.
|
|
|
|
We do not need to templatize the output type - it's always `float`.
Also, the input type can be inferred. Finally, use template
specialization instead of a conditional to deal with same type input and
output matrices.
|
|
|
|
This adds a shader class to LibSoftGPU and makes use of it when linking
GLSL program in LibGL. Also adds actual rendering code to the shader
tests.
|
|
|
|
This adds a new library, LibGLSL for parsing and compiling GLSL programs
to LibGPU IR. Currently the compiler consists only of stubs.
|
|
|
|
|
|
|
|
This will help with testing until the actual compilation infrastructure
is in place.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The NameAllocator class is not only about Textures, so let's change a
comment being related to it.
|
|
|
|
|
|
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
|
|
|
|
Many of these functions will treat the 'pointer' parameter as an offset
into a buffer if one is currently bound.
This makes it possible to run ClassiCube with OpenGL 1.5 support!
|
|
For now, buffers are only implemented on the LibGL side, however in the
future buffer objects should be stored in LibGPU.
|
|
This functionality can also be used for other types of objects.
|
|
Otherwise, we end up propagating those dependencies into targets that
link against that library, which creates unnecessary link-time
dependencies.
Also included are changes to readd now missing dependencies to tools
that actually need them.
|
|
According to the OpenGL 2.0 spec ยง 2.8, the data for each attribute type
pointer is normalized according to the type. The only exception to this
is `glVertexAttribPointer` which accepts a `normalized` parameter, but
we have not yet implemented that API.
|
|
|
|
This implements the state and context parameters for all packing and
unpacking parameters accepted by `glPixelStore*`.
|
|
|
|
|
|
|