Age | Commit message (Collapse) | Author |
|
This loads libsoftgpu.so during GLContext creation and instantiates the
device class which is then passed into the GLContext constructor.
|
|
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.
|
|
We were lacking support for default textures (i.e. calling
`glBindTexture` with a `texture` argument of `0`) which caused our
Quake2 port to render red screens whenever a video was playing. Every
texture unit is now initialized with a default 2D texture.
Additionally, we had this concept of a "currently bound target" on our
texture units which is not how OpenGL wants us to handle targets.
Calling `glBindTexture` should set the texture for the provided target
only, making it sort of an alias for future operations on the same
target.
Finally, `glDeleteTextures` should not remove the bound texture from
the target in the texture unit, but it should reset it to the default
texture.
|
|
|
|
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)`.
|
|
Texture sampling now happens entirely in SoftGPU thus this class will
now only be used to hold the sampler configuration.
|
|
This introduces a new library, LibSoftGPU, that incorporates all
rendering related features that formerly resided within LibGL itself.
Going forward we will make both libraries completely independent from
each other allowing LibGL to load different, possibly accelerated,
rendering backends.
|
|
|
|
This implements the context state for stencil testing functions and
operations. No rasterization is implemented.
|
|
This currently just sets the fog colour in the rasterizer.
|
|
|
|
This extracts the sampler functionality into its own class.
Beginning with OpenGL 3 samplers are actual objects, separate
from textures. It makes sense to do this already as it also
cleans up code organization quite a bit.
|
|
These are merely a way to hold the different texture target bind
points that a texture can be bound to.
|
|
|
|
Some very primitive Texture State management. Data can now be
uploaded to textures.
|
|
Texture names can now be allocated via
`glGenTextures` and deallocated via `glDeleteTextures`.
|
|
This turns off interpolation of vertex colors when GL_FLAT is selected.
|
|
|
|
This commit implements glGenLists(), glNewList(), glDeleteLists(), and
glCallList().
The 'compiled' records are implemented as a vector of member function
pointers and tuples containing their arguments, and a mechanism is
implemented to allow the recorded calls to copy-capture values from the
time of the call; this is currently only used with glLoadMatrix.
|
|
|
|
This code has also been optimised to be much more memory
friendly by removing a _lot_ of extraneous copies. The result
is that, when profiled, it's around 8x faster than the previous
implementation.
Co-Authored-By: Ali Mohammad Pur <ali.mpfard@gmail.com>
|
|
This is based mostly on Fabian "ryg" Giesen's 2011 blog series
"A trip through the Graphics Pipeline" and Scratchapixel's
"Rasterization: a Practical Implementation".
The rasterizer processes triangles in grid aligned 16x16 pixel blocks,
calculates barycentric coordinates and edge derivatives and interpolates
bilinearly across each block.
This will theoretically allow for better utilization of modern processor
features such as SMT and SIMD, as opposed to a classic scanline based
triangle rasterizer.
This serves as a starting point to get something on the screen.
In the future we might look into properly pipelining the main loop to
make the rasterizer more flexible, enabling us to enable/disable
certain features at the block rather than the pixel level.
|
|
This currently (obviously) doesn't support any actual 3D hardware,
hence all calls are done via software rendering.
Note that any modern constructs such as shaders are unsupported,
as this driver only implements Fixed Function Pipeline functionality.
The library is split into a base GLContext interface and a software
based renderer implementation of said interface. The global glXXX
functions serve as an OpenGL compatible c-style interface to the
currently bound context instance.
Co-authored-by: Stephan Unverwerth <s.unverwerth@gmx.de>
|