Skip to content

Commit

Permalink
Clarification in README, properly inlay functions
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaivel committed Sep 23, 2024
1 parent 9a02088 commit 968c731
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,23 @@ SharedGL is an OpenGL implementation that enables 3D acceleration for Windows an

# Getting started

The following libraries are required for building the server (and client) on Linux:
The following libraries are required for building the server on Linux:
- libepoxy
- SDL2
- libx11

The following script builds: `sglrenderer` and `libGL` for Linux:
The following script builds `sglrenderer` for Linux:
```bash
git clone https://github.com/dmaivel/sharedgl.git
cd sharedgl
mkdir build
cd build
cmake ..
cmake --build . --config Release
cmake --build . --target sglrenderer --config Release
```

If on Windows (Visual Studio required), you must specify that you only want to build the library, `sharedglXX.dll`:
```
cmake --build . --target sharedgl-core --config Release
```
If you also wish to build the client library for Linux, `libx11` is required. Build with `--target sharedgl-core`.

For detailed build instructions for Windows, visit the [Windows section](#windows-in-a-vm).
For detailed build instructions for Windows, visit the [Windows section](#windows-in-a-vm). The renderer/server is only supported on Linux hosts.

### Build options

Expand Down Expand Up @@ -156,6 +152,10 @@ There are two ways to install the library on windows:
```
## Linux
> [!IMPORTANT]
> The following sections discuss using the *client library*, not the *renderer/server*. If your intention is to only accelerate Windows guests, you may disregard this section as all you need to do is run the renderer, no additional libraries required (other than the dependencies).
For your OpenGL application to communicate with the server, the client library must be specified in your library path. Upon exporting, any program you run in the terminal where you inputted this command will run with the SGL binary.
```bash
Expand Down
4 changes: 2 additions & 2 deletions src/server/processor.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static void scramble(int *arr, int n)
}
}

static FORCEINLINE void wait_shm(void *p, int *client_id)
static FORCEINLINE inline void wait_shm(void *p, int *client_id)
{
/*
* not only wait for a submit from a specific client,
Expand Down Expand Up @@ -272,7 +272,7 @@ static void sgl_net_get_fifo_upload(void *p, int *client_id, bool *ready_to_rend
}
}

static FORCEINLINE void wait_net(void *p, int *client_id, struct net_context *net_ctx, struct sgl_cmd_processor_args args,
static FORCEINLINE inline void wait_net(void *p, int *client_id, struct net_context *net_ctx, struct sgl_cmd_processor_args args,
size_t framebuffer_size, size_t fifo_size, int width, int height)
{
bool ready_to_render = false;
Expand Down

0 comments on commit 968c731

Please sign in to comment.