Jelle Raaijmakers
fef7f7159c
LibGL+LibSoftGPU: Implement eye, clip, NDC and window coordinates
...
This follows the OpenGL 1.5 spec much more closely. We need to store
the eye coordinates especially, since they are used in texture
coordinate generation and fog fragment depth calculation.
2021-12-30 14:24:29 +01:00
Jelle Raaijmakers
fd4d6b0031
LibSoftGPU: Set obvious FP values for depth_min/max
2021-12-30 14:24:29 +01:00
Jelle Raaijmakers
3a5f69b6f3
LibGL+LibSoftGPU: Implement normalization of normals
...
* LibGL now supports the `GL_NORMALIZE` capability
* LibSoftGPU transforms and normalizes the vertices' normals
Normals are heavily used in texture coordinate generation, to be
implemented in a future commit.
2021-12-30 14:24:29 +01:00
Stephan Unverwerth
39995548e4
LibGL+LibSoftGPU: Add method to query device info
...
This adds a method `info()` to SoftGPU that returns the name of the
hardware vendor and device name, as well as the number of texture untis.
LibGL uses the returned texture unit count to initialize its internal
texture unit array.
2021-12-24 05:10:28 -08:00
Stephan Unverwerth
1a758d7bf2
LibSoftGPU: Move enums into separate file
2021-12-24 05:10:28 -08:00
Stephan Unverwerth
f7c40b25ac
LibSoftGPU: Remove GLenum used for selecting rendered primitive type
...
This removes the last reference to LibGL from LibSoftGPU. The GLenum
has been replaced by our own enum.
2021-12-24 05:10:28 -08:00
Stephan Unverwerth
de0069188f
LibSoftGPU: Remove OpenGL type for polygon mode
...
Replaces the GLenum used to setup polygon mode in RasterizerOptions with
our own enum.
2021-12-24 05:10:28 -08:00
Stephan Unverwerth
f4d29bf665
LibSoftGPU: Remove OpenGL type for fog mode
...
Replaces the GLenum used to set up the fog mode in RasterizerOptions
with out own enum.
2021-12-24 05:10:28 -08:00
Stephan Unverwerth
74ed7713fa
LibSoftGPU: Remove OpenGL type for depth test func
...
Replaces the GLenum used in the RasterizerConfig for selecting the depth
test function with out own enum.
2021-12-24 05:10:28 -08:00
Stephan Unverwerth
33e601800c
LibSoftGPU: Remove OpenGL type for draw buffer selection
...
Replaces the GLenum used in RasterizerConfig to select the draw buffer
with a simple boolean that disabled color output when the draw buffer
is set to GL_NONE on the OpenGL side.
2021-12-24 05:10:28 -08:00
Stephan Unverwerth
1904be0370
LibSoftGPU: Remove OpenGL type for culled side selection
...
Replaces the GLenum in RasterizerConfig, that selects the triangle sides
to be culled, with two booleans.
2021-12-24 05:10:28 -08:00
Stephan Unverwerth
24c76741e8
LibSoftGPU: Remove OpenGL type for front face selection
...
Replaces the GLenum used for selecting the frontface in the rasterizer
config with out own enum.
2021-12-24 05:10:28 -08:00
Stephan Unverwerth
c720cd00db
LibSoftGPU: Remove OpenGL type for alpha blend factors
...
Replaces the GLenum used for configuring alpha blend factors in the
SoftGPU device with out own enum.
2021-12-24 05:10:28 -08:00
Stephan Unverwerth
40bd73bdef
LibSoftGPU: Remove OpenGL type for alpha test func
...
Replaces the OpenGL enum used for setting the alpha test func in
RasterizerOptions with out own enum.
2021-12-24 05:10:28 -08:00
Stephan Unverwerth
7d49015403
LibSoftGPU: Remove simple OpenGL types from RasterizerConfig
...
Replace GLfloat and GLboolean types in RasterizerConfig with their c++
native equivalent.
2021-12-24 05:10:28 -08:00
Stephan Unverwerth
d8c17c8838
LibGL+LibSoftGPU: Use device samplers for rendering
...
We now sample textures from the device owned image samplers.
Passing of enabled texture units has been simplified by only passing a
list of texture unit indices.
2021-12-24 05:10:28 -08:00
Stephan Unverwerth
2a72d14336
LibSoftGPU: Make samplers part of device
...
This adds a sampler array to the device implementation and adds a method
`set_sampler_config` to configure samplers.
2021-12-24 05:10:28 -08:00
Stephan Unverwerth
b8bb72abbe
LibSoftGPU: Add device method for creating images
2021-12-24 05:10:28 -08:00
Stephan Unverwerth
a9e27b9a0f
LibSoftGPU: Rename class SoftwareRasterizer to Device
...
This class does everything related to rendering now. It is the software
implementation of a full GPU device.
2021-12-24 05:10:28 -08:00