Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add KTX and ETC1 texture support #1

Closed
wants to merge 3 commits into from
Closed

Add KTX and ETC1 texture support #1

wants to merge 3 commits into from

Conversation

Triang3l
Copy link

This pull request adds support for Khronos Textures to NetRadiant and Q3Map2, with OpenGL ES 2.0 formats, Ericsson Texture Compression version 1, and BGR/BGRA.

The patent-free Ericsson Texture Compression format will be used in the next version of Warsow to significantly reduce VRAM usage on mobile GPUs and the integrated GPU of Intel Broadwell.

The new Warsow game pack repository also lists KTX as a supported format now.

@Triang3l
Copy link
Author

Triang3l commented Jun 1, 2015

Already merged on GitLab.

@Triang3l Triang3l closed this Jun 1, 2015
nyov pushed a commit that referenced this pull request Dec 23, 2020
This isssue:

```
netradiant/plugins/vfspk3/vfs.cpp:595:7: warning: array index 1024 is past the end of the array (which contains 1024 elements)
      [-Warray-bounds]
                                                tmppath[PATH_MAX] = '\0';
                                                ^       ~~~~~~~~
netradiant/plugins/vfspk3/vfs.cpp:587:5: note: array 'tmppath' declared here
                                char tmppath[PATH_MAX];
                                ^
netradiant/plugins/vfspk3/vfs.cpp:607:7: warning: array index 1024 is past the end of the array (which contains 1024 elements)
      [-Warray-bounds]
                                                tmppath[PATH_MAX] = '\0';
                                                ^       ~~~~~~~~
netradiant/plugins/vfspk3/vfs.cpp:587:5: note: array 'tmppath' declared here
                                char tmppath[PATH_MAX];
```

is producing this (on macOS):

```
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00007fff58f4f2c6 libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`__pthread_kill:
->  0x7fff58f4f2c6 <+10>: jae    0x7fff58f4f2d0            ; <+20>
    0x7fff58f4f2c8 <+12>: movq   %rax, %rdi
    0x7fff58f4f2cb <+15>: jmp    0x7fff58f49457            ; cerror_nocancel
    0x7fff58f4f2d0 <+20>: retq
Target 0: (netradiant) stopped.
(lldb) thread backtrace all
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x00007fff58f4f2c6 libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff5900abf1 libsystem_pthread.dylib`pthread_kill + 284
    frame TTimo#2: 0x00007fff58eb9745 libsystem_c.dylib`__abort + 144
    frame TTimo#3: 0x00007fff58eb9ff3 libsystem_c.dylib`__stack_chk_fail + 205
    frame TTimo#4: 0x000000010a8a7e59 libvfspk3.so`InitDirectory(char const*, Modules<_QERArchiveTable>&) + 7689
    frame TTimo#5: 0x00000001000e0a57 netradiant`QE_InitVFS() + 1351
    frame TTimo#6: 0x0000000100094673 netradiant`VFSModuleObserver::realise() + 19
    frame TTimo#7: 0x000000010009478a netradiant`HomePathsModuleObserver::realise() + 58
    frame TTimo#8: 0x000000010008906a netradiant`EnginePath_Realise() + 58
    frame TTimo#9: 0x00000001000d3f5f netradiant`Radiant::Radiant() + 351
    frame TTimo#10: 0x00000001000d15d1 netradiant`Radiant_Construct(ModuleServer&) + 353
    frame TTimo#11: 0x000000010008a84a netradiant`Radiant_Initialise() + 42
    frame TTimo#12: 0x0000000100088087 netradiant`main + 535
    frame TTimo#13: 0x00007fff58e143d5 libdyld.dylib`start + 1
  thread TTimo#2
    frame #0: 0x00007fff58f4abfe libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff59007636 libsystem_pthread.dylib`_pthread_wqthread + 458
    frame TTimo#2: 0x00007fff590073fd libsystem_pthread.dylib`start_wqthread + 13
  thread TTimo#3
    frame #0: 0x00007fff58f4abfe libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff59007636 libsystem_pthread.dylib`_pthread_wqthread + 458
    frame TTimo#2: 0x00007fff590073fd libsystem_pthread.dylib`start_wqthread + 13
  thread TTimo#4
    frame #0: 0x00007fff58f4abfe libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #&1: 0x00007fff590076e6 libsystem_pthread.dylib`_pthread_wqthread + 634
    frame TTimo#2: 0x00007fff590073fd libsystem_pthread.dylib`start_wqthread + 13
```
Garux added a commit to Garux/netradiant-custom that referenced this pull request Jul 18, 2021
xonotic/netradiant#1
https://gitlab.com/xonotic/netradiant/-/issues/5

This pull request adds support for Khronos Textures to NetRadiant and Q3Map2, with OpenGL ES 2.0 formats, Ericsson Texture Compression version 1, and BGR/BGRA.

The patent-free Ericsson Texture Compression format will be used in the next version of Warsow to significantly reduce VRAM usage on mobile GPUs and the integrated GPU of Intel Broadwell.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant